Cute Chess
0.1
Main Page
Namespaces
Classes
Files
File List
projects
lib
src
sprt.h
1
/*
2
This file is part of Cute Chess.
3
Copyright (C) 2008-2018 Cute Chess authors
4
5
Cute Chess is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
Cute Chess is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef SPRT_H
20
#define SPRT_H
21
32
class
LIB_EXPORT
Sprt
33
{
34
public
:
36
enum
Result
37
{
38
Continue
,
39
AcceptH0
,
40
AcceptH1
41
};
42
44
enum
GameResult
45
{
46
NoResult
,
47
Win
,
48
Loss
,
49
Draw
50
};
51
53
struct
Status
54
{
55
Result
result
;
56
double
llr
;
57
double
lBound
;
58
double
uBound
;
59
};
60
62
Sprt
();
63
68
bool
isNull()
const
;
69
79
void
initialize(
double
elo0,
double
elo1,
80
double
alpha,
double
beta);
82
Status
status()
const
;
89
void
addGameResult(
GameResult
result);
90
91
private
:
92
double
m_elo0;
93
double
m_elo1;
94
double
m_alpha;
95
double
m_beta;
96
int
m_wins;
97
int
m_losses;
98
int
m_draws;
99
};
100
101
#endif // SPRT_H
Sprt::Status
Definition:
sprt.h:53
Sprt::Status::lBound
double lBound
Lower bound.
Definition:
sprt.h:57
Sprt::Result
Result
Definition:
sprt.h:36
Sprt::Continue
Continue monitoring.
Definition:
sprt.h:38
Sprt::AcceptH0
Accept null hypothesis H0.
Definition:
sprt.h:39
Sprt::Loss
First player lost.
Definition:
sprt.h:48
Sprt::Win
First player won.
Definition:
sprt.h:47
Sprt::Status::llr
double llr
Log-likelihood ratio.
Definition:
sprt.h:56
Sprt::Status::result
Result result
Test result.
Definition:
sprt.h:55
Sprt::Status::uBound
double uBound
Upper bound.
Definition:
sprt.h:58
Sprt
A Sequential Probability Ratio Test.
Definition:
sprt.h:32
Sprt::GameResult
GameResult
Definition:
sprt.h:44
Sprt::NoResult
Game ended with no result.
Definition:
sprt.h:46
Generated by
1.8.11