gstlearn
1.0.0
CCC
|
#include <Node.hpp>
Public Member Functions | |
Node (const String &nodnam, int orient, int facies) | |
Node (const String &nodnam, const VectorInt &n_type, const VectorInt &n_facs, int *ipos, int *n_fac, int *n_y1, int *n_y2) | |
Node (bool flagShadow=true) | |
Node (const Node &r) | |
Node & | operator= (const Node &r) |
virtual | ~Node () |
virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
void | getStatistics (int *node_tot, int *nfac_tot, int *ny1_tot, int *ny2_tot, double *prop_tot) |
int | isValid (VectorInt &facies) |
void | scaleProp (double scale) |
int | proportionDefine (const VectorDouble &props) |
int | getProportion (int facies, double *prop) |
int | getThresh (int mode, int istop, int *rank, int *facies, double *t1min, double *t1max, double *t2min, double *t2max) |
void | proportionToThresh (double rho, double t1min, double t1max, double t2min, double t2max) |
int | gaussianToFacies (double y1, double y2, double *facies) |
void | getInfo (int *nodes) const |
String | nodePrint (bool flagProp, bool flagThresh) const |
String | nodePrintShadow (bool flagProp, bool flagThresh) const |
double | getT1max () const |
double | getT1min () const |
double | getT2max () const |
double | getT2min () const |
void | setT1max (double t1max) |
void | setT1min (double t1min) |
void | setT2max (double t2max) |
void | setT2min (double t2min) |
double | getCdf1max () const |
double | getCdf1min () const |
double | getCdf2max () const |
double | getCdf2min () const |
int | getFacies () const |
const String & | getNodnam () const |
int | getOrient () const |
double | getP1 () const |
double | getP2 () const |
double | getProp () const |
double | getAllThresh () const |
void | setProp (double prop) |
void | setCdf1max (double cdf1max) |
void | setCdf1min (double cdf1min) |
void | setCdf2max (double cdf2max) |
void | setCdf2min (double cdf2min) |
void | setAllThresh (double thresh) |
Node * | getR1 () const |
void | setR1 (Node *r1) |
Node * | getR2 () const |
void | setR2 (Node *r2) |
Public Member Functions inherited from AStringable | |
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 |
Private Member Functions | |
void | _getStatistics (int *node_tot, int *nfac_tot, int *ny1_tot, int *ny2_tot, double *prop_tot) |
void | _getInfo (int *nodes, int parent_type, int parent_rank, int parent_vers, int *rank, int *n_fac, int *n_y1, int *n_y2) const |
double | _transform (int mode, double value) |
double | _threshFromPropcum (double rho) |
double | _threshDichotomy (double rho) |
Private Attributes | |
String | _nodnam |
Node * | _r1 |
Node * | _r2 |
int | _orient |
int | _facies |
double | _prop |
double | _thresh |
double | _p1 |
double | _p2 |
double | _t1min |
double | _t1max |
double | _t2min |
double | _t2max |
double | _cdf1min |
double | _cdf1max |
double | _cdf2min |
double | _cdf2max |
Node::Node | ( | const String & | nodnam, |
int | orient, | ||
int | facies | ||
) |
Node::Node | ( | const String & | nodnam, |
const VectorInt & | n_type, | ||
const VectorInt & | n_facs, | ||
int * | ipos, | ||
int * | n_fac, | ||
int * | n_y1, | ||
int * | n_y2 | ||
) |
Node::Node | ( | bool | flagShadow = true | ) |
Node::Node | ( | const Node & | r | ) |
|
virtual |
|
private |
Recursive call for encoding the node characteristics
[in] | nodes | Array for node characteristics |
[in] | parent_type | Type of the parent (THRESH_IDLE, THRESH_Y1 or Y2) |
[in] | parent_rank | Rank of the parent |
[in] | parent_vers | Orientation for the parent |
[in] | rank | Node number in the node pile |
[in] | n_fac | Number of the facies |
[in] | n_y1 | Number of the threshold along Y1 |
[in] | n_y2 | Number of the threshold along Y2 |
|
private |
|
private |
Find a threshold by dichotomy method This method is restricted to the case of correlated GRFs
[in] | rho | Correlation between the two GRFs (in ]0,1[) |
|
private |
Derive a threshold from the bounds and the lower and upper cumulative proportions
return Threshold value or TEST if an error occurs
[in] | rho | Correlation between the GRFs |
|
private |
Perform the transform between real and gaussian scales
[in] | mode | <0 from gaussian to real; >0 from real to gaussian |
[in] | value | Input value |
int Node::gaussianToFacies | ( | double | y1, |
double | y2, | ||
double * | facies | ||
) |
Convert the two underlying GRFs into facies
[in] | y1 | Value of the first underlying GRF |
[in] | y2 | Value of the second underlying GRF |
[out] | facies | Facies value |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Node::getInfo | ( | int * | nodes | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int Node::getProportion | ( | int | facies, |
double * | prop | ||
) |
For a given facies, return the Proportion
facies | Target facies (starting from 1) |
prop | Returned proportion |
|
inline |
|
inline |
void Node::getStatistics | ( | int * | node_tot, |
int * | nfac_tot, | ||
int * | ny1_tot, | ||
int * | ny2_tot, | ||
double * | prop_tot | ||
) |
Calculates the statistics from a given node recursively
[in,out] | node_tot | Number of nodes |
[in,out] | nfac_tot | Number of facies |
[in,out] | ny1_tot | Number of thresholds for Y1 |
[in,out] | ny2_tot | Number of thresholds for Y2 |
[in,out] | prop_tot | Total proportion |
|
inline |
|
inline |
|
inline |
|
inline |
int Node::getThresh | ( | int | mode, |
int | istop, | ||
int * | rank, | ||
int * | facies, | ||
double * | t1min, | ||
double * | t1max, | ||
double * | t2min, | ||
double * | t2max | ||
) |
Get the threshold for a facies
[in] | mode | Stopping criterion
|
[in] | istop | Value of the stopping criterion |
[in] | rank | Index of the rectangle (input) |
[out] | facies | Value of the facies |
[out] | t1min | Minimum threshold along Y1 |
[out] | t1max | Maximum threshold along Y1 |
[out] | t2min | Minimum threshold along Y2 |
[out] | t2max | Maximum threshold along Y2 |
int Node::isValid | ( | VectorInt & | facies | ) |
Count the presence of each facies
[in] | facies | Array for counting the presence of facies |
String Node::nodePrint | ( | bool | flagProp, |
bool | flagThresh | ||
) | const |
Recursively print the Node
[in] | flagProp | true if the Proportions must be printed |
[in] | flagThresh | true if the Threshold must be printed |
String Node::nodePrintShadow | ( | bool | flagProp, |
bool | flagThresh | ||
) | const |
Recursively print the Node
[in] | flagProp | true if the Proportions must be printed |
[in] | flagThresh | true if the Threshold must be printed |
int Node::proportionDefine | ( | const VectorDouble & | props | ) |
void Node::proportionToThresh | ( | double | rho, |
double | t1min, | ||
double | t1max, | ||
double | t2min, | ||
double | t2max | ||
) |
Recursively deduce the threshold from cumulative proportions
[in] | rho | Correlation between the GRFs |
[in] | t1min | Minimum bound for the first GRF |
[in] | t1max | Maximum bound for the first GRF |
[in] | t2min | Minimum bound for the second GRF |
[in] | t2max | Maximum bound for the second GRF |
void Node::scaleProp | ( | double | scale | ) |
Scale the proportions of all facies new_prop = old_prop / scale
[in] | scale | Scaling factor |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Reimplemented from AStringable.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |