23 bool showGraphics =
false;
30 TGraph*
g =
new TGraph(ARRAYSIZE, x, y);
31 g->SetLineColor(color);
32 g->SetLineStyle(
style);
41 vector<Double_t>
x( ARRAYSIZE );
42 vector<Double_t> yb( ARRAYSIZE );
43 vector<Double_t> ymb( ARRAYSIZE );
47 double b = 0.2,
a= 0.9;
48 cout <<
"** b = " << b <<
" **" << endl;
49 unsigned int index = 0;
53 cout <<
"i:"; cout.width(5); cout << i
54 <<
" index: "; cout.width(5); cout << index
64 if (
std::fabs( yb[index] - ymb[index] ) > ERRORLIMIT )
67 <<
" yb[index] " << yb[index]
68 <<
" ymb[index] " << ymb[index]
69 <<
" " <<
std::fabs( yb[index] - ymb[index] )
79 TCanvas*
c1 =
new TCanvas(
"c1",
"Two Graphs", 600, 400);
80 TH2F*
hpx =
new TH2F(
"hpx",
"Two Graphs(hpx)", ARRAYSIZE, MIN, MAX, ARRAYSIZE, 0, 5);
91 legend->
AddEntry(gb,
"TMath::BetaIncomplete()");
92 legend->
AddEntry(gmb,
"ROOT::Math::inc_beta()");
98 cout <<
"Test Done!" << endl;
103 int main(
int argc,
char **argv)
106 for (
Int_t i=1 ; i<argc ; i++) {
107 std::string arg = argv[i] ;
116 cerr <<
"Usage: " << argv[0] <<
" [-g] [-v]\n";
118 cerr <<
" -g : graphics mode\n";
119 cerr <<
" -v : verbose mode";
This class displays a legend box (TPaveText) containing several legend entries.
int main(int argc, char **argv)
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
double inc_beta(double x, double a, double b)
Calculates the normalized (regularized) incomplete beta function.
virtual void Run(Bool_t retrn=kFALSE)
Main application eventloop. Calls system dependent eventloop via gSystem.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
TGraph * drawPoints(Double_t x[], Double_t y[], int color, int style=1)
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
Double_t BetaIncomplete(Double_t x, Double_t a, Double_t b)
Calculates the incomplete Beta-function.