STK++ 0.9.13
tutoStatFactors.cpp
Go to the documentation of this file.
1#include "STKpp.h"
2using namespace STK;
3int main(int argc, char** argv)
4{
6 fac <<'b','a','a', 'c','b','a', 'b','a','a', 'c','a','a', 'd','a','a'
7 ,'b','b','a', 'd','c','b', 'c','c','b', 'b','c','b', 'd','b','b'
8 ,'b','a','b', 'd','a','b', 'c','c','b';
9
11 f1d.run();
12 stk_cout << "nbLevels= " << f1d.nbLevels() << "\n";
13 stk_cout << "asInteger=\n"<< f1d.asInteger().transpose() << "\n";
14 stk_cout << "Levels: " << f1d.levels().transpose();
15 stk_cout << "Levels counts: " << f1d.counts().transpose();
16
18 f2d.run();
19 stk_cout << "nbLevels= " << f2d.nbLevels() << "\n";
20 stk_cout << "asInteger=\n"<< f2d.asInteger().transpose() << "\n";
21 for (int i=f2d.levels().begin(); i<f2d.levels().end(); ++i)
22 stk_cout <<"Levels "<< i <<": "<< f2d.levels()[i].transpose();
23 stk_cout << "\n";
24 for (int i=f2d.levels().begin(); i<f2d.levels().end(); ++i)
25 stk_cout <<"Counts "<< i << ": "<< f2d.counts()[i].transpose();
26 return 0;
27}
#define stk_cout
Standard stk output stream.
This file include all the header files of the STK++ project.
TransposeOperator< Derived > const transpose() const
A CArray is a two dimensional array with a continuous storage like a C-array.
Definition STK_CArray.h:130
hidden::CSlice< Derived, sizeRows_, 1 >::Result col(int j) const
implement the col operator using a reference on the column of the allocator
Computation of the Factors of a 1D Container.
virtual bool run()
run the estimation of the Factor statistics.
VectorXi const & counts() const
int const & nbLevels() const
CVectorXi const & asInteger() const
Array2DVector< Type > const & levels() const
Computation of the MultiFactors of a 2D Container.
CArrayXXi const & asInteger() const
CArrayPoint< VectorXi > const & counts() const
CPointXi const & nbLevels() const
virtual bool run()
run the estimation of the MultiFactor statistics.
CArrayPoint< Array2DVector< Type > > const & levels() const
The namespace STK is the main domain space of the Statistical ToolKit project.
int main(int argc, char **argv)