|
int | Db::resetFromSamples (int nech, const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const VectorDouble &tab=VectorDouble(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool flagAddSampleRank=true) |
|
int | Db::resetFromCSV (const String &filename, bool verbose, const CSVformat &csvfmt, int ncol_max=-1, int nrow_max=-1, bool flagAddSampleRank=true) |
|
int | Db::resetFromBox (int nech, const VectorDouble &coormin, const VectorDouble &coormax, int ndim=2, double extend=0., int seed=321415, bool flagAddSampleRank=true) |
|
int | Db::resetFromOnePoint (const VectorDouble &tab=VectorDouble(), bool flagAddSampleRank=true) |
|
int | Db::resetSamplingDb (const Db *dbin, double proportion=0, int number=0, const VectorString &names=VectorString(), int seed=23241, bool verbose=false, bool flagAddSampleRank=true) |
|
int | Db::resetReduce (const Db *dbin, const VectorString &names=VectorString(), const VectorInt &ranks=VectorInt(), bool verbose=false) |
|
All methods enabling to Reset the contents of an already existing Db.
They clean the initial contents and replace it by the new one.
◆ resetFromBox()
int Db::resetFromBox |
( |
int |
nech, |
|
|
const VectorDouble & |
coormin, |
|
|
const VectorDouble & |
coormax, |
|
|
int |
ndim = 2 , |
|
|
double |
extend = 0. , |
|
|
int |
seed = 321415 , |
|
|
bool |
flagAddSampleRank = true |
|
) |
| |
Create a Db generating samples randomly
- Parameters
-
nech | Number of samples to be generated |
coormin | Vector giving the smallest values of the coordinates |
coormax | Vector giving the largest values for the coordinates |
ndim | Space dimension (used if 'coormin' and 'coormax' are empty) |
extend | Extension of the bounding box (if positive) |
seed | Seed for the random number generator |
flagAddSampleRank | true if the Sample ranks must be generated |
◆ resetFromCSV()
int Db::resetFromCSV |
( |
const String & |
filename, |
|
|
bool |
verbose, |
|
|
const CSVformat & |
csvfmt, |
|
|
int |
ncol_max = -1 , |
|
|
int |
nrow_max = -1 , |
|
|
bool |
flagAddSampleRank = true |
|
) |
| |
Creating a Db by reading a CSV file
- Parameters
-
filename | Name of the CSV file |
verbose | Verbose flag |
csvfmt | Description of the CSV format |
ncol_max | Maximum number of columns |
nrow_max | Maximum number of rows |
flagAddSampleRank | true if the sample rank must be generated |
◆ resetFromOnePoint()
Create a Db from a single sample whose coordinates are provided in 'tab'
- Parameters
-
tab | Array containing the coordinates of the single sample |
flagAddSampleRank | true if the Sample ranks must be generated |
◆ resetFromSamples()
◆ resetReduce()
◆ resetSamplingDb()
int Db::resetSamplingDb |
( |
const Db * |
dbin, |
|
|
double |
proportion = 0 , |
|
|
int |
number = 0 , |
|
|
const VectorString & |
names = VectorString() , |
|
|
int |
seed = 23241 , |
|
|
bool |
verbose = false , |
|
|
bool |
flagAddSampleRank = true |
|
) |
| |
Sampling an input Db to create the output Db by selecting a subset of samples
- Parameters
-
dbin | Pointer to the input Db |
proportion | Proportion of samples to be retained |
number | Number of samples to be retained |
names | Vector of Names to be copied (empty: all names) |
seed | Seed used for the random number generator |
verbose | Verbose flag |
flagAddSampleRank | true if the sample rank must be generated |