gstlearn  1.0.0
CCC
AnamEmpirical Class Reference

#include <AnamEmpirical.hpp>

Inheritance diagram for AnamEmpirical:
AnamContinuous AAnam AStringable ASerializable ICloneable

Public Member Functions

 AnamEmpirical (int ndisc=100, double sigma2e=TEST)
 
 AnamEmpirical (const AnamEmpirical &m)
 
AnamEmpiricaloperator= (const AnamEmpirical &m)
 
virtual ~AnamEmpirical ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 ICloneable Interface. More...
 
void reset (int ndisc, double pymin, double pzmin, double pymax, double pzmax, double aymin, double azmin, double aymax, double azmax, double sigma2e, const VectorDouble &tdisc)
 
const EAnam & getType () const override
 AAnam Interface. More...
 
int getNFactor () const override
 
int fitFromArray (const VectorDouble &tab, const VectorDouble &wt=VectorDouble()) override
 
void calculateMeanAndVariance () override
 AnamContinuous Interface. More...
 
double rawToTransformValue (double zz) const override
 
double transformToRawValue (double yy) const override
 
bool isChangeSupportDefined () const override
 
AnamEmpiricalcreate (int ndisc=100, double sigma2e=TEST)
 
int getNDisc () const
 
double getSigma2e () const
 
const VectorDoublegetTDisc () const
 
void setSigma2e (double sigma2e)
 
void setNDisc (int ndisc)
 
void setTDisc (const VectorDouble &tdisc)
 
bool isTDiscIndexValid (int i) const
 
- Public Member Functions inherited from AnamContinuous
 AnamContinuous ()
 
 AnamContinuous (const AnamContinuous &m)
 
AnamContinuousoperator= (const AnamContinuous &m)
 
virtual ~AnamContinuous ()
 
bool hasGaussian () const override
 AAnam interface. More...
 
virtual double getVariance () const override
 
void setABounds (double azmin=TEST, double azmax=TEST, double aymin=TEST, double aymax=TEST)
 
void setPBounds (double pzmin=TEST, double pzmax=TEST, double pymin=TEST, double pymax=TEST)
 
VectorDouble rawToGaussianVector (const VectorDouble &z) const
 
VectorDouble gaussianToRawVector (const VectorDouble &y) const
 
AnamContinuousFit sample (int ndisc=100, double aymin=-10, double aymax=+10)
 
double getMean () const
 
double getAymax () const
 
double getAymin () const
 
double getAzmax () const
 
double getAzmin () const
 
double getPymax () const
 
double getPymin () const
 
double getPzmax () const
 
double getPzmin () const
 
void setAzmin (double azmin)
 
void setAzmax (double azmax)
 
void setAymin (double aymin)
 
void setAymax (double aymax)
 
void setPzmin (double pzmin)
 
void setPzmax (double pzmax)
 
void setPymin (double pymin)
 
void setPymax (double pymax)
 
void setMean (double mean)
 
void setVariance (double variance)
 
- Public Member Functions inherited from AAnam
 AAnam ()
 
 AAnam (const AAnam &m)
 
AAnamoperator= (const AAnam &m)
 
virtual ~AAnam ()
 
virtual bool hasFactor () const
 
virtual int getNClass () const
 
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
 
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
 

Static Public Member Functions

static AnamEmpiricalcreateFromNF (const String &neutralFilename, bool verbose=true)
 ASerializable Interface. More...
 
- 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)
 

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
 
- 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 _nDisc
 
double _sigma2e
 
VectorDouble _tDisc
 

Additional Inherited Members

- 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)
 
- Protected Attributes inherited from AnamContinuous
Interval _az
 
Interval _ay
 
Interval _pz
 
Interval _py
 
double _mean
 
double _variance
 

Constructor & Destructor Documentation

◆ AnamEmpirical() [1/2]

AnamEmpirical::AnamEmpirical ( int  ndisc = 100,
double  sigma2e = TEST 
)

◆ AnamEmpirical() [2/2]

AnamEmpirical::AnamEmpirical ( const AnamEmpirical m)

◆ ~AnamEmpirical()

AnamEmpirical::~AnamEmpirical ( )
virtual

Member Function Documentation

◆ _deserialize()

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

Interface for ASerializable.

Reimplemented from AnamContinuous.

◆ _getNFName()

String AnamEmpirical::_getNFName ( ) const
inlineoverrideprotectedvirtual

Reimplemented from AnamContinuous.

◆ _serialize()

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

Reimplemented from AnamContinuous.

◆ calculateMeanAndVariance()

void AnamEmpirical::calculateMeanAndVariance ( )
overridevirtual

AnamContinuous Interface.

Reimplemented from AnamContinuous.

◆ create()

AnamEmpirical * AnamEmpirical::create ( int  ndisc = 100,
double  sigma2e = TEST 
)

◆ createFromNF()

AnamEmpirical * AnamEmpirical::createFromNF ( const String neutralFilename,
bool  verbose = true 
)
static

ASerializable Interface.

◆ fitFromArray()

int AnamEmpirical::fitFromArray ( const VectorDouble tab,
const VectorDouble wt = VectorDouble() 
)
overridevirtual

Reimplemented from AAnam.

◆ getNDisc()

int AnamEmpirical::getNDisc ( ) const
inline

◆ getNFactor()

int AnamEmpirical::getNFactor ( ) const
inlineoverridevirtual

Reimplemented from AAnam.

◆ getSigma2e()

double AnamEmpirical::getSigma2e ( ) const
inline

◆ getTDisc()

const VectorDouble& AnamEmpirical::getTDisc ( ) const
inline

◆ getType()

const EAnam& AnamEmpirical::getType ( ) const
inlineoverridevirtual

AAnam Interface.

Implements AAnam.

◆ isChangeSupportDefined()

bool AnamEmpirical::isChangeSupportDefined ( ) const
inlineoverridevirtual

Implements AAnam.

◆ isTDiscIndexValid()

bool AnamEmpirical::isTDiscIndexValid ( int  i) const

◆ operator=()

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

◆ rawToTransformValue()

double AnamEmpirical::rawToTransformValue ( double  zz) const
overridevirtual

Reimplemented from AAnam.

◆ reset()

void AnamEmpirical::reset ( int  ndisc,
double  pymin,
double  pzmin,
double  pymax,
double  pzmax,
double  aymin,
double  azmin,
double  aymax,
double  azmax,
double  sigma2e,
const VectorDouble tdisc 
)

◆ setNDisc()

void AnamEmpirical::setNDisc ( int  ndisc)

◆ setSigma2e()

void AnamEmpirical::setSigma2e ( double  sigma2e)
inline

◆ setTDisc()

void AnamEmpirical::setTDisc ( const VectorDouble tdisc)

◆ toString()

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

ICloneable Interface.

AStringable Interface

Reimplemented from AnamContinuous.

◆ transformToRawValue()

double AnamEmpirical::transformToRawValue ( double  yy) const
overridevirtual

Reimplemented from AAnam.

Member Data Documentation

◆ _nDisc

int AnamEmpirical::_nDisc
private

◆ _sigma2e

double AnamEmpirical::_sigma2e
private

◆ _tDisc

VectorDouble AnamEmpirical::_tDisc
private

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