gstlearn
1.0.0
CCC
|
#include "geoslib_d.h"
#include "geoslib_old_f.h"
#include "Enum/EDbg.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/VectorHelper.hpp"
#include "Basic/Law.hpp"
#include <cmath>
#include <map>
Macros | |
#define | LSTACK 1000 |
#define | MINI 10 |
#define | M(j, i) (m[(i) * ndim + (j)]) |
Functions | |
bool | isInteger (double value, double eps) |
int | getClosestInteger (double value) |
bool | isMultiple (int nbig, int nsmall) |
bool | isOdd (int number) |
bool | isEven (int number) |
double | getMin (double val1, double val2) |
double | getMax (double val1, double val2) |
double | getTEST () |
int | getITEST () |
int | FFFF (double value) |
int | IFFFF (int value) |
double | ut_deg2rad (double angle) |
double | ut_rad2deg (double angle) |
void | ut_sort_double (int safe, int nech, int *ind, double *value) |
StatResults | ut_statistics (int nech, double *tab, double *sel, double *wgt) |
void | ut_stats_mima_print (const char *title, int nech, double *tab, double *sel) |
void | ut_facies_statistics (int nech, double *tab, double *sel, int *nval, int *mini, int *maxi) |
void | ut_classify (int nech, double *tab, double *sel, int nclass, double start, double pas, int *nmask, int *ntest, int *nout, int *classe) |
double | ut_median (double *tab, int ntab) |
double | ut_cnp (int n, int k) |
double * | ut_pascal (int ndim) |
int * | ut_combinations (int n, int maxk, int *ncomb) |
void | ut_shuffle_array (int nrow, int ncol, double *tab) |
VectorInt | getListActiveToAbsolute (const VectorDouble &sel) |
std::map< int, int > | getMapAbsoluteToRelative (const VectorDouble &sel, bool verbose) |
int | getRankMapAbsoluteToRelative (const std::map< int, int > &map, int iabs) |
int | getRankMapRelativeToAbsolute (const std::map< int, int > &map, int irel) |
#define LSTACK 1000 |
#define M | ( | j, | |
i | |||
) | (m[(i) * ndim + (j)]) |
#define MINI 10 |
int FFFF | ( | double | value | ) |
Checks if a double value is TEST
[in] | value | Value to be tested |
int getClosestInteger | ( | double | value | ) |
int getITEST | ( | ) |
VectorInt getListActiveToAbsolute | ( | const VectorDouble & | sel | ) |
Returns the list of absolute indices for the only active samples A sample is active if its 'sel' value is equal to 1
sel | Vector giving the status of all samples (Dimension: absolute) |
std::map<int, int> getMapAbsoluteToRelative | ( | const VectorDouble & | sel, |
bool | verbose | ||
) |
Returns the map such that MAP[iabs] = iact. A sample is active if its 'sel' value is equal to 1
sel | Vector giving the status of all samples (Dimension: absolute) |
verbose | Verbose flag |
double getMax | ( | double | val1, |
double | val2 | ||
) |
double getMin | ( | double | val1, |
double | val2 | ||
) |
int getRankMapAbsoluteToRelative | ( | const std::map< int, int > & | map, |
int | iabs | ||
) |
Returns the rank of the relative grid node from its absolute index using the Map
map | The <int,int> map |
iabs | Absolute rank of the grid node |
int getRankMapRelativeToAbsolute | ( | const std::map< int, int > & | map, |
int | irel | ||
) |
double getTEST | ( | ) |
int IFFFF | ( | int | value | ) |
Checks if an integer value is TEST
[in] | value | Value to be tested |
bool isEven | ( | int | number | ) |
bool isInteger | ( | double | value, |
double | eps | ||
) |
bool isMultiple | ( | int | nbig, |
int | nsmall | ||
) |
bool isOdd | ( | int | number | ) |
void ut_classify | ( | int | nech, |
double * | tab, | ||
double * | sel, | ||
int | nclass, | ||
double | start, | ||
double | pas, | ||
int * | nmask, | ||
int * | ntest, | ||
int * | nout, | ||
int * | classe | ||
) |
Classify the samples into integer sieves
[in] | nech | Number of samples |
[in] | tab | Array of values |
[in] | sel | Array containing the Selection or NULL |
[in] | nclass | Number of sieve classes |
[in] | start | Starting sieve value |
[in] | pas | Width of the sieve |
[out] | nmask | Number of masked values |
[out] | ntest | Number of undefined values |
[out] | nout | Number of values outside the classes |
[out] | classe | Array for number of samples per sieve |
double ut_cnp | ( | int | n, |
int | k | ||
) |
Compute combinations(n,k)
[in] | n | Total number of objects (>= 1) |
[in] | k | Selected number of objects (>= 1) |
int* ut_combinations | ( | int | n, |
int | maxk, | ||
int * | ncomb | ||
) |
Return all the combinations of k within n
[in] | n | Total number of objects (>1) |
[in] | maxk | Selected number of objects (1<=maxk<n) |
[out] | ncomb | Number of combinations |
double ut_deg2rad | ( | double | angle | ) |
Translates from degree to radian
[in] | angle | Angle in degrees |
void ut_facies_statistics | ( | int | nech, |
double * | tab, | ||
double * | sel, | ||
int * | nval, | ||
int * | mini, | ||
int * | maxi | ||
) |
double ut_median | ( | double * | tab, |
int | ntab | ||
) |
Calculate the median from a table of values
[in] | tab | Array of values |
[in] | ntab | Number of samples |
double* ut_pascal | ( | int | ndim | ) |
Create the matrix containing the Pascal Triangle coefficients
[in] | ndim | Size of the matrix |
double ut_rad2deg | ( | double | angle | ) |
Translates from radian to degree
[in] | angle | Angle in radian |
void ut_shuffle_array | ( | int | nrow, |
int | ncol, | ||
double * | tab | ||
) |
Shuffle an array (by line)
[in] | nrow | Number of rows |
[in] | ncol | Number of columns |
[in,out] | tab | Array to be suffled |
void ut_sort_double | ( | int | safe, |
int | nech, | ||
int * | ind, | ||
double * | value | ||
) |
Sorts the (double) array value() and the array ind() in the ascending order of value
[in] | safe | 1 if the value array if preserved 0 if the value array is also sorted |
[in] | nech | number of samples |
[out] | ind | output int array |
[out] | value | input and output array |
StatResults ut_statistics | ( | int | nech, |
double * | tab, | ||
double * | sel, | ||
double * | wgt | ||
) |
Returns the statistics of an array in a StatResults structure