1.8.0
CCC
 
Loading...
Searching...
No Matches
gstlrn::DbMeshStandard Class Reference

Class containing the Data Information organized as a General Meshing. More...

#include <DbMeshStandard.hpp>

Inheritance diagram for gstlrn::DbMeshStandard:
gstlrn::Db gstlrn::AStringable gstlrn::ASerializable gstlrn::ICloneable

Detailed Description

Class containing the Data Information organized as a General Meshing.

This class is derived from the Db class, with a specific decoration: samples or 'nodes' are connected via oriented the 'meshing' information which is stored in this class.

Public Member Functions

 DbMeshStandard (Id ndim=0, Id napexpermesh=1, const 1 &apices=1(), const 1 &meshes=1(), const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const 1 &tab=1(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool verbose=false)
 
 DbMeshStandard (const DbMeshStandard &r)
 
DbMeshStandardoperator= (const DbMeshStandard &r)
 
virtual ~DbMeshStandard ()
 
String toString (const AStringFormat *strfmt=nullptr) const override
 ICloneable interface.
 
bool isMesh () const override
 Db Interface.
 
bool mayChangeSampleNumber () const override
 
bool isConsistent () const override
 Check if the contents of private member of this class is compatible with the number of samples stored in the DbGrid.
 
Id getNApices () const
 
Id getNMeshes () const
 
Id getApex (Id imesh, Id rank) const
 
double getCoor (Id imesh, Id rank, Id idim) const
 
void getCoordinatesPerMeshInPlace (Id imesh, Id rank, 1 &coords) const
 
double getApexCoor (Id i, Id idim) const
 
void getApexCoordinatesInPlace (Id i, 1 &coords) const
 
 getCoordinatesPerMesh (Id imesh, Id idim, bool flagClose=false) const
 
- Public Member Functions inherited from gstlrn::Db
 Db ()
 
 Db (const Db &r)
 
Dboperator= (const Db &r)
 
virtual ~Db ()
 
virtual bool isGrid () const
 Interface for Db.
 
virtual bool isLine () const
 
virtual double getCoordinate (Id iech, Id idim, bool flag_rotate=true) const
 
virtual void getCoordinatesInPlace (1 &coor, Id iech, bool flag_rotate=true) const
 Update the vector of coordinates (optimized manner) No check is done with respect to the dimension of the returned vector.
 
virtual double getUnit (Id idim=0) const
 
virtual Id getNDim () const
 
virtual void resetDims (Id ncol, Id nech)
 
Id resetFromSamples (Id nech, const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const 1 &tab=1(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool flagAddSampleRank=true)
 
Id resetFromCSV (const String &filename, bool verbose, const CSVformat &csvfmt, Id ncol_max=-1, Id nrow_max=-1, bool flagAddSampleRank=true)
 
Id resetFromBox (Id nech, const 1 &coormin, const 1 &coormax, Id ndim=2, double extend=0., Id seed=321415, bool flagAddSampleRank=true)
 
Id resetFromOnePoint (const 1 &tab=1(), bool flagAddSampleRank=true)
 
Id resetSamplingDb (const Db *dbin, double proportion=0, Id number=0, const VectorString &names=VectorString(), Id seed=23241, bool verbose=false, bool flagAddSampleRank=true)
 
Id resetReduce (const Db *dbin, const VectorString &names=VectorString(), const 1 &ranks=1(), bool verbose=false)
 
Id resetFromGridRandomized (const DbGrid *dbin, double randperc=0., bool flagAddSampleRank=true)
 
const std::vector< double > & getArrays () const
 
String getNameByLocator (const ELoc &locatorType, Id locatorIndex=0) const
 
String getNameByColIdx (Id icol) const
 
String getNameByUID (Id iuid) const
 
virtual void initThread () const
 
VectorString getName (const String &name) const
 
VectorString getNames (const VectorString &names) const
 
VectorString getNamesByLocator (const ELoc &locatorType) const
 
VectorString getNamesByColIdx (const 1 &icols) const
 
VectorString getNamesByUID (const 1 &iuids) const
 
VectorString getAllNames (bool excludeRankAndCoordinates=false, bool verbose=false) const
 
void setName (const String &old_name, const String &name)
 
void setName (const VectorString &list, const String &name)
 
void setNameByUID (Id iuid, const String &name)
 
void setNameByColIdx (Id icol, const String &name)
 
void setNameByLocator (const ELoc &locatorType, const String &name)
 
VectorString expandNameList (const VectorString &names) const
 
VectorString expandNameList (const String &names) const
 
VectorString identifyNames (const VectorString &names) const
 
Id getNUIDMax () const
 
Id getNColumn () const
 
Id getNSample (bool useSel=false) const
 
Id getNSampleActiveAndDefined (Id item) const
 
Id getNSampleActiveAndDefined (const String &name) const
 
Id getNSampleActive () const
 
Id getRankRelativeToAbsolute (Id irel) const
 
Id getRankAbsoluteToRelative (Id iabs) const
 
void clearLocators (const ELoc &locatorType)
 
void clearSelection ()
 
void setLocatorByUID (Id iuid, const ELoc &locatorType=ELoc::fromKey("UNKNOWN"), Id locatorIndex=0, bool cleanSameLocator=false)
 
void setLocatorByColIdx (Id icol, const ELoc &locatorType=ELoc::fromKey("UNKNOWN"), Id locatorIndex=0, bool cleanSameLocator=false)
 
void setLocator (const String &name, const ELoc &locatorType=ELoc::fromKey("UNKNOWN"), Id locatorIndex=0, bool cleanSameLocator=false)
 
void setLocators (const VectorString &names, const ELoc &locatorType=ELoc::fromKey("UNKNOWN"), Id locatorIndex=0, bool cleanSameLocator=false)
 
void setLocatorsByUID (Id number, Id iuid, const ELoc &locatorType=ELoc::fromKey("UNKNOWN"), Id locatorIndex=0, bool cleanSameLocator=false)
 
void setLocatorsByUID (const 1 &iuids, const ELoc &locatorType=ELoc::fromKey("UNKNOWN"), Id locatorIndex=0, bool cleanSameLocator=false)
 
void setLocatorsByColIdx (const 1 &icols, const ELoc &locatorType=ELoc::fromKey("UNKNOWN"), Id locatorIndex=0, bool cleanSameLocator=false)
 
void addColumnsByVVD (const 1 &tab, const String &radix, const ELoc &locatorType, Id locatorIndex=0, bool useSel=false)
 
Id addColumns (const 1 &tab, const String &radix="New", const ELoc &locatorType=ELoc::fromKey("UNKNOWN"), Id locatorIndex=0, bool useSel=false, double valinit=0., Id nvar=1)
 
Id addColumnsByConstant (Id nadd=1, double valinit=0., const String &radix="New", const ELoc &locatorType=ELoc::fromKey("UNKNOWN"), Id locatorIndex=0, Id nechInit=0)
 
Id addColumnsRandom (Id nadd, const String &radix="New", const ELoc &locatorType=ELoc::fromKey("Z"), Id locatorIndex=0, Id seed=1352, Id nechInit=0)
 
Id addSelection (const 1 &tab=1(), const String &name="NewSel", const String &combine="set")
 
Id addSelectionByVariable (const String &varname, double lower=TEST, double upper=TEST, const String &name="NewSel", const String &oldSelName="")
 Create a selection by testing a target variable against 'lower' and 'upper'.
 
Id addSelectionByRanks (const 1 &ranks, const String &name="NewSel", const String &combine="set")
 
Id addSelectionByLimit (const String &testvar, const Limits &limits=Limits(), const String &name="NewSel", const String &combine="set")
 
Id addSelectionFromDbByConvexHull (Db *db, double dilate=0., bool verbose=false, const NamingConvention &namconv=NamingConvention("Hull", true, true, true, ELoc::fromKey("SEL")))
 
Id addSelectionRandom (double prop, Id seed=138213, const String &name="NewSel", const String &combine="set")
 
Id addSamples (Id nadd, double valinit=TEST)
 
Id deleteSample (Id e_del)
 
Id deleteSamples (const 1 &e_dels)
 
void switchLocator (const ELoc &locatorType_in, const ELoc &locatorType_out)
 
Id getLastUID (Id number=0) const
 
String getLastName (Id number=0) const
 
Id getColIdx (const String &name) const
 
Id getColIdxByUID (Id iuid) const
 
Id getColIdxByLocator (const ELoc &locatorType, Id locatorIndex=0) const
 
 getColIdxs (const String &name) const
 
 getColIdxs (const VectorString &names) const
 
 getColIdxsByUID (const 1 &iuids) const
 
 getColIdxsByLocator (const ELoc &locatorType) const
 
void setColumn (const 1 &tab, const String &name, const ELoc &locatorType=ELoc::fromKey("UNKNOWN"), Id locatorIndex=0, bool useSel=false)
 
void setColumnByUIDOldStyle (const double *tab, Id iuid, bool useSel=false)
 
void setColumnByUID (const 1 &tab, Id iuid, bool useSel=false)
 
void setColumnByColIdx (const 1 &tab, Id icol, bool useSel=false)
 
void setColumnsByColIdx (const 1 &tabs, const 1 &icols, bool useSel=false)
 
void setColumnByColIdxOldStyle (const double *tab, Id icol, bool useSel=false)
 
void duplicateColumnByUID (Id iuid_in, Id iuid_out)
 
 getItem (const 1 &rows, const VectorString &colnames, bool useSel=false) const
 
 getItem (const 1 &rows, const String &colname, bool useSel=false) const
 
 getItem (const 1 &rows, const ELoc &locatorType, bool useSel=false) const
 
 getItem (const VectorString &colnames, bool useSel=false) const
 
 getItem (const String &colname, bool useSel=false) const
 
 getItem (const ELoc &locatorType, bool useSel=false) const
 
VectorString getItemNames (const VectorString &colnames) const
 
VectorString getItemNames (const String &colname) const
 
VectorString getItemNames (const ELoc &locatorType) const
 
Id setItem (const 1 &rows, const VectorString &colnames, const 1 &values, bool useSel=false)
 
Id setItem (const 1 &rows, const ELoc &locatorType, const 1 &values, bool useSel=false)
 
Id setItem (const VectorString &colnames, const 1 &values, bool useSel=false)
 
Id setItem (const ELoc &locatorType, const 1 &values, bool useSel=false)
 
Id setItem (const 1 &rows, const String &colname, const 1 &values, bool useSel=false)
 
Id setItem (const String &colname, const 1 &values, bool useSel=false)
 
bool getLocator (const String &name, ELoc *ret_locatorType, Id *ret_locatorIndex) const
 
bool getLocatorByColIdx (Id icol, ELoc *ret_locatorType, Id *ret_locatorIndex) const
 
bool getLocatorByUID (Id iuid, ELoc *ret_locatorType, Id *ret_locatorIndex) const
 
VectorString getLocators (bool anyLocator=true, const ELoc &locatorType=ELoc::fromKey("UNKNOWN")) const
 
bool isUIDDefined (Id iuid) const
 
Id getUID (const String &name) const
 
Id getUIDByColIdx (Id icol) const
 
Id getUIDByLocator (const ELoc &locatorType, Id locatorIndex=0) const
 
 getUIDs (const VectorString &names) const
 
 getUIDsByLocator (const ELoc &locatorType) const
 
 getUIDsByColIdx (const 1 &icols) const
 
 getAllUIDs () const
 
void getAllUIDs (1 &iuids) const
 
void copyByUID (Id iuidIn, Id iuidOut)
 
void copyByCol (Id icolIn, Id icolOut)
 
Id getNFacies (void) const
 
bool hasLocatorDefined (const String &name, const ELoc &locatorType, Id locatorIndex=0) const
 
 getSampleCoordinates (Id iech) const
 
void getSampleAsSPInPlace (SpacePoint &P, Id iabs) const
 In the SpacePoint 'P', define the sample rank and coordinates.
 
virtual void getSampleAsSTInPlace (Id iech, SpaceTarget &P) const
 
 getSampleLocators (const ELoc &locatorType, Id iech) const
 
 getIncrements (const 1 &iechs, const 1 &jechs) const
 
 getOneCoordinate (Id idim, bool useSel=false, bool flag_rotate=true) const
 
 getAllCoordinates (bool useSel=false) const
 
MatrixDense getAllCoordinatesMat (const MatrixDense &box=MatrixDense()) const
 
void setCoordinate (Id iech, Id idim, double value)
 
void setCoordinates (Id idim, const 1 &coor, bool useSel=false)
 
void setSampleCoordinates (Id iech, const 1 &coor)
 
double getDistance1D (Id iech, Id jech, Id idim=0, bool flagAbs=false) const
 
double getDistance (Id iech, Id jech) const
 
Id getDistanceVecInPlace (Id iech, Id jech, 1 &dd, const Db *db2=nullptr) const
 
double getValue (const String &name, Id iech) const
 
void setValue (const String &name, Id iech, double value)
 
double getArray (Id iech, Id iuid) const
 
void getArrayVec (const 1 &iechs, Id iuid, 1 &values) const
 
void setArray (Id iech, Id iuid, double value)
 
void setArrayVec (const 1 &iechs, Id iuid, const 1 &values)
 
void updArray (Id iech, Id iuid, const EOperator &oper, double value)
 
void updArrayVec (const 1 &iechs, Id iuid, const EOperator &oper, 1 &values)
 
 getArrayByUID (Id iuid, bool useSel=false) const
 
void setArrayByUID (const 1 &tab, Id iuid)
 
void getArrayBySample (std::vector< double > &vals, Id iech) const
 
void setArrayBySample (Id iech, const 1 &vec)
 
void getSamplesAsSP (std::vector< SpacePoint > &pvec, const ASpaceSharedPtr &space, bool useSel=false) const
 
void getSamplesFromNbghAsSP (std::vector< SpacePoint > &pvec, const 1 &nbgh) const
 
bool hasLocator (const ELoc &locatorType) const
 
double getFromLocator (const ELoc &locatorType, Id iech, Id locatorIndex=0) const
 
void setFromLocator (const ELoc &locatorType, Id iech, Id locatorIndex, double value)
 
double getValueByColIdx (Id iech, Id icol, bool flagCheck=true) const
 
const double * getColAdressByColIdx (Id icol) const
 
void setValueByColIdx (Id iech, Id icol, double value, bool flagCheck=true)
 
 getValuesByNames (const 1 &iechs, const VectorString &names, bool bySample=false) const
 
 getValuesByColIdx (const 1 &iechs, const 1 &icols, bool bySample=false) const
 
void setValuesByNames (const 1 &iechs, const VectorString &names, const 1 &values, bool bySample=false)
 
void setValuesByColIdx (const 1 &iechs, const 1 &icols, const 1 &values, bool bySample=false)
 
Id getNLoc (const ELoc &loctype) const
 
bool hasLocVariable (const ELoc &loctype) const
 
double getLocVariable (const ELoc &loctype, Id iech, Id item) const
 
void setLocVariable (const ELoc &loctype, Id iech, Id item, double value)
 
void updLocVariable (const ELoc &loctype, Id iech, Id item, const EOperator &oper, double value)
 
Id getNZValues () const
 
bool hasZVariable () const
 
double getZVariable (Id iech, Id item) const
 
void setZVariable (Id iech, Id item, double value)
 
void updZVariable (Id iech, Id item, const EOperator &oper, double value)
 
 getLocVariables (const ELoc &loctype, Id iech, Id nitemax=0) const
 
void setLocVariables (const ELoc &loctype, Id iech, const 1 &values)
 
bool isNVarComparedTo (Id nvar, Id compare=0) const
 
bool isIsotopic (Id iech, Id nvar_max=-1) const
 
bool isAllUndefined (Id iech) const
 
bool isAllUndefinedByType (const ELoc &loctype, Id iech) const
 
bool isAllIsotopic () const
 
void setInterval (Id iech, Id item, double rklow=TEST, double rkup=TEST)
 
Id getNInterval () const
 
void setBound (Id iech, Id item, double lower=TEST, double upper=TEST)
 
 getWithinBounds (Id item, bool useSel=false) const
 
 getGradient (Id item, bool useSel=false) const
 
 getTangent (Id item, bool useSel=false) const
 
 getCodeList (void) const
 
Id getSelection (Id iech) const
 
 getSelections (void) const
 
void getSampleRanksPerVariable (1 &ranks, const 1 &nbgh=1(), Id ivar=-1, bool useSel=true, bool useZ=true, bool useVerr=false, bool useExtD=true) const
 Create the vector of elligible sample ranks for the variable 'ivar'.
 
 getSampleRanks (const 1 &ivars=1(), const 1 &nbgh=1(), bool useSel=true, bool useZ=true, bool useVerr=false, bool useExtD=true) const
 
void getSampleRanksInPlace (1 &sampleRanks, const 1 &ivars=1(), const 1 &nbgh=1(), bool useSel=true, bool useZ=true, bool useVerr=false, bool useExtD=true) const
 
 getValuesByRanks (const 1 &sampleRanks, const 1 &means=1(), bool subtractMean=true) const
 
void getValuesByRanksInPlace (1 *values, const 1 &sampleRanks, const 1 &means=1(), bool subtractMean=true) const
 
Id getListOfSampleIndicesPerVariableInPlace (1 &ranks, Id ivar=0, bool useSel=true) const
 Returns the vector of indices for samples with variable 'ivar' defined For the target variable 'ivar' and for sample 'iech',.
 
Id getListOfSampleIndicesInPlace (Id nvar, 1 &cumul, 1 &ranks, bool useSel=true) const
 Updates (and resizes) the two arguments:
 
double getWeight (Id iech) const
 
 getWeights (bool useSel=false) const
 
double getSimvar (const ELoc &locatorType, Id iech, Id isimu, Id ivar, Id icase, Id nbsimu, Id nvar) const
 
void setSimvar (const ELoc &locatorType, Id iech, Id isimu, Id ivar, Id icase, Id nbsimu, Id nvar, double value)
 
void updSimvar (const ELoc &locatorType, Id iech, Id isimu, Id ivar, Id icase, Id nbsimu, Id nvar, const EOperator &oper, double value)
 
bool isActive (Id iech) const
 
bool isActiveDomain (Id iech) const
 
bool isActiveAndDefined (Id iech, Id item) const
 
VectorBool getActiveArray () const
 
 getSortArray () const
 
double getCosineToDirection (Id iech1, Id iech2, const 1 &codir) const
 
 getColumn (const String &name, bool useSel=false, bool flagCompress=true) const
 
 getColumnByUID (Id iuid, bool useSel=false, bool flagCompress=true) const
 
 getColumnByLocator (const ELoc &locatorType, Id locatorIndex=0, bool useSel=false, bool flagCompress=true) const
 
 getColumnByColIdx (Id icol, bool useSel=false, bool flagCompress=true) const
 
 getAllColumns (bool useSel=false, bool flagCompress=true) const
 
 getColumns (const VectorString &names=VectorString(), bool useSel=false, bool flagCompress=true, const 1 &origins=1()) const
 
 getColumnsAsVVD (const VectorString &names=VectorString(), bool useSel=false, bool flagCompress=true) const
 
MatrixDense getColumnsAsMatrix (const VectorString &names, bool useSel=false, bool flagCompress=true) const
 
 getColumnsByColIdx (const 1 &icols=1(), bool useSel=false, bool flagCompress=true, const 1 &origins=1()) const
 
 getColumnsByColIdxInterval (Id icol_beg, Id icol_end, bool useSel=false, bool flagCompress=true) const
 
 getColumnsActiveAndDefined (const ELoc &locatorType, const 1 &origins=1()) const
 
 getColumnsByLocator (const ELoc &locatorType, bool useSel=false, bool flagCompress=true, const 1 &origins=1()) const
 
 getColumnsByUID (const 1 &iuids, bool useSel=false, bool flagCompress=true, const 1 &origins=1()) const
 
 getColumnsByUIDInterval (Id iuid_beg, Id iuid_end, bool useSel=false, bool flagCompress=true) const
 
void setAllColumns (const 1 &tabs)
 
void deleteColumn (const String &name)
 
void deleteColumnByUID (Id iuid_del)
 
void deleteColumnByColIdx (Id icol_del)
 
void deleteColumns (const VectorString &names)
 
void deleteColumnsByLocator (const ELoc &locatorType)
 
void deleteColumnsByUID (const 1 &iuids)
 
void deleteColumnsByColIdx (const 1 &icols)
 
void deleteColumnsByUIDRange (Id i_del, Id n_del)
 
 getExtrema (Id idim, bool useSel=false) const
 
 getExtremas (bool useSel=false) const
 
 getExtends (bool useSel=false) const
 
 getCoorMinimum (bool useSel=false) const
 
 getCoorMaximum (bool useSel=false) const
 
double getExtension (Id idim, bool useSel=false) const
 
double getExtensionDiagonal (bool useSel=false) const
 
double getCenter (Id idim, bool useSel=false) const
 
 getCenters (bool useSel=false) const
 
void getExtensionInPlace (1 &mini, 1 &maxi, bool flagPreserve=false, bool useSel=false) const
 
double getMinimum (const String &name, bool useSel=false) const
 
double getMaximum (const String &name, bool useSel=false) const
 
 getRange (const String &name, bool useSel=false) const
 
double getMean (const String &name, bool useSel=false) const
 
double getVariance (const String &name, bool useSel=false) const
 
double getStdv (const String &name, bool useSel=false) const
 
double getCorrelation (const String &name1, const String &name2, bool useSel=false) const
 
bool hasSameDimension (const Db *dbaux) const
 
bool hasLargerDimension (const Db *dbaux) const
 
bool isColIdxValid (Id icol) const
 
bool isUIDValid (Id iuid) const
 
bool isSampleIndexValid (Id iech) const
 
bool isSampleIndicesValid (const 1 &iechs, bool useSel=false) const
 
bool isLocatorIndexValid (const ELoc &locatorType, Id locatorIndex) const
 
bool isDimensionIndexValid (Id idim) const
 
void combineSelection (1 &sel, const String &combine="set") const
 
void generateRank (const String &radix="rank")
 
 shrinkToValidRows (const 1 &rows) const
 
 shrinkToValidCols (const 1 &cols) const
 
void statisticsBySample (const VectorString &names, const std::vector< EStatOption > &opers=EStatOption::fromKeys({"MEAN"}), bool flagIso=true, double proba=TEST, double vmin=TEST, double vmax=TEST, const NamingConvention &namconv=NamingConvention("Stats"))
 
 statisticsMulti (const VectorString &names, bool flagIso=true, bool verbose=false, const String &title="")
 
bool areSame (const String &name1, const String &name2, double eps=EPSILON3, bool useSel=true, bool verbose=false) const
 
 filter (const String &name, const Interval &interval, Id belowRow=ITEST, Id aboveRow=ITEST) const
 
Table printOneSample (Id iech, const VectorString &names=VectorString(), bool excludeCoordinates=true, bool skipTitle=false) const
 
void dumpGeometry (Id iech, Id jech) const
 
- Public Member Functions inherited from gstlrn::AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (Id level) const final
 
- Public Member Functions inherited from gstlrn::ASerializable
 ASerializable ()
 
 ASerializable (const ASerializable &r)
 
ASerializableoperator= (const ASerializable &r)
 
 ASerializable (ASerializable &&r) noexcept
 
ASerializableoperator= (ASerializable &&r) noexcept
 
virtual ~ASerializable ()
 
bool dumpToNF (const String &NFFilename, const EFormatNF &format=EFormatNF::fromKey("DEFAULT"), bool verbose=false) const
 Dump the contents of an object into an Output File using a given Output NF Format.
 
void setDefaultFormatNF (const EFormatNF &format)
 
- Public Member Functions inherited from gstlrn::ICloneable
 ICloneable ()
 
virtual ~ICloneable ()
 
virtual ICloneableclone () const =0
 
std::shared_ptr< ICloneablecloneShared () const
 
std::unique_ptr< ICloneablecloneUnique () const
 

Static Public Member Functions

static DbMeshStandardcreate (Id ndim, Id napexpermesh, const 1 &apices, const 1 &meshes, const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const 1 &tab=1(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool verbose=false)
 
static DbMeshStandardcreateFromNF (const String &NFFilename, bool verbose=true)
 
static DbMeshStandardcreateFromExternal (const MatrixDense &apices, const MatrixInt &meshes, const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const 1 &tab=1(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool verbose=false)
 
- Static Public Member Functions inherited from gstlrn::Db
static Dbcreate ()
 
static DbcreateFromNF (const String &NFFilename, bool verbose=true)
 
static DbcreateFromSamples (Id nech, const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const 1 &tab=1(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool flagAddSampleRank=true)
 
static DbcreateFromCSV (const String &filename, const CSVformat &csv=CSVformat(), bool verbose=false, Id ncol_max=-1, Id nrow_max=-1, bool flagAddSampleRank=true)
 
static DbcreateFromBox (Id nech, const 1 &coormin, const 1 &coormax, Id seed=43241, bool flag_exact=true, bool flag_repulsion=false, double range=0., double beta=0., double extend=0., bool flagAddSampleRank=true)
 
static DbcreateFromOnePoint (const 1 &tab=1(), bool flagAddSampleRank=true)
 
static DbcreateSamplingDb (const Db *dbin, double proportion=0., Id number=0, const VectorString &names=VectorString(), Id seed=23241, bool verbose=false, bool flagAddSampleRank=true)
 
static DbcreateFromDbGrid (Id nech, DbGrid *dbgrid, Id seed=432423, bool flag_exact=true, bool flag_repulsion=false, double range=0., double beta=0., bool flagAddSampleRank=true)
 
static DbcreateReduce (const Db *dbin, const VectorString &names=VectorString(), const 1 &ranks=1(), bool verbose=false)
 
static DbcreateFillRandom (Id ndat, Id ndim=2, Id nvar=1, Id nfex=0, Id ncode=0, double varmax=0., double selRatio=0., const 1 &heteroRatio=1(), const 1 &coormin=1(), const 1 &coormax=1(), Id seed=124234, bool flagAddSampleRank=true)
 
static DbcreateEmpty (Id ndat, Id ndim=2, Id nvar=1, Id nfex=0, Id ncode=0, bool flagVerr=false, bool flagSel=false, bool flagAddSampleRank=true)
 
static DbcreateFromGridRandomized (DbGrid *dbgrid, double randperc=0., bool flagAddSampleRank=true)
 
static Id getNEloc ()
 
static getMultipleSelectedRanks (const 1 &index, const 1 &ivars=1(), const 1 &nbgh=1())
 Return the vector of the ranks within 'index' of data beloging:
 
static getMultipleSelectedVariables (const 1 &index, const 1 &ivars=1(), const 1 &nbgh=1())
 
static Id getSimRank (Id isimu, Id ivar, Id icase, Id nbsimu, Id nvar)
 
static const DbcoverSeveralDbs (const Db *db1, const Db *db2, bool *isBuilt)
 
- Static Public Member Functions inherited from gstlrn::ASerializable
static String buildFileName (Id status, const String &filename, bool ensureDirExist=false)
 
static String getFileIdentity (const String &filename, bool verbose=false)
 
static void setPrefixName (const String &prefixName)
 
static void unsetPrefixName ()
 
static const StringgetPrefixName ()
 

Additional Inherited Members

- Public Attributes inherited from gstlrn::Db
 DECLARE_TOTL
 Has a specific implementation in the Target language.
 

Constructor & Destructor Documentation

◆ DbMeshStandard() [1/2]

gstlrn::DbMeshStandard::DbMeshStandard ( Id  ndim = 0,
Id  napexpermesh = 1,
const 1 &  apices = 1(),
const 1 &  meshes = 1(),
const ELoadBy &  order = ELoadBy::fromKey("SAMPLE"),
const 1 &  tab = 1(),
const VectorString names = VectorString(),
const VectorString locatorNames = VectorString(),
bool  verbose = false 
)

◆ DbMeshStandard() [2/2]

gstlrn::DbMeshStandard::DbMeshStandard ( const DbMeshStandard r)

◆ ~DbMeshStandard()

gstlrn::DbMeshStandard::~DbMeshStandard ( )
virtual

Member Function Documentation

◆ create()

DbMeshStandard * gstlrn::DbMeshStandard::create ( Id  ndim,
Id  napexpermesh,
const 1 &  apices,
const 1 &  meshes,
const ELoadBy &  order = ELoadBy::fromKey("SAMPLE"),
const 1 &  tab = 1(),
const VectorString names = VectorString(),
const VectorString locatorNames = VectorString(),
bool  verbose = false 
)
static

◆ createFromExternal()

DbMeshStandard * gstlrn::DbMeshStandard::createFromExternal ( const MatrixDense apices,
const MatrixInt meshes,
const ELoadBy &  order = ELoadBy::fromKey("SAMPLE"),
const 1 &  tab = 1(),
const VectorString names = VectorString(),
const VectorString locatorNames = VectorString(),
bool  verbose = false 
)
static

◆ createFromNF()

DbMeshStandard * gstlrn::DbMeshStandard::createFromNF ( const String NFFilename,
bool  verbose = true 
)
static

Create a DbMesh by loading the contents of a Neutral File

Parameters
NFFilenameName of the Neutral File (DbMesh format)
verboseVerbose
Remarks
The name does not need to be completed in particular when defined by absolute path
or read from the Data Directory (in the gstlearn distribution)

◆ getApex()

Id gstlrn::DbMeshStandard::getApex ( Id  imesh,
Id  rank 
) const
inline

◆ getApexCoor()

double gstlrn::DbMeshStandard::getApexCoor ( Id  i,
Id  idim 
) const

◆ getApexCoordinatesInPlace()

void gstlrn::DbMeshStandard::getApexCoordinatesInPlace ( Id  i,
1 &  coords 
) const

◆ getCoor()

double gstlrn::DbMeshStandard::getCoor ( Id  imesh,
Id  rank,
Id  idim 
) const

◆ getCoordinatesPerMesh()

gstlrn::DbMeshStandard::getCoordinatesPerMesh ( Id  imesh,
Id  idim,
bool  flagClose = false 
) const

◆ getCoordinatesPerMeshInPlace()

void gstlrn::DbMeshStandard::getCoordinatesPerMeshInPlace ( Id  imesh,
Id  rank,
1 &  coords 
) const

◆ getNApices()

Id gstlrn::DbMeshStandard::getNApices ( ) const
inline

◆ getNMeshes()

Id gstlrn::DbMeshStandard::getNMeshes ( ) const
inline

◆ isConsistent()

bool gstlrn::DbMeshStandard::isConsistent ( ) const
overridevirtual

Check if the contents of private member of this class is compatible with the number of samples stored in the DbGrid.

Returns
true if everything is OK; false if a problem occurs

Reimplemented from gstlrn::Db.

◆ isMesh()

bool gstlrn::DbMeshStandard::isMesh ( ) const
inlineoverridevirtual

Db Interface.

Reimplemented from gstlrn::Db.

◆ mayChangeSampleNumber()

bool gstlrn::DbMeshStandard::mayChangeSampleNumber ( ) const
inlineoverridevirtual

Reimplemented from gstlrn::Db.

◆ operator=()

DbMeshStandard & gstlrn::DbMeshStandard::operator= ( const DbMeshStandard r)

◆ toString()

String gstlrn::DbMeshStandard::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

ICloneable interface.

AStringable Interface

Reimplemented from gstlrn::Db.


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