Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
reps
FuncChiRep.cxx
Go to the documentation of this file.
1
12
#include "
FuncChiRep.h
"
13
14
#include "
graphics/ViewBase.h
"
15
#include "
pattern/string_convert.h
"
16
#include "
projectors/FunctionProjector.h
"
17
18
#include <iomanip>
19
#include <sstream>
20
21
using
std::string;
22
23
using namespace
hippodraw;
24
25
FuncChiRep::FuncChiRep
( )
26
:
TextRepBase
(
"Chi-squared"
)
27
{
28
}
29
30
FuncChiRep::FuncChiRep
(
const
FuncChiRep
& rep )
31
:
TextRepBase
( rep )
32
{
33
}
34
35
RepBase
*
FuncChiRep::clone
()
36
{
37
return
new
FuncChiRep
( *
this
);
38
}
39
40
void
41
FuncChiRep::
42
drawProjectedValues
(
ProjectorBase
& proj,
43
ViewBase
& view )
44
{
45
const
FunctionProjector
& projector
46
=
dynamic_cast<
const
FunctionProjector
&
>
( proj );
47
48
int
dof = projector.
degreesOfFreedom
();
49
50
std::ostringstream message;
51
message <<
"chi^2 / dof = "
52
<< std::setprecision(3)
53
<< projector.
objectiveValue
()
54
<<
" / "
<< dof;
55
56
view.
drawText
( message.str(), 5.0, 0.0,
m_size
, 0,
'l'
,
't'
,
true
,
57
0, &
m_color
);
58
}
Generated for HippoDraw Class Library by