Description Usage Arguments Details Value
C++ implementation of iterative computations.
1 2 | compute_iterative_ratings(rate_fun, player1_id, score1, player2_id, score2,
initial_ratings)
|
rate_fun |
Rating function (see Details). |
player1_id |
Integer vector of player1 identifiers. |
score1 |
Numeric vector of player1 score in games. |
player2_id |
Integer vector of player2 identifiers. |
score2 |
Numeric vector of player2 score in games. |
initial_ratings |
Numeric vector of initial ratings (see Details). |
rate_fun
- function that takes arguments:
rating1 - rating of player1 before game;
score1 - numeric score of player1 in the game;
rating2 - rating of player2 before game;
score2 - numeric score of player2 in the game.
This function should return numeric vector of length 2: rating of player1 and player2 after the game.
player1_id
, player2_id
- integer vectors of identifiers of
players in a form of increasing numbers (1, 2, ...). Identifier 0 is
reserved for 'ghost' player. His/her rating is taken as current rating of
opponent. For two 'ghost' players ratings before and after are 0.
initial_ratings
- numeric vector of length equal to number of unique
players in player1_id
and player2_id
. In
initial_ratings[player_id - 1]
(indexing from zero) initial rating of
player with identifier 'player_id' is stored.
A list:
rating1Before - rating of player 1 before the game;
rating2Before - rating of player 2 before the game;
rating1After - rating of player 1 after the game;
rating2After - rating of player 2 after the game.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.