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

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

#include <DbMeshTurbo.hpp>

Inheritance diagram for gstlrn::DbMeshTurbo:
gstlrn::DbGrid gstlrn::Db gstlrn::AStringable gstlrn::ASerializable gstlrn::ICloneable

Detailed Description

Class containing the Data Information organized as a Turbo Meshing.

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

Note that in this particular case of Turbo Meshing, the Db must be organized as a grid and the information regarding the meshing is minimum.

Public Member Functions

 DbMeshTurbo (const 1 &nx=1(), const 1 &dx=1(), const 1 &x0=1(), const 1 &angles=1(), const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const 1 &tab=1(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool flag_polarized=false, bool verbose=false, Id mode=1)
 
 DbMeshTurbo (const DbMeshTurbo &r)
 
DbMeshTurbooperator= (const DbMeshTurbo &r)
 
virtual ~DbMeshTurbo ()
 
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::DbGrid
 DbGrid ()
 
 DbGrid (const DbGrid &r)
 
DbGridoperator= (const DbGrid &r)
 
virtual ~DbGrid ()
 
bool isGrid () const override
 Db Interface.
 
double getCoordinate (Id iech, Id idim, bool flag_rotate=true) const override
 
void getCoordinatesInPlace (1 &coor, Id iech, bool flag_rotate=true) const override
 Update the vector of coordinates (optimized manner) No check is done with respect to the dimension of the returned vector.
 
double getUnit (Id idim=0) const override
 
Id getNDim () const override
 
void resetDims (Id ncol, Id nech) override
 
Id reset (const 1 &nx, const 1 &dx=1(), const 1 &x0=1(), const 1 &angles=1(), const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const 1 &tab=1(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool flagAddSampleRank=true, bool flagAddCoordinates=true)
 
Id resetCoveringDb (const Db *db, const 1 &nx=1(), const 1 &dx=1(), const 1 &x0=1(), const 1 &margin=1())
 
Id resetFromPolygon (Polygons *polygon, const 1 &nodes, const 1 &dcell, bool flagAddSampleRank=true)
 
DbGridcoarsify (const 1 &nmult)
 
DbGridrefine (const 1 &nmult)
 
bool migrateAllVariables (Db *dbin, bool flag_fill=true, bool flag_inter=true, bool flag_ball=false, bool flagAddSampleRank=true)
 
const GridgetGrid () const
 
void generateCoordinates (const String &radix="x")
 
 getColumnSubGrid (const String &name, Id idim0, Id rank, bool useSel=false)
 
Id gridDefine (const 1 &nx, const 1 &dx=1(), const 1 &x0=1(), const 1 &angles=1())
 
void gridCopyParams (Id mode, const Grid &gridaux)
 
bool isSameGrid (const Grid &grid) const
 
bool isSameGridMesh (const DbGrid &dbaux) const
 
bool isSameGridRotation (const DbGrid &dbaux) const
 
bool isGridRotated () const
 
Id getNTotal () const
 
double getCellSize () const
 
double getVolume () const
 
 getExtends () const
 
double getExtend (Id idim) const
 
Id getNX (Id idim) const
 
 getNXs () const
 
 getNXsExt (Id ndimMax) const
 
bool hasSingleBlock () const
 
double getDX (Id idim) const
 
 getDXs () const
 
double getX0 (Id idim) const
 
 getX0s () const
 
double getAngle (Id idim) const
 
 getAngles () const
 
 getRotMat () const
 
void setNX (Id idim, Id value)
 
void setX0 (Id idim, double value)
 
void setDX (Id idim, double value)
 
 getGridAxis (Id idim) const
 
 getCoordinateFromCorner (const 1 &icorner) const
 
void getCoordinateFromCornerInPlace (1 &coor, const 1 &icorner) const
 
 getCoordinatesByIndice (const 1 &indice, bool flag_rotate=true, const 1 &shift=1(), const 1 &dxsPerCell=1()) const
 
void getCoordinatesByIndiceInPlace (1 &coor, const 1 &indice, bool flag_rotate=true, const 1 &shift=1(), const 1 &dxsPerCell=1()) const
 
 getCoordinatesPerSample (Id iech, bool flag_rotate=true) const
 
void getCoordinatesPerSampleInPlace (1 &coor, Id iech, bool flag_rotate=true) const
 
Id coordinateToRank (const 1 &coor, bool centered=false, double eps=EPSILON6) const
 
 coordinateToIndices (const 1 &coor, bool centered=false, double eps=EPSILON6) const
 
Id coordinateToIndicesInPlace (const 1 &coor, 1 &indices, bool centered=false, double eps=EPSILON6) const
 
 getCenterIndices (bool flagSup=false) const
 
Id indiceToRank (const 1 &indice) const
 
void rankToIndice (Id node, 1 &indices, bool minusOne=false) const
 
void rankToCoordinatesInPlace (Id rank, 1 &coor, const 1 &percent=1()) const
 
 rankToCoordinates (Id rank, const 1 &percent=1()) const
 
void indicesToCoordinateInPlace (const 1 &indice, 1 &coor, const 1 &percent=1()) const
 
 indicesToCoordinate (const 1 &indice, const 1 &percent=1()) const
 
bool sampleBelongsToCell (const 1 &coor, Id rank, const 1 &dxsPerCell=1()) const
 
Id centerCoordinateInPlace (1 &coor, bool centered=false, bool stopIfOut=false, double eps=EPSILON6) const
 
 locateDataInGrid (const Db *data, const 1 &rankIn=1(), bool centered=false, bool useSel=false) const
 
Id getMirrorIndex (Id idim, Id ix) const
 
 getSlice (const String &name, Id pos=0, Id indice=0, bool useSel=false) const
 
 getOneSlice (const String &name, Id posx=0, Id posy=1, const 1 &corner=1(), bool useSel=false) const
 
 getOneSliceForCoordinate (Id idim, Id posx=0, Id posy=1, const 1 &corner=1(), bool useSel=false) const
 
Id assignGridColumn (const String &name, Id idim, Id rank, double value, bool useSel=false)
 
 getBlockExtensions (Id node) const
 
 getCellEdges (Id node=0, bool forceGridMesh=false) const
 
 getAllCellsEdges (bool forceGridMesh=false) const
 
 getGridEdges () const
 
 getCodir (const 1 &grincr) const
 
 getLimitsFromVariableExtend (const String &nameTop, const String &nameBot, const 1 &dimExclude=1()) const
 
Id setSelectionFromVariableExtend (const String &nameTop, const String &nameBot)
 
void clean3DFromSurfaces (const VectorString &names, const DbGrid *surf2D, const String &nameTop=String(), const String &nameBot=String(), bool verbose=false)
 
Id morpho (const EMorpho &oper, double vmin=0.5, double vmax=1.5, Id option=0, const 1 &radius=1(), bool flagDistErode=false, bool verbose=false, const NamingConvention &namconv=NamingConvention("Morpho"))
 
Id smooth (ANeigh *neigh, Id type=1, double range=1., const NamingConvention &namconv=NamingConvention("Smooth"))
 
Id addSelectionFromDbByMorpho (Db *db, Id nmin=0, Id radius=0, Id option=0, const 1 &dilation=1(), bool verbose=false, const NamingConvention &namconv=NamingConvention("Morpho", false, false, true, ELoc::fromKey("SEL")))
 
void getSampleAsSTInPlace (Id iech, SpaceTarget &P) const override
 
 getDiscretizedBlock (const 1 &ndiscs, Id iech=0, bool flagPerCell=false, bool flagRandom=false, Id seed=132433) const
 
void getGridPileInPlace (Id iuid, const 1 &indg, Id idim0, 1 &vec) const
 
void setGridPileInPlace (Id iuid, const 1 &indg, Id idim0, const 1 &vec)
 
 getDistanceToOrigin (const 1 &origin, const 1 &radius=1())
 
void initThread () const override
 
- Public Member Functions inherited from gstlrn::Db
 Db ()
 
 Db (const Db &r)
 
Dboperator= (const Db &r)
 
virtual ~Db ()
 
virtual bool isLine () const
 
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
 
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.
 
 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 DbMeshTurbocreate (const 1 &nx, const 1 &dx=1(), const 1 &x0=1(), const 1 &angles=1(), const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const 1 &tab=1(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool flag_polarized=false, bool verbose=false)
 
static DbMeshTurbocreateFromNF (const String &NFFilename, bool verbose=true)
 
- Static Public Member Functions inherited from gstlrn::DbGrid
static DbGridcreateFromNF (const String &NFFilename, bool verbose=true)
 
static DbGridcreate (const 1 &nx, const 1 &dx=1(), const 1 &x0=1(), const 1 &angles=1(), const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const 1 &tab=1(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool flagAddSampleRank=true, bool flagAddCoordinates=true)
 
static DbGridcreateCoveringDb (const Db *dbin, const 1 &nx=1(), const 1 &dx=1(), const 1 &x0=1(), const 1 &margin=1())
 
static DbGridcreateFromPolygon (Polygons *polygon, const 1 &nodes, const 1 &dcell, bool flagAddSampleRank=true)
 
static DbGridcreateCoarse (DbGrid *dbin, const 1 &nmult, bool flagCell=true, bool flagAddSampleRank=true)
 
static DbGridcreateRefine (DbGrid *dbin, const 1 &nmult, bool flagCell=true, bool flagAddSampleRank=true)
 
static DbGridcreateFromGridExtend (const DbGrid &gridIn, const VectorString &tops, const VectorString &bots, const 1 &nxnew, bool verbose=false, double eps=EPSILON3)
 
static DbGridcreateFromGridShrink (const DbGrid &gridIn, const 1 &deletedRanks)
 
static DbGridcreateGrid2D (const ELoadBy &order, Id nx, Id ny, double x0=0., double y0=0., double dx=1., double dy=1., double angle=0., bool flagAddSampleRank=true, const 1 &tab=1())
 
static DbGridcreateSqueezeAndStretchForward (const DbGrid *grid3Din, const DbGrid *surf2D, const String &nameTop, const String &nameBot, const VectorString &names, Id nzout, double thickmin=0.)
 
static DbGridcreateSqueezeAndStretchBackward (const DbGrid *grid3Din, const DbGrid *surf2D, const String &nameTop, const String &nameBot, const VectorString &names, Id nzout, double z0out, double dzout)
 
static DbGridcreateSubGrid (const DbGrid *gridin, 1 limits, bool flagAddCoordinates=false)
 
static DbGridcreateMultiple (DbGrid *dbin, const 1 &nmult, bool flagAddSampleRank)
 
static DbGridcreateDivider (DbGrid *dbin, const 1 &nmult, bool flagAddSampleRank)
 
static DbGridcreateFillRandom (const 1 &nx, Id nvar=1, Id nfex=0, Id ncode=0, double varmax=0., double selRatio=0., const 1 &heteroRatio=1(), const 1 &means=1(), const 1 &x0=1(), Id seed=1367843)
 
- 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

◆ DbMeshTurbo() [1/2]

gstlrn::DbMeshTurbo::DbMeshTurbo ( const 1 &  nx = 1(),
const 1 &  dx = 1(),
const 1 &  x0 = 1(),
const 1 &  angles = 1(),
const ELoadBy &  order = ELoadBy::fromKey("SAMPLE"),
const 1 &  tab = 1(),
const VectorString names = VectorString(),
const VectorString locatorNames = VectorString(),
bool  flag_polarized = false,
bool  verbose = false,
Id  mode = 1 
)

◆ DbMeshTurbo() [2/2]

gstlrn::DbMeshTurbo::DbMeshTurbo ( const DbMeshTurbo r)

◆ ~DbMeshTurbo()

gstlrn::DbMeshTurbo::~DbMeshTurbo ( )
virtual

Member Function Documentation

◆ create()

DbMeshTurbo * gstlrn::DbMeshTurbo::create ( const 1 &  nx,
const 1 &  dx = 1(),
const 1 &  x0 = 1(),
const 1 &  angles = 1(),
const ELoadBy &  order = ELoadBy::fromKey("SAMPLE"),
const 1 &  tab = 1(),
const VectorString names = VectorString(),
const VectorString locatorNames = VectorString(),
bool  flag_polarized = false,
bool  verbose = false 
)
static

◆ createFromNF()

DbMeshTurbo * gstlrn::DbMeshTurbo::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::DbMeshTurbo::getApex ( Id  imesh,
Id  rank 
) const
inline

◆ getApexCoor()

double gstlrn::DbMeshTurbo::getApexCoor ( Id  i,
Id  idim 
) const
inline

◆ getApexCoordinatesInPlace()

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

◆ getCoor()

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

◆ getCoordinatesPerMesh()

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

◆ getCoordinatesPerMeshInPlace()

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

◆ getNApices()

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

◆ getNMeshes()

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

◆ isConsistent()

bool gstlrn::DbMeshTurbo::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::DbGrid.

◆ isMesh()

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

Db Interface.

Reimplemented from gstlrn::Db.

◆ mayChangeSampleNumber()

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

Reimplemented from gstlrn::DbGrid.

◆ operator=()

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

◆ toString()

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

ICloneable interface.

AStringable Interface

Reimplemented from gstlrn::DbGrid.


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