gstlearn
1.0.0
Geostatistics & Machine Learning toolbox | https://gstlearn.org
|
#include <RuleShift.hpp>
Public Member Functions | |
RuleShift () | |
RuleShift (const RuleShift &r) | |
RuleShift & | operator= (const RuleShift &r) |
virtual | ~RuleShift () |
String | displaySpecific () const override |
int | resetFromNodes (const VectorInt &nodes, const VectorDouble &shift) |
int | resetFromNames (const VectorString &nodnames, const VectorDouble &shift) |
int | resetFromFaciesCount (int nfacies, const VectorDouble &shift) |
int | resetFromNumericalCoding (const VectorInt &n_type, const VectorInt &n_facs, const VectorDouble &shift) |
int | particularities (Db *db, const Db *dbprop, Model *model, int flag_grid_check, int flag_stat) const override |
int | gaus2facResult (PropDef *propdef, Db *dbout, int *flag_used, int ipgs, int isimu, int nbsimu) const override |
int | evaluateBounds (PropDef *propdef, Db *dbin, Db *dbout, int isimu, int igrf, int ipgs, int nbsimu) const override |
bool | checkModel (const Model *model, int nvar=0) const override |
double | getShDown () const |
double | getShDsup () const |
double | getSlope () const |
const VectorDouble & | getShift () const |
double | getShift (int idim) const |
![]() | |
Rule (double rho=0.) | |
Rule (const Rule &r) | |
Rule & | operator= (const Rule &r) |
virtual | ~Rule () |
virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
int | resetFromNames (const VectorString &nodnames, double rho=0.) |
int | resetFromCodes (const VectorInt &nodes, double rho=0.) |
int | resetFromNumericalCoding (const VectorInt &n_type, const VectorInt &n_facs, double rho=0.) |
int | resetFromFaciesCount (int nfacies, double rho=0.) |
virtual int | gaus2facData (PropDef *propdef, Db *dbin, Db *dbout, int *flag_used, int ipgs, int isimu, int nbsimu) |
int | getFlagProp () const |
const ERule & | getModeRule () const |
double | getRho () const |
const Node * | getMainNode () const |
void | setFlagProp (int flagProp) |
void | setRho (double rho) const |
void | setModeRule (const ERule &modeRule) |
TODO : Check if mutable is really necessary. More... | |
int | setProportions (const VectorDouble &proportions=VectorDouble()) const |
int | statistics (int verbose, int *node_tot, int *nfac_tot, int *nmax_tot, int *ny1_tot, int *ny2_tot, double *prop_tot) const |
int | getFaciesNumber () const |
int | getGRFNumber () const |
int | getY1Number () const |
int | getY2Number () const |
bool | isYUsed (int igrf) const |
VectorInt | whichGRFUsed () const |
double | getProportion (int facies) |
VectorDouble | getThresh (int facies) const |
VectorDouble | getThreshFromRectangle (int rect, int *facies) |
int | getFaciesFromGaussian (double y1, double y2) const |
void | updateShift () const |
![]() | |
AStringable () | |
AStringable (const AStringable &r) | |
AStringable & | operator= (const AStringable &r) |
virtual | ~AStringable () |
virtual void | display (const AStringFormat *strfmt=nullptr) const final |
virtual void | display (int level) const final |
![]() | |
ASerializable () | |
ASerializable (const ASerializable &r) | |
ASerializable & | operator= (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 |
Static Public Member Functions | |
static RuleShift * | createFromNodes (const VectorInt &nodes, const VectorDouble &shift) |
static RuleShift * | createFromNames (const VectorString &nodnames, const VectorDouble &shift) |
static RuleShift * | createFromFaciesCount (int nfacies, const VectorDouble &shift) |
static RuleShift * | createFromNumericalCoding (const VectorInt &n_type, const VectorInt &n_facs, const VectorDouble &shift) |
![]() | |
static Rule * | create (double rho=0.) |
static Rule * | createFromNF (const String &neutralFilename, bool verbose=true) |
static Rule * | createFromNames (const VectorString &nodnames, double rho=0.) |
static Rule * | createFromCodes (const VectorInt &nodes, double rho=0.) |
static Rule * | createFromNumericalCoding (const VectorInt &n_type, const VectorInt &n_facs, double rho=0.) |
static Rule * | createFromFaciesCount (int nfacies, double rho=0.) |
![]() | |
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 String & | getContainerName () |
static const String & | getPrefixName () |
static bool | createDirectory (const String &dir) |
static String | getExecDirectory () |
static String | getDirectory (const String &path) |
Protected Member Functions | |
virtual bool | _serialize (std::ostream &os, bool verbose=false) const override |
Interface for ASerializable. More... | |
virtual bool | _deserialize (std::istream &is, bool verbose=false) override |
String | _getNFName () const override |
![]() | |
void | setMainNodeFromNodNames (const VectorInt &n_type, const VectorInt &n_facs) |
void | setMainNodeFromNodNames (const VectorString &nodnames) |
int | setMainNodeFromNodNames (const VectorInt &nodes) |
int | replicateInvalid (Db *dbin, Db *dbout, int jech) const |
VectorString | buildNodNames (int nfacies) |
![]() | |
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 Member Functions | |
int | _st_shift_on_grid (Db *db, int ndim, int flag_grid_check) const |
Private Attributes | |
double | _shDsup |
double | _shDown |
double | _slope |
VectorDouble | _shift |
double | _incr |
VectorDouble | _xyz |
VectorInt | _ind1 |
VectorInt | _ind2 |
Additional Inherited Members | |
![]() | |
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) |
RuleShift::RuleShift | ( | ) |
RuleShift::RuleShift | ( | const RuleShift & | r | ) |
|
virtual |
|
overrideprotectedvirtual |
Reimplemented from Rule.
|
overrideprotectedvirtual |
Interface for ASerializable.
Reimplemented from Rule.
|
private |
|
overridevirtual |
Reimplemented from Rule.
|
static |
|
static |
|
static |
|
static |
|
overridevirtual |
Set the bounds and possibly add replicates
[in] | propdef | PropDef structure |
[in] | dbin | Db structure |
[in] | dbout | Db grid structure |
[in] | isimu | Rank of the simulation (if EProcessOper::CONDITIONAL) |
[in] | igrf | Rank of the GRF |
[in] | ipgs | Rank of the GS |
[in] | nbsimu | Number of simulations (if EProcessOper::CONDITIONAL) |
Reimplemented from Rule.
|
overridevirtual |
Combine the underlying GRF into a facies value
[in] | propdef | Props structure |
[in] | dbout | Db output structure |
[in] | flag_used | 1 if the gaussian is used; 0 otherwise |
[in] | ipgs | Rank of the PGS |
[in] | isimu | Rank of the simulation |
[in] | nbsimu | Number of simulations |
Reimplemented from Rule.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Define the particularities of the PGS model
[in] | db | Db structure |
[in] | dbprop | Db structure used for proportions |
[in] | model | Model structure (only used for shift option) |
[in] | flag_grid_check | 1 if grid is compulsory; 0 otherwise (only for SHIFT) |
[in] | flag_stat | 1 for stationary; 0 otherwise |
Reimplemented from Rule.
int RuleShift::resetFromFaciesCount | ( | int | nfacies, |
const VectorDouble & | shift | ||
) |
Definition of the Lithotype RuleShift
nfacies | Number of facies |
shift | Vector defining the shift |
int RuleShift::resetFromNames | ( | const VectorString & | nodnames, |
const VectorDouble & | shift | ||
) |
int RuleShift::resetFromNodes | ( | const VectorInt & | nodes, |
const VectorDouble & | shift | ||
) |
Definition of the Lithotype RuleShift
nodes | List of "integer" nodes (should only include "S", no "T") |
shift | Vector defining the Shift |
int RuleShift::resetFromNumericalCoding | ( | const VectorInt & | n_type, |
const VectorInt & | n_facs, | ||
const VectorDouble & | shift | ||
) |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |