gstlearn  0.3.3
CCC
SimuSpherical Class Reference

#include <SimuSpherical.hpp>

Inheritance diagram for SimuSpherical:
ACalcSimulation ACalcInterpolator ACalcDbToDb ACalculator

Public Member Functions

 SimuSpherical (int nbsimu=1, int seed=4324324)
 
 SimuSpherical (const SimuSpherical &r)=delete
 
SimuSpherical & operator= (const SimuSpherical &r)=delete
 
virtual ~SimuSpherical ()
 
int simulate (DbGrid *db, Model *model, const SimuSphericalParam &sphepar, int iptr, bool verbose=false)
 
VectorDouble simulate_mesh (MeshSpherical *mesh, Model *model, const SimuSphericalParam &sphepar, bool verbose=false)
 
- Public Member Functions inherited from ACalcSimulation
 ACalcSimulation (int nbimu, int seed=4324324)
 
 ACalcSimulation (const ACalcSimulation &r)=delete
 
ACalcSimulation & operator= (const ACalcSimulation &r)=delete
 
virtual ~ACalcSimulation ()
 
int getSeed () const
 
int getNbSimu () const
 
void setSeed (int seed)
 
void setNbSimu (int nbsimu)
 
- Public Member Functions inherited from ACalcInterpolator
 ACalcInterpolator ()
 
 ACalcInterpolator (const ACalcInterpolator &r)=delete
 
ACalcInterpolator & operator= (const ACalcInterpolator &r)=delete
 
virtual ~ACalcInterpolator ()
 
void setModel (Model *model)
 
void setNeigh (ANeigh *neigh)
 
Model * getModel () const
 
ANeigh * getNeigh () const
 
bool hasModel (bool verbose=true) const
 
bool hasNeigh (bool verbose=true) const
 
- Public Member Functions inherited from ACalcDbToDb
 ACalcDbToDb (bool mustShareSameSpaceDimension=true)
 
 ACalcDbToDb (const ACalcDbToDb &r)=delete
 
ACalcDbToDb & operator= (const ACalcDbToDb &r)=delete
 
virtual ~ACalcDbToDb ()
 
void setDbin (Db *dbin)
 
void setDbout (Db *dbout)
 
void setNamingConvention (const NamingConvention &namconv)
 
void setMustShareSpaceDimension (bool mustShareSpaceDimension)
 
Db * getDbin () const
 
Db * getDbout () const
 
DbGrid * getGridin () const
 
DbGrid * getGridout () const
 
bool hasDbin (bool verbose=true) const
 
bool hasDbout (bool verbose=true) const
 
bool isGridIn (bool verbose=true) const
 
bool isGridOut (bool verbose=true) const
 
- Public Member Functions inherited from ACalculator
 ACalculator ()
 
 ACalculator (const ACalculator &r)=delete
 
ACalculator & operator= (const ACalculator &r)=delete
 
virtual ~ACalculator ()
 
bool run ()
 

Private Member Functions

virtual bool _run () override
 
VectorDouble _spectrum_chentsov (const SimuSphericalParam &sphepar)
 
VectorDouble _spectrum_exponential (Model *model, const SimuSphericalParam &sphepar)
 
VectorDouble _spectrum_any (Model *model, const SimuSphericalParam &sphepar)
 
void _spectrum_normalize (int verbose, VectorDouble &freqs)
 
int _gdiscrete (VectorDouble &freqs)
 
int _check_degree_order (const VectorDouble &freqs, VectorInt &degree, VectorInt &order, int verbose)
 

Additional Inherited Members

- Protected Member Functions inherited from ACalcSimulation
virtual bool _check () override
 
virtual bool _preprocess () override
 
- Protected Member Functions inherited from ACalcInterpolator
virtual int _getNDim () const override
 
virtual int _getNVar () const override
 
virtual int _getNCova () const
 
int _centerDataToGrid (DbGrid *dbgrid)
 
- Protected Member Functions inherited from ACalcDbToDb
int _addVariableDb (int whichDb, int status, const ELoc &locatorType, int locatorIndex=0, int number=1, double valinit=0.)
 
void _renameVariable (int whichDb, int nvar, int iptr, const String &name, int count, bool flagSetLocator=true, int shift=0)
 
void _storeInVariableList (int whichDb, int status, const VectorInt &iuids)
 
int _expandInformation (int mode, const ELoc &locatorType)
 
void _cleanVariableDb (int status)
 
Db * _whichDb (int whichDb)
 
String _identifyVariable (int iuid) const
 
- Protected Member Functions inherited from ACalculator
virtual bool _postprocess ()
 
virtual void _rollback ()
 

Constructor & Destructor Documentation

◆ SimuSpherical() [1/2]

SimuSpherical::SimuSpherical ( int  nbsimu = 1,
int  seed = 4324324 
)

◆ SimuSpherical() [2/2]

SimuSpherical::SimuSpherical ( const SimuSpherical &  r)
delete

◆ ~SimuSpherical()

SimuSpherical::~SimuSpherical ( )
virtual

Member Function Documentation

◆ _check_degree_order()

int SimuSpherical::_check_degree_order ( const VectorDouble &  freqs,
VectorInt &  degree,
VectorInt &  order,
int  verbose 
)
private

Check the degrees and orders

Returns
Error code
Parameters
[in]freqsVector of frequencies
[in]degreeArray of degrees
[in]orderArray of orders
[in]verboseVerbose flag

◆ _gdiscrete()

int SimuSpherical::_gdiscrete ( VectorDouble &  freqs)
private

Simulates the discrete distribution on 0,1,...,n

Parameters
[in]freqsArray of frequencies (which add up to 1)

◆ _run()

bool SimuSpherical::_run ( )
overrideprivatevirtual

Implements ACalculator.

◆ _spectrum_any()

VectorDouble SimuSpherical::_spectrum_any ( Model *  model,
const SimuSphericalParam &  sphepar 
)
private

Generate the spectrum for any covariance

Returns
The array 'freqs' or NULL
Parameters
[in]modelModel (defined in Euclidean space) to be used
[in]spheparSimuSphericalParam structure

◆ _spectrum_chentsov()

VectorDouble SimuSpherical::_spectrum_chentsov ( const SimuSphericalParam &  sphepar)
private

Generate the spectrum for Chentsov

Returns
The array 'freqs' or NULL
Parameters
[in]spheparSimuSphericalParam structure

◆ _spectrum_exponential()

VectorDouble SimuSpherical::_spectrum_exponential ( Model *  model,
const SimuSphericalParam &  sphepar 
)
private

Generate the spectrum for Exponential

Returns
The array 'freqs' or NULL
Parameters
[in]modelModel (used for its range)
[in]spheparSimuSphericalParam structure

◆ _spectrum_normalize()

void SimuSpherical::_spectrum_normalize ( int  verbose,
VectorDouble &  freqs 
)
private

Normalize the spectrum

Parameters
[in]verboseVerbose flag
[out]freqsArray of frequencies

◆ operator=()

SimuSpherical& SimuSpherical::operator= ( const SimuSpherical &  r)
delete

◆ simulate()

int SimuSpherical::simulate ( DbGrid *  db,
Model *  model,
const SimuSphericalParam &  sphepar,
int  iptr,
bool  verbose = false 
)

◆ simulate_mesh()

VectorDouble SimuSpherical::simulate_mesh ( MeshSpherical *  mesh,
Model *  model,
const SimuSphericalParam &  sphepar,
bool  verbose = false 
)

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