forked from JSpeedie/G2ME-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglicko2.h
32 lines (28 loc) · 907 Bytes
/
glicko2.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef G2ME_GLICKO2
#define G2ME_GLICKO2
#define DEF_VOL 0.06
#define DEF_RATING 1500.0
#define DEF_RD 350.0
#define DEF_TAU 0.5
typedef struct player {
/* The system constant, which constrains the change in
* volatility over time. */
double _tau;
double __rating;
double __rd;
double vol;
}Player;
/* Function prototypes because this is not python */
void did_not_compete(struct player*);
double getRating(struct player*);
double getRd(struct player*);
void setRating(struct player*, double);
void setRd(struct player*, double);
void update_player(struct player*, double*, int, double*, double*);
double _delta(struct player*, double*, int, double*, double*, double);
double _E(struct player*, double, double);
double _g(double);
void _preRatingRD(struct player*);
double _newVol(struct player*, double*, int, double*, double*, double);
double _v(struct player*, double*, int, double*);
#endif