STK++ 0.9.13
|
Computation of the Factors of a 1D Container. More...
#include <STK_Stat_Factor.h>
Public Types | |
typedef IRunnerWithData< Array > | Base |
typedef hidden::Traits< Array >::Row | RowVector |
typedef hidden::Traits< Array >::Col | ColVector |
typedef Array::Type | Type |
typedef std::map< Type, int > | EncodingMap |
typedef std::map< int, Type > | DecodingMap |
Public Member Functions | |
Factor () | |
Default Constructor. | |
Factor (Array const &data) | |
Constructor. | |
Factor (Array const *p_data) | |
Constructor. | |
Factor (Factor const &f) | |
copy constructor. | |
virtual | ~Factor () |
virtual destructor. | |
virtual Factor * | clone () const |
clone pattern | |
CVectorXi const & | asInteger () const |
Array2DVector< Type > const & | levels () const |
VectorXi const & | counts () const |
int const & | firstLevel () const |
int const & | nbLevels () const |
EncodingMap const & | encoder () const |
DecodingMap const & | decoder () const |
void | setFirstLevel (int firstLevel) |
set the value of the first level | |
virtual bool | run () |
run the estimation of the Factor statistics. | |
![]() | |
Array const * | p_data () const |
get the data set | |
virtual void | setData (Array const *p_data) |
Set the data set. | |
virtual void | setData (Array const &data) |
Set the data set. | |
![]() | |
String const & | error () const |
get the last error message. | |
Public Attributes | |
Array const * | p_data_ |
A pointer on the original data set. | |
Protected Member Functions | |
virtual void | update () |
udpating method in case we set a new data set | |
![]() | |
IRunnerWithData () | |
default constructor. | |
IRunnerWithData (Array const *const p_data) | |
constructor with a pointer on the constant data set | |
IRunnerWithData (Array const &data) | |
constructor with a constant reference on the data set | |
IRunnerWithData (IRunnerWithData const &runner) | |
copy constructor | |
~IRunnerWithData () | |
destructor | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
Protected Attributes | |
CVectorXi | asInteger_ |
vector with the levels in an integer format | |
int | firstLevel_ |
first level | |
int | nbLevels_ |
Number of levels of each variables. | |
Array2DVector< Type > | levels_ |
vector with the levels | |
VectorXi | counts_ |
Array with the counts of each factor. | |
EncodingMap | encoder_ |
encoder of the levels | |
DecodingMap | decoder_ |
decoder of the levels | |
![]() | |
Array const * | p_data_ |
A pointer on the original data set. | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
Computation of the Factors of a 1D Container.
The class Factor
is a factory class for computing the factors of a vector. The values can be of any type. the Coding is performed from the previous type in integer. The mapping is stored and preserved in a map array.
Definition at line 54 of file STK_Stat_Factor.h.
typedef IRunnerWithData<Array> STK::Stat::Factor< Array >::Base |
Definition at line 57 of file STK_Stat_Factor.h.
typedef hidden::Traits<Array>::Col STK::Stat::Factor< Array >::ColVector |
Definition at line 59 of file STK_Stat_Factor.h.
typedef std::map<int, Type> STK::Stat::Factor< Array >::DecodingMap |
Definition at line 63 of file STK_Stat_Factor.h.
typedef std::map<Type, int> STK::Stat::Factor< Array >::EncodingMap |
Definition at line 62 of file STK_Stat_Factor.h.
typedef hidden::Traits<Array>::Row STK::Stat::Factor< Array >::RowVector |
Definition at line 58 of file STK_Stat_Factor.h.
typedef Array::Type STK::Stat::Factor< Array >::Type |
Definition at line 60 of file STK_Stat_Factor.h.
STK::Stat::Factor< Array >::Factor | ( | ) |
Default Constructor.
Definition at line 129 of file STK_Stat_Factor.h.
Referenced by STK::Stat::Factor< Array >::clone().
STK::Stat::Factor< Array >::Factor | ( | Array const & | data | ) |
Constructor.
data | a reference on the data set |
Definition at line 133 of file STK_Stat_Factor.h.
STK::Stat::Factor< Array >::Factor | ( | Array const * | p_data | ) |
Constructor.
p_data | a pointer on the data set |
Definition at line 147 of file STK_Stat_Factor.h.
References STK::Stat::Factor< Array >::asInteger_, STK::Stat::Factor< Array >::nbLevels_, STK::Stat::Factor< Array >::p_data_, and STK::ICArray< Derived >::resize().
STK::Stat::Factor< Array >::Factor | ( | Factor< Array > const & | f | ) |
copy constructor.
f | the Factor to copy |
Definition at line 164 of file STK_Stat_Factor.h.
|
inlinevirtual |
|
inline |
Definition at line 88 of file STK_Stat_Factor.h.
References STK::Stat::Factor< Array >::asInteger_.
Referenced by main().
|
inlinevirtual |
clone pattern
Definition at line 85 of file STK_Stat_Factor.h.
References STK::Stat::Factor< Array >::Factor().
|
inline |
Definition at line 92 of file STK_Stat_Factor.h.
References STK::Stat::Factor< Array >::counts_.
Referenced by main().
|
inline |
Definition at line 100 of file STK_Stat_Factor.h.
References STK::Stat::Factor< Array >::decoder_.
|
inline |
Definition at line 98 of file STK_Stat_Factor.h.
References STK::Stat::Factor< Array >::encoder_.
|
inline |
Definition at line 94 of file STK_Stat_Factor.h.
References STK::Stat::Factor< Array >::firstLevel_.
Referenced by STK::Stat::Factor< Array >::setFirstLevel().
|
inline |
Definition at line 90 of file STK_Stat_Factor.h.
References STK::Stat::Factor< Array >::levels_.
Referenced by main().
|
inline |
Definition at line 96 of file STK_Stat_Factor.h.
References STK::Stat::Factor< Array >::nbLevels_.
Referenced by main().
|
virtual |
run the estimation of the Factor statistics.
Implements STK::IRunnerBase.
Definition at line 188 of file STK_Stat_Factor.h.
References _T, STK::Exception::error(), and STKERROR_NO_ARG.
Referenced by main().
|
inline |
set the value of the first level
Definition at line 103 of file STK_Stat_Factor.h.
References STK::Stat::Factor< Array >::firstLevel(), and STK::Stat::Factor< Array >::firstLevel_.
|
protectedvirtual |
udpating method in case we set a new data set
Reimplemented from STK::IRunnerBase.
Definition at line 172 of file STK_Stat_Factor.h.
References STK::baseIdx.
|
protected |
vector with the levels in an integer format
Definition at line 110 of file STK_Stat_Factor.h.
Referenced by STK::Stat::Factor< Array >::asInteger(), and STK::Stat::Factor< Array >::Factor().
|
protected |
Array with the counts of each factor.
Definition at line 118 of file STK_Stat_Factor.h.
Referenced by STK::Stat::Factor< Array >::counts().
|
protected |
decoder of the levels
Definition at line 122 of file STK_Stat_Factor.h.
Referenced by STK::Stat::Factor< Array >::decoder().
|
protected |
encoder of the levels
Definition at line 120 of file STK_Stat_Factor.h.
Referenced by STK::Stat::Factor< Array >::encoder().
|
protected |
first level
Definition at line 112 of file STK_Stat_Factor.h.
Referenced by STK::Stat::Factor< Array >::firstLevel(), and STK::Stat::Factor< Array >::setFirstLevel().
|
protected |
vector with the levels
Definition at line 116 of file STK_Stat_Factor.h.
Referenced by STK::Stat::Factor< Array >::levels().
|
protected |
Number of levels of each variables.
Definition at line 114 of file STK_Stat_Factor.h.
Referenced by STK::Stat::Factor< Array >::Factor(), and STK::Stat::Factor< Array >::nbLevels().
Array const* STK::IRunnerWithData< Array >::p_data_ |
A pointer on the original data set.
Definition at line 172 of file STK_IRunner.h.
Referenced by STK::Stat::Factor< Array >::Factor().