#include "Db/Db.hpp"
#include "Db/DbGrid.hpp"
#include "Stats/Classical.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/String.hpp"
#include "Basic/AStringable.hpp"
#include "Matrix/MatrixSquareSymmetric.hpp"
#include "Matrix/MatrixFactory.hpp"
#include "Model/Model.hpp"
#include "Space/SpaceRN.hpp"
#include "Space/SpaceTarget.hpp"
#include "Variogram/VarioParam.hpp"
#include "Variogram/Vario.hpp"
#include "Polygon/Polygons.hpp"
#include "Enum/EStatOption.hpp"
#include <math.h>
#include <Matrix/Table.hpp>
#include <string.h>
Functions | |
bool | _operStatisticsCheck (const EStatOption &oper, int flag_multi, int flag_indic, int flag_sum, int flag_median, int flag_qt) |
void | _updateProportions (DbGrid *dbin, VectorInt &indg, int nfacies, VectorDouble &prop) |
void | _updateTransition (DbGrid *dbin, int pos, VectorInt &indg, int nfacies, int orient, VectorDouble &trans) |
void | _scaleAndAffect (Db *dbout, int iptr, int iech, int nitem, VectorDouble &tab) |
bool | _operExists (const std::vector< EStatOption > &opers, const EStatOption &refe) |
void | _refactor (int ncol, VectorDouble &tab) |
void | _copyResults (int nx, int ny, const VectorDouble &tabin, VectorDouble &tabout) |
void | _neighboringCell (int ndim, int radius, int rank0, const VectorInt &indg0, VectorInt &indg) |
double | _getQuantile (VectorDouble &tab, int ntab, double proba) |
VectorString | statOptionToName (const std::vector< EStatOption > &opers) |
std::vector< EStatOption > | KeysToStatOptions (const VectorString &opers) |
void | dbStatisticsVariables (Db *db, const VectorString &names, const std::vector< EStatOption > &opers, int iptr0, double proba, double vmin, double vmax) |
Table | dbStatisticsMono (Db *db, const VectorString &names, const std::vector< EStatOption > &opers, bool flagIso, double proba, double vmin, double vmax, const String &title) |
VectorDouble | dbStatisticsFacies (Db *db) |
double | dbStatisticsIndicator (Db *db) |
Table | dbStatisticsCorrel (Db *db, const VectorString &names, bool flagIso, const String &title) |
int | statisticsProportion (DbGrid *dbin, DbGrid *dbout, int pos, int nfacies, int radius) |
int | statisticsTransition (DbGrid *dbin, DbGrid *dbout, int pos, int nfacies, int radius, int orient) |
void | _getRowname (const String &radix, int ncol, int icol, const String &name, char *string) |
void | dbStatisticsPrint (const Db *db, const VectorString &names, const std::vector< EStatOption > &opers, bool flagIso, bool flagCorrel, const String &title, const String &radix) |
MatrixSquareGeneral * | sphering (const AMatrix *X) |
VectorDouble | dbStatisticsPerCell (Db *db, DbGrid *dbgrid, const EStatOption &oper, const String &name1, const String &name2, const VectorDouble &cuts) |
Table | dbStatisticsMulti (Db *db, const VectorString &names, const EStatOption &oper, bool flagMono, const String &title) |
int | dbStatisticsInGridTool (Db *db, DbGrid *dbgrid, const VectorString &names, const EStatOption &oper, int radius, int iptr0) |
VectorVectorInt | correlationPairs (Db *db1, Db *db2, const String &name1, const String &name2, bool flagFrom1, bool verbose) |
VectorVectorInt | hscatterPairs (Db *db, const String &name1, const String &name2, VarioParam *varioparam, int ipas, int idir, bool verbose) |
int | correlationIdentify (Db *db1, Db *db2, int icol1, int icol2, Polygons *polygon) |
VectorVectorDouble | condexp (Db *db1, Db *db2, int icol1, int icol2, double mini, double maxi, int nclass, bool verbose) |
std::map< int, int > | contingencyTable (const VectorInt &values) |
std::map< int, std::map< int, int > > | contingencyTable2 (const VectorInt &values, const VectorInt &bins) |
void _copyResults | ( | int | nx, |
int | ny, | ||
const VectorDouble & | tabin, | ||
VectorDouble & | tabout | ||
) |
double _getQuantile | ( | VectorDouble & | tab, |
int | ntab, | ||
double | proba | ||
) |
Calculate the quantile which corresponds to a given probability
[in] | tab | Array of outcomes per sample |
[in] | ntab | Number of active values |
[in] | proba | Probability value (between 0 and 1) |
Constitute the name of the row
[in] | radix | Radix for the different variables (optional) |
[in] | ncol | Number of variables |
[in] | icol | Rank of the variable |
[in] | name | Variables name |
[in] | string | String array |
bool _operExists | ( | const std::vector< EStatOption > & | opers, |
const EStatOption & | refe | ||
) |
Check the operator name is mentioned within a list
[in] | opers | Array of operators |
[in] | refe | Reference operator |
bool _operStatisticsCheck | ( | const EStatOption & | oper, |
int | flag_multi, | ||
int | flag_indic, | ||
int | flag_sum, | ||
int | flag_median, | ||
int | flag_qt | ||
) |
Check the operator name
[in] | oper | A EStatOption item |
[in] | flag_multi | 1 if multivariate operator is authorized |
[in] | flag_indic | 1 if indicator ("plus","minus","zero") is authorized |
[in] | flag_sum | 1 if sum of variable is authorized |
[in] | flag_median | 1 if median is authorized |
[in] | flag_qt | 1 if QT ("ore","metal") is authorized |
void _refactor | ( | int | ncol, |
VectorDouble & | tab | ||
) |
Copy the multivariate into monovariate statistics (before printout)
[in] | ncol | Dimension of the (square) matrix |
[in,out] | tab | Array to be refactored |
void _scaleAndAffect | ( | Db * | dbout, |
int | iptr, | ||
int | iech, | ||
int | nitem, | ||
VectorDouble & | tab | ||
) |
void _updateProportions | ( | DbGrid * | dbin, |
VectorInt & | indg, | ||
int | nfacies, | ||
VectorDouble & | prop | ||
) |
void _updateTransition | ( | DbGrid * | dbin, |
int | pos, | ||
VectorInt & | indg, | ||
int | nfacies, | ||
int | orient, | ||
VectorDouble & | trans | ||
) |
VectorVectorDouble condexp | ( | Db * | db1, |
Db * | db2, | ||
int | icol1, | ||
int | icol2, | ||
double | mini, | ||
double | maxi, | ||
int | nclass, | ||
bool | verbose | ||
) |
Evaluate the experimental conditional expectation
[in] | db1 | Db descriptor (for target variable) |
[in] | db2 | Db descriptor (for auxiliary variables) |
[in] | icol1 | Rank of the target variable |
[in] | icol2 | Rank of the explanatory variable |
[in] | mini | Minimum value for the explanaroty variable |
[in] | maxi | Maximum value for the explanaroty variable |
[in] | nclass | Number of classes |
[in] | verbose | Verbose flag |
std::map<int, int> contingencyTable | ( | const VectorInt & | values | ) |
std::map<int, std::map<int, int> > contingencyTable2 | ( | const VectorInt & | values, |
const VectorInt & | bins | ||
) |
Identify samples from scatter plot when included within a polygon
[in] | db1 | Db descriptor (first variable) |
[in] | db2 | Db descriptor (second variable for flag.same=T) |
[in] | icol1 | Rank of the first column |
[in] | icol2 | Rank of the second column |
[in] | polygon | Polygons structure |
VectorVectorInt correlationPairs | ( | Db * | db1, |
Db * | db2, | ||
const String & | name1, | ||
const String & | name2, | ||
bool | flagFrom1, | ||
bool | verbose | ||
) |
Evaluate the correlation Correl(Z1(x) , Z2(x))
[in] | db1 | Db descriptor (first variable) |
[in] | db2 | Db descriptor (second variable for flag.same=T) |
[in] | name1 | Name of the first variable |
[in] | name2 | Name of the second variable |
[in] | flagFrom1 | Start numbering of indices from 1 if True |
[in] | verbose | Verbose flag |
VectorDouble dbStatisticsFacies | ( | Db * | db | ) |
Considering that the Unique variable is a Facies (positive integer) returns the vector of proportions
[in] | db | Db structure |
double dbStatisticsIndicator | ( | Db * | db | ) |
Considering that the Unique variable is an Indicator (0 or 1) returns the proportion of 1
[in] | db | Db structure |
int dbStatisticsInGridTool | ( | Db * | db, |
DbGrid * | dbgrid, | ||
const VectorString & | names, | ||
const EStatOption & | oper, | ||
int | radius, | ||
int | iptr0 | ||
) |
VectorVectorInt hscatterPairs | ( | Db * | db, |
const String & | name1, | ||
const String & | name2, | ||
VarioParam * | varioparam, | ||
int | ipas, | ||
int | idir, | ||
bool | verbose | ||
) |
Evaluate the shifted correlation calculated as follows: Correl(Z1(x) , Z2(x+h))
[in] | db | Db descriptor |
[in] | name1 | Name of the first variable |
[in] | name2 | Name of the second variable |
[in] | varioparam | pointer to a VarioParam structure |
[in] | ipas | Rank of the lag of interest |
[in] | idir | Rank of the direction of interest (within VarioParam) |
[in] | verbose | Verbose flag |
std::vector<EStatOption> KeysToStatOptions | ( | const VectorString & | opers | ) |
MatrixSquareGeneral* sphering | ( | const AMatrix * | X | ) |
Sphering procedure
X | Input Data vector |
VectorString statOptionToName | ( | const std::vector< EStatOption > & | opers | ) |