gstlearn  1.0.0
CCC
Classical.hpp File Reference
#include "gstlearn_export.hpp"
#include "Enum/EStatOption.hpp"
#include "Matrix/MatrixSquareSymmetric.hpp"
#include "Basic/VectorNumT.hpp"
#include "Basic/NamingConvention.hpp"

Functions

GSTLEARN_EXPORT VectorString statOptionToName (const std::vector< EStatOption > &opers)
 
GSTLEARN_EXPORT std::vector< EStatOption > KeysToStatOptions (const VectorString &opers)
 
GSTLEARN_EXPORT Table dbStatisticsMono (Db *db, const VectorString &names, const std::vector< EStatOption > &opers=EStatOption::fromKeys({ "MEAN" }), bool flagIso=true, double proba=TEST, double vmin=TEST, double vmax=TEST, const String &title="")
 Compute one or several statistics (oper/opers) on a set of variables (names) contained in a Db and produce the results as a Table or as variables added to the input Db. More...
 
GSTLEARN_EXPORT Table dbStatisticsCorrel (Db *db, const VectorString &names, bool flagIso=true, const String &title="")
 Compute one or several statistics (oper/opers) on a set of variables (names) contained in a Db and produce the results as a Table or as variables added to the input Db. More...
 
GSTLEARN_EXPORT void dbStatisticsPrint (const Db *db, const VectorString &names, const std::vector< EStatOption > &opers=EStatOption::fromKeys({ "MEAN" }), bool flagIso=false, bool flagCorrel=false, const String &title="", const String &radix="")
 Compute one or several statistics (oper/opers) on a set of variables (names) contained in a Db and produce the results as a Table or as variables added to the input Db. More...
 
GSTLEARN_EXPORT Table dbStatisticsMulti (Db *db, const VectorString &names, const EStatOption &oper=EStatOption::fromKey("MEAN"), bool flagMono=true, const String &title="")
 Compute one or several statistics (oper/opers) on a set of variables (names) contained in a Db and produce the results as a Table or as variables added to the input Db. More...
 
GSTLEARN_EXPORT VectorDouble dbStatisticsPerCell (Db *db, DbGrid *dbgrid, const EStatOption &oper, const String &name1, const String &name2="", const VectorDouble &cuts=VectorDouble())
 Compute Statistics of points per cell. More...
 
GSTLEARN_EXPORT int statisticsProportion (DbGrid *dbin, DbGrid *dbout, int pos, int nfacies, int radius)
 
GSTLEARN_EXPORT int statisticsTransition (DbGrid *dbin, DbGrid *dbout, int pos, int nfacies, int radius, int orient)
 
GSTLEARN_EXPORT VectorDouble dbStatisticsFacies (Db *db)
 
GSTLEARN_EXPORT double dbStatisticsIndicator (Db *db)
 
GSTLEARN_EXPORT MatrixRectangularsphering (const AMatrix *X)
 
GSTLEARN_EXPORT void dbStatisticsVariables (Db *db, const VectorString &names, const std::vector< EStatOption > &opers, int iptr0, double proba=TEST, double vmin=TEST, double vmax=TEST)
 
GSTLEARN_EXPORT int dbStatisticsInGridTool (Db *db, DbGrid *dbgrid, const VectorString &names, const EStatOption &oper, int radius, int iptr0)
 

Function Documentation

◆ dbStatisticsFacies()

GSTLEARN_EXPORT VectorDouble dbStatisticsFacies ( Db db)

Considering that the Unique variable is a Facies (positive integer) returns the vector of proportions

Returns
The vector of proportions per Facies
Parameters
[in]dbDb structure

◆ dbStatisticsIndicator()

GSTLEARN_EXPORT double dbStatisticsIndicator ( Db db)

Considering that the Unique variable is an Indicator (0 or 1) returns the proportion of 1

Returns
The vector of proportions per Facies
Parameters
[in]dbDb structure

◆ dbStatisticsInGridTool()

GSTLEARN_EXPORT int dbStatisticsInGridTool ( Db db,
DbGrid dbgrid,
const VectorString names,
const EStatOption &  oper,
int  radius,
int  iptr0 
)

Calculates the monovariate statistics within cells of a grid

Returns
Error return code
Parameters
[in]dbDb for the points
[in]dbgridDb for the grid
[in]namesVector of target variable names
[in]operA EStatOption item
[in]radiusNeighborhood radius
[in]iptr0Storage address (first variable)

◆ KeysToStatOptions()

GSTLEARN_EXPORT std::vector<EStatOption> KeysToStatOptions ( const VectorString opers)

◆ sphering()

GSTLEARN_EXPORT MatrixRectangular* sphering ( const AMatrix X)

Sphering procedure

Parameters
XInput Data vector
Returns
The Sphering matrix (or nullptr if problem)
Remarks
When performing the (forward) sphering, you must perform the following operation
X <- prodMatrix(X, S)

◆ statisticsProportion()

GSTLEARN_EXPORT int statisticsProportion ( DbGrid dbin,
DbGrid dbout,
int  pos,
int  nfacies,
int  radius 
)

Calculates the "montee" from a grid into a 1-D grid

Returns
Error return code
Parameters
[in]dbinDb for the input grid
[in]dboutDb for the output grid
[in]posRank of the montee axis (starting from 0)
[in]nfaciesNumber of facies
[in]radiusRadius of the neighborhood

◆ statisticsTransition()

GSTLEARN_EXPORT int statisticsTransition ( DbGrid dbin,
DbGrid dbout,
int  pos,
int  nfacies,
int  radius,
int  orient 
)

Calculates the transition from a grid into a 1-D grid

Returns
Error return code
Parameters
[in]dbinDb for the input grid
[in]dboutDb for the output grid
[in]posRank of the montee axis (starting from 0)
[in]nfaciesNumber of facies
[in]radiusRadius of the neighborhood
[in]orientOrientation (+1 or -1)

◆ statOptionToName()

GSTLEARN_EXPORT VectorString statOptionToName ( const std::vector< EStatOption > &  opers)