gstlearn  1.0.0
CCC
AnamDiscrete Class Reference

#include <AnamDiscrete.hpp>

Inheritance diagram for AnamDiscrete:
AAnam AStringable ASerializable ICloneable AnamDiscreteDD AnamDiscreteIR

Public Member Functions

 AnamDiscrete ()
 
 AnamDiscrete (const AnamDiscrete &m)
 
AnamDiscreteoperator= (const AnamDiscrete &m)
 
virtual ~AnamDiscrete ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 AStringable Interface. More...
 
bool hasGaussian () const override
 AAnam interface. More...
 
int getNClass () const
 
virtual void calculateMeanAndVariance ()
 Interface for AnamDiscrete. More...
 
virtual double getVariance () const override
 
int getNCut () const
 
int getNElem () const
 
const VectorDoublegetZCut () const
 
double getZCut (int i) const
 
double getMean () const
 
void setMean (double mean)
 
void setVariance (double variance)
 
void setNCut (int ncut)
 
void setZCut (const VectorDouble &zcut)
 
void setNElem (int nelem)
 
void setStats (const VectorDouble &stats)
 
double getDDStatProp (int iclass) const
 
double getDDStatZmoy (int iclass) const
 
double getDDStatCnorm (int iclass) const
 
double getDDStatLambda (int iclass) const
 
double getDDStatU (int iclass) const
 
double getDDStatMul (int iclass) const
 
void setDDStatProp (int iclass, double value)
 
void setDDStatZmoy (int iclass, double value)
 
void setDDStatCnorm (int iclass, double value)
 
void setDDStatLambda (int iclass, double value)
 
void setDDStatU (int iclass, double value)
 
void setDDStatMul (int iclass, double value)
 
double getIRStatT (int iclass) const
 
double getIRStatQ (int iclass) const
 
double getIRStatZ (int iclass) const
 
double getIRStatB (int iclass) const
 
double getIRStatR (int iclass) const
 
double getIRStatRV (int iclass) const
 
void setIRStatT (int iclass, double value)
 
void setIRStatQ (int iclass, double value)
 
void setIRStatZ (int iclass, double value)
 
void setIRStatB (int iclass, double value)
 
void setIRStatR (int iclass, double value)
 
void setIRStatRV (int iclass, double value)
 
const MatrixRectangulargetStats () const
 
- Public Member Functions inherited from AAnam
 AAnam ()
 
 AAnam (const AAnam &m)
 
AAnamoperator= (const AAnam &m)
 
virtual ~AAnam ()
 
virtual const EAnam & getType () const =0
 Interface for AAnam. More...
 
virtual bool hasFactor () const
 
virtual int getNFactor () const
 
virtual bool isChangeSupportDefined () const =0
 
virtual VectorDouble z2factor (double z, const VectorInt &ifqcs) const
 
virtual double computeVariance (double sval) const
 
virtual int updatePointToBlock (double r_coef)
 
virtual bool allowChangeSupport () const
 
virtual double rawToTransformValue (double z) const
 
virtual double transformToRawValue (double y) const
 
virtual int fitFromArray (const VectorDouble &tab, const VectorDouble &wt=VectorDouble())
 
double invertVariance (double cvv) const
 
VectorDouble rawToTransformVec (const VectorDouble &z) const
 
VectorDouble transformToRawVec (const VectorDouble &z) const
 
int fitFromLocator (Db *db, const ELoc &locatorType=ELoc::fromKey("Z"))
 
int fit (Db *db, const String &name)
 
int rawToGaussianByLocator (Db *db, const NamingConvention &namconv=NamingConvention("Y"))
 
int rawToGaussian (Db *db, const String &name, const NamingConvention &namconv=NamingConvention("Y"))
 
int normalScore (Db *db, const String &name, const NamingConvention &namconv=NamingConvention("Gaussian"))
 
int gaussianToRawByLocator (Db *db, const NamingConvention &namconv=NamingConvention("Z"))
 
int gaussianToRaw (Db *db, const String &name, const NamingConvention &namconv=NamingConvention("Z"))
 
int rawToFactorByRanks (Db *db, const VectorInt &ifacs, const NamingConvention &namconv=NamingConvention("Factor"))
 
int rawToFactor (Db *db, int nfactor, const NamingConvention &namconv=NamingConvention("Factor"))
 
- Public Member Functions inherited from AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (int level) const final
 
- Public Member Functions inherited from ASerializable
 ASerializable ()
 
 ASerializable (const ASerializable &r)
 
ASerializableoperator= (const ASerializable &r)
 
virtual ~ASerializable ()
 
bool deserialize (std::istream &is, bool verbose=true)
 
bool serialize (std::ostream &os, bool verbose=true) const
 
bool dumpToNF (const String &neutralFilename, bool verbose=false) const
 
- Public Member Functions inherited from ICloneable
 ICloneable ()
 
virtual ~ICloneable ()
 
virtual ICloneableclone () const =0
 

Protected Member Functions

virtual bool _deserialize (std::istream &is, bool verbose=false) override
 Interface for ASerializable. More...
 
virtual bool _serialize (std::ostream &os, bool verbose=false) const override
 
String _getNFName () const override
 
bool _isClassValid (int iclass) const
 
void _resize ()
 
- Protected Member Functions inherited from AAnam
bool _isSampleSkipped (Db *db, int iech, const VectorInt &cols_est, const VectorInt &cols_std)
 
bool _isFitted () const
 
- Protected Member Functions inherited from ASerializable
bool _fileOpenWrite (const String &filename, std::ofstream &os, bool verbose=false) const
 
bool _fileOpenRead (const String &filename, std::ifstream &is, bool verbose=false) const
 

Private Attributes

int _nCut
 
int _nElem
 
double _mean
 
double _variance
 
VectorDouble _zCut
 
MatrixRectangular _stats
 

Additional Inherited Members

- Static Public Member Functions inherited from ASerializable
static String buildFileName (int status, const String &filename, bool ensureDirExist=false)
 
static String getHomeDirectory (const String &sub="")
 
static String getWorkingDirectory ()
 
static String getTestData (const String &subdir, const String &filename)
 
static String getFileIdentity (const String &filename, bool verbose=false)
 
static void setContainerName (bool useDefault, const String &containerName="", bool verbose=false)
 
static void unsetContainerName ()
 
static void setPrefixName (const String &prefixName)
 
static void unsetPrefixName ()
 
static const StringgetContainerName ()
 
static const StringgetPrefixName ()
 
static bool createDirectory (const String &dir)
 
static String getExecDirectory ()
 
static String getDirectory (const String &path)
 
- Static Protected Member Functions inherited from ASerializable
static bool _commentWrite (std::ostream &os, const String &comment)
 
template<typename T >
static bool _recordWrite (std::ostream &os, const String &title, const T &val)
 
template<typename T >
static bool _recordWriteVec (std::ostream &os, const String &title, const VectorT< T > &vec)
 
template<typename T >
static bool _recordRead (std::istream &is, const String &title, T &val)
 
template<typename T >
static bool _recordReadVec (std::istream &is, const String &title, VectorT< T > &vec, int nvalues)
 
static bool _onlyBlanks (char *string)
 
static bool _tableRead (std::istream &is, const String &string, int ntab, double *tab)
 
static bool _tableWrite (std::ostream &os, const String &string, int ntab, const VectorDouble &tab)
 

Constructor & Destructor Documentation

◆ AnamDiscrete() [1/2]

AnamDiscrete::AnamDiscrete ( )

◆ AnamDiscrete() [2/2]

AnamDiscrete::AnamDiscrete ( const AnamDiscrete m)

◆ ~AnamDiscrete()

AnamDiscrete::~AnamDiscrete ( )
virtual

Member Function Documentation

◆ _deserialize()

bool AnamDiscrete::_deserialize ( std::istream &  is,
bool  verbose = false 
)
overrideprotectedvirtual

Interface for ASerializable.

Implements ASerializable.

Reimplemented in AnamDiscreteIR, and AnamDiscreteDD.

◆ _getNFName()

String AnamDiscrete::_getNFName ( ) const
inlineoverrideprotectedvirtual

Implements ASerializable.

Reimplemented in AnamDiscreteIR, and AnamDiscreteDD.

◆ _isClassValid()

bool AnamDiscrete::_isClassValid ( int  iclass) const
protected

◆ _resize()

void AnamDiscrete::_resize ( )
protected

◆ _serialize()

bool AnamDiscrete::_serialize ( std::ostream &  os,
bool  verbose = false 
) const
overrideprotectedvirtual

Implements ASerializable.

Reimplemented in AnamDiscreteIR, and AnamDiscreteDD.

◆ calculateMeanAndVariance()

void AnamDiscrete::calculateMeanAndVariance ( )
virtual

Interface for AnamDiscrete.

Reimplemented in AnamDiscreteIR, and AnamDiscreteDD.

◆ getDDStatCnorm()

double AnamDiscrete::getDDStatCnorm ( int  iclass) const

◆ getDDStatLambda()

double AnamDiscrete::getDDStatLambda ( int  iclass) const

◆ getDDStatMul()

double AnamDiscrete::getDDStatMul ( int  iclass) const

◆ getDDStatProp()

double AnamDiscrete::getDDStatProp ( int  iclass) const

◆ getDDStatU()

double AnamDiscrete::getDDStatU ( int  iclass) const

◆ getDDStatZmoy()

double AnamDiscrete::getDDStatZmoy ( int  iclass) const

◆ getIRStatB()

double AnamDiscrete::getIRStatB ( int  iclass) const

◆ getIRStatQ()

double AnamDiscrete::getIRStatQ ( int  iclass) const

◆ getIRStatR()

double AnamDiscrete::getIRStatR ( int  iclass) const

◆ getIRStatRV()

double AnamDiscrete::getIRStatRV ( int  iclass) const

◆ getIRStatT()

double AnamDiscrete::getIRStatT ( int  iclass) const

◆ getIRStatZ()

double AnamDiscrete::getIRStatZ ( int  iclass) const

◆ getMean()

double AnamDiscrete::getMean ( ) const
inline

◆ getNClass()

int AnamDiscrete::getNClass ( ) const
inlinevirtual

Reimplemented from AAnam.

◆ getNCut()

int AnamDiscrete::getNCut ( ) const
inline

◆ getNElem()

int AnamDiscrete::getNElem ( ) const
inline

◆ getStats()

const MatrixRectangular& AnamDiscrete::getStats ( ) const
inline

◆ getVariance()

virtual double AnamDiscrete::getVariance ( ) const
inlineoverridevirtual

Reimplemented from AAnam.

◆ getZCut() [1/2]

const VectorDouble& AnamDiscrete::getZCut ( ) const
inline

◆ getZCut() [2/2]

double AnamDiscrete::getZCut ( int  i) const
inline

◆ hasGaussian()

bool AnamDiscrete::hasGaussian ( ) const
inlineoverridevirtual

AAnam interface.

Reimplemented from AAnam.

◆ operator=()

AnamDiscrete & AnamDiscrete::operator= ( const AnamDiscrete m)

◆ setDDStatCnorm()

void AnamDiscrete::setDDStatCnorm ( int  iclass,
double  value 
)

◆ setDDStatLambda()

void AnamDiscrete::setDDStatLambda ( int  iclass,
double  value 
)

◆ setDDStatMul()

void AnamDiscrete::setDDStatMul ( int  iclass,
double  value 
)

◆ setDDStatProp()

void AnamDiscrete::setDDStatProp ( int  iclass,
double  value 
)

◆ setDDStatU()

void AnamDiscrete::setDDStatU ( int  iclass,
double  value 
)

◆ setDDStatZmoy()

void AnamDiscrete::setDDStatZmoy ( int  iclass,
double  value 
)

◆ setIRStatB()

void AnamDiscrete::setIRStatB ( int  iclass,
double  value 
)

◆ setIRStatQ()

void AnamDiscrete::setIRStatQ ( int  iclass,
double  value 
)

◆ setIRStatR()

void AnamDiscrete::setIRStatR ( int  iclass,
double  value 
)

◆ setIRStatRV()

void AnamDiscrete::setIRStatRV ( int  iclass,
double  value 
)

◆ setIRStatT()

void AnamDiscrete::setIRStatT ( int  iclass,
double  value 
)

◆ setIRStatZ()

void AnamDiscrete::setIRStatZ ( int  iclass,
double  value 
)

◆ setMean()

void AnamDiscrete::setMean ( double  mean)
inline

◆ setNCut()

void AnamDiscrete::setNCut ( int  ncut)

◆ setNElem()

void AnamDiscrete::setNElem ( int  nelem)

◆ setStats()

void AnamDiscrete::setStats ( const VectorDouble stats)

◆ setVariance()

void AnamDiscrete::setVariance ( double  variance)
inline

◆ setZCut()

void AnamDiscrete::setZCut ( const VectorDouble zcut)

◆ toString()

String AnamDiscrete::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

AStringable Interface.

Reimplemented from AStringable.

Reimplemented in AnamDiscreteIR, and AnamDiscreteDD.

Member Data Documentation

◆ _mean

double AnamDiscrete::_mean
private

◆ _nCut

int AnamDiscrete::_nCut
private

◆ _nElem

int AnamDiscrete::_nElem
private

◆ _stats

MatrixRectangular AnamDiscrete::_stats
private

◆ _variance

double AnamDiscrete::_variance
private

◆ _zCut

VectorDouble AnamDiscrete::_zCut
private

The documentation for this class was generated from the following files: