1.3.2
CCC
 
stats.cpp File Reference
#include "geoslib_f.h"
#include "geoslib_old_f.h"
#include "Enum/EJustify.hpp"
#include "Morpho/Morpho.hpp"
#include "Basic/VectorNumT.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/Law.hpp"
#include "Basic/File.hpp"
#include "Basic/String.hpp"
#include "Basic/OptDbg.hpp"
#include "Db/Db.hpp"
#include "Db/DbGrid.hpp"
#include "Stats/Classical.hpp"
#include <math.h>
#include <string.h>

Functions

int db_upscale (DbGrid *dbgrid1, DbGrid *dbgrid2, int orient, int verbose)
 
int db_diffusion (DbGrid *dbgrid1, DbGrid *dbgrid2, int orient, int niter, int nseed, int seed, int verbose)
 
int stats_residuals (int verbose, int nech, double *tab, int ncut, double *zcut, int *nsorted, double *mean, double *residuals, double *T, double *Q)
 

Function Documentation

◆ db_diffusion()

int db_diffusion ( DbGrid dbgrid1,
DbGrid dbgrid2,
int  orient,
int  niter,
int  nseed,
int  seed,
int  verbose 
)

Calculate the diffusion factor from a grid Db into another grid Db

Returns
Error return code
Parameters
[in]dbgrid1Db for the input grid
[in]dbgrid2Db for the output grid
[in]orientDiffusion orientation (0 or the space rank dimension)
[in]niterNumber of iterations
[in]nseedNumber of seeds
[in]seedSeed for the random number generation
[in]verboseVerbose Option
Remarks
The user may specify the type of storage
0: average squared distance; 1: slope; 2: origin
get.keypair("Diffusion.Converge.Option",0)
The neighborhood is Block(0) or Cross(1) according to
get.keypair("Diffusion.Converge.Morpho",0)
The rank of the convergence if measured from a Starting to an Ending
percentages of the 'niter' iterations. The 'Mid' percentage gives
the value assigned to the output block
get.keypair("Diffusion.Converge.PMid",70)
The user can specify the block of interest by using:
get.keypair("Diffusion.Converge.Block")
For the target block, the array of squared distances as a function
of the iteration is returned using the keypair mechanism:
set.keypair("Diffusion.Converge")
For the target block, the trajectories are saved using keypair;
set.keypair("Diffusion.Trajectory.XX")

◆ db_upscale()

int db_upscale ( DbGrid dbgrid1,
DbGrid dbgrid2,
int  orient,
int  verbose 
)

Upscale one variable from a grid Db into another grid Db

Returns
Error return code
Parameters
[in]dbgrid1Db for the input grid
[in]dbgrid2Db for the output grid
[in]orientUpscaling direction (0 to 2)
[in]verboseVerbose flag

◆ stats_residuals()

int stats_residuals ( int  verbose,
int  nech,
double *  tab,
int  ncut,
double *  zcut,
int *  nsorted,
double *  mean,
double *  residuals,
double *  T,
double *  Q 
)

Create residuals

Returns
Error returned code
Parameters
[in]verboseVerbose flag
[in]nechNumber of samples
[in]tabArray of sample values (Dimension: nech)
[in]ncutNumber of cutoffs
[in]zcutArray of cutoff values (Dimension: ncut)
[out]nsortedNumber of sorted samples
[out]meanAverage of the active data
[out]residualsArray of residuals (Dimension: ncut * nech)
[out]TArray of for tonnage
[out]QArray of for metal quantity