gstlearn  1.0.0
CCC
VectorHelper Class Reference

#include <VectorHelper.hpp>

Inheritance diagram for VectorHelper:
VH

Static Public Member Functions

static VectorInt initVInt (int nval, int value=0.)
 
static VectorDouble initVDouble (int nval, double value=0.)
 
static VectorVectorDouble initVVDouble (int nval1, int nval2, double value=0.)
 
static VectorVectorInt initVVInt (int nval1, int nval2, int value=0)
 
static VectorInt initVInt (const int *values, int number)
 
static VectorDouble initVDouble (const double *values, int number)
 
static VectorVectorDouble initVVDouble (const double *value, int n1, int n2)
 
static void display (const String &title, const VectorDouble &vect, bool skipLine=true)
 
static void display (const String &title, const VectorVectorDouble &vect, bool skipLine=true)
 
static void display (const String &title, const VectorString &vect, bool skipLine=true)
 
static void display (const String &title, const VectorInt &vect, bool skipLine=true)
 
static String toStringAsVD (const VectorDouble &vec)
 
static String toStringAsVVD (const VectorVectorDouble &vec)
 
static String toStringAsVS (const VectorString &vec)
 
static String toStringAsVI (const VectorInt &vec)
 
static void displayStats (const String &title, const VectorDouble &vect)
 
static void displayRange (const String &title, const VectorDouble &vect)
 
static void displayRange (const String &title, const VectorInt &vect)
 
static void displayNNZ (const String &title, const VectorDouble &vect, int nclass=10)
 
static int maximum (const VectorInt &vec, bool flagAbs=false)
 
static int minimum (const VectorInt &vec, bool flagAbs=false)
 
static double maximum (const VectorDouble &vec, bool flagAbs=false)
 
static double minimum (const VectorDouble &vec, bool flagAbs=false)
 
static double maximum (const VectorVectorDouble &vec, bool flagAbs=false)
 
static double minimum (const VectorVectorDouble &vec, bool flagAbs=false)
 
static int product (const VectorInt &nx)
 
static double product (const VectorDouble &vec)
 
static int countUndefined (const VectorDouble &vec)
 
static int countDefined (const VectorDouble &vec)
 
static double extensionDiagonal (const VectorDouble &mini, const VectorDouble &maxi)
 
static int cumul (const VectorInt &vec)
 
static double cumul (const VectorDouble &vec)
 
static double mean (const VectorDouble &vec)
 
static double variance (const VectorDouble &vec, bool scaleByN=false)
 
static double stdv (const VectorDouble &vec, bool scaleByN=false)
 
static double norm (const VectorDouble &vec)
 
static double median (const VectorDouble &vec)
 
static double normDistance (const VectorDouble &veca, const VectorDouble &vecb)
 
static double correlation (const VectorDouble &veca, const VectorDouble &vecb)
 
static VectorDouble quantiles (const VectorDouble &vec, const VectorDouble &probas)
 
static bool isConstant (const VectorDouble &vect, double refval=TEST)
 
static bool isConstant (const VectorInt &vect, int refval=ITEST)
 
static bool isSame (const VectorDouble &v1, const VectorDouble &v2, double eps=EPSILON10)
 
static bool isSame (const VectorInt &v1, const VectorInt &v2)
 
static VectorInt sequence (int number, int ideb=0, int step=1)
 
static VectorDouble sequence (double valFrom, double valTo, double valStep=1., double ratio=1.)
 
static void fill (VectorDouble &vec, double v, int size=0)
 
static void fill (VectorInt &vec, int v, int size=0)
 
static void fill (VectorVectorDouble &vec, double value)
 
static void fillUndef (VectorDouble &vec, double repl)
 
static VectorDouble add (const VectorDouble &veca, const VectorDouble &vecb)
 
static void addInPlace (VectorDouble &dest, const VectorDouble &src)
 
static void addInPlace (const VectorDouble &veca, const VectorDouble &vecb, VectorDouble &res, int size=0)
 
static void addInPlace (const double *veca, const double *vecb, double *res, int size)
 
static void addInPlace (const VectorVectorDouble &in1, const VectorVectorDouble &in2, VectorVectorDouble &outv)
 
static VectorDouble subtract (const VectorDouble &veca, const VectorDouble &vecb)
 
static void subtractInPlace (VectorDouble &dest, const VectorDouble &src)
 
static void subtractInPlace (VectorInt &dest, const VectorInt &src)
 
static void subtractInPlace (const VectorVectorDouble &in1, const VectorVectorDouble &in2, VectorVectorDouble &outv)
 
static void multiplyInPlace (VectorDouble &vec, const VectorDouble &v)
 
static void divideInPlace (VectorDouble &vec, const VectorDouble &v)
 
static void multiplyConstant (VectorDouble &vec, double v)
 
static void multiplyConstantInPlace (const VectorDouble &vec, double v, VectorDouble &vecout)
 
static void addMultiplyConstantInPlace (double val1, const VectorVectorDouble &in1, VectorVectorDouble &outv)
 
static void divideConstant (VectorDouble &vec, double v)
 
static void copy (const VectorDouble &vecin, VectorDouble &vecout, int size=-1)
 
static void copy (const VectorInt &vecin, VectorInt &vecout, int size=-1)
 
static void copy (const VectorVectorDouble &inv, VectorVectorDouble &outv)
 
static void addConstant (VectorDouble &vec, double v)
 
static void addConstant (VectorInt &vec, int v)
 
static void normalize (VectorDouble &vec)
 
static void normalize (double *tab, int ntab)
 
static void normalizeFromGaussianDistribution (VectorDouble &vec, double mini=0., double maxi=1.)
 
static VectorDouble normalScore (const VectorDouble &data, const VectorDouble &wt=VectorDouble())
 
static VectorDouble qnormVec (const VectorDouble &vec)
 
static VectorDouble pnormVec (const VectorDouble &vec)
 
static VectorDouble concatenate (const VectorDouble &veca, const VectorDouble &vecb)
 
static VectorDouble power (const VectorDouble &vec, double power)
 
static VectorDouble inverse (const VectorDouble &vec)
 
static double innerProduct (const VectorDouble &veca, const VectorDouble &vecb, int size=-1)
 
static double innerProduct (const double *veca, const double *vecb, int size)
 
static double innerProduct (const VectorVectorDouble &x, const VectorVectorDouble &y)
 
static VectorDouble crossProduct3D (const VectorDouble &veca, const VectorDouble &vecb)
 
static void crossProduct3DInPlace (const double *a, const double *b, double *v)
 
static void cumulate (VectorDouble &veca, const VectorDouble &vecb, double coeff=1., double addval=0.)
 
static void getMostSignificant (const VectorDouble &vec, double tol=EPSILON6, int nmax=-1)
 
static VectorDouble simulateUniform (int n=1, double mini=0., double maxi=1.)
 
static VectorDouble simulateBernoulli (int n=1, double proba=0.5, double vone=1., double velse=0.)
 
static VectorDouble simulateGaussian (int n=1, double mean=0., double sigma=1.)
 
static void simulateGaussianInPlace (VectorDouble &vect, double mean=0., double sigma=1.)
 
static VectorInt sampleRanks (int ntotal, double proportion=0., int number=0, int seed=242141, int optSort=0)
 
static bool isInList (const VectorInt &vec, int item)
 
static VectorInt sort (const VectorInt &vecin, bool ascending=true, int size=-1)
 
static VectorDouble sort (const VectorDouble &vecin, bool ascending=true, int size=-1)
 
static void sortInPlace (VectorInt &vecin, bool ascending=true, int size=-1)
 
static void sortInPlace (VectorDouble &vecin, bool ascending=true, int size=-1)
 
static VectorDouble unique (const VectorDouble &vecin, int size=-1)
 
static VectorInt unique (const VectorInt &vecin, int size=-1)
 
static VectorInt orderRanks (const VectorInt &vecin, bool ascending=true, int size=-1)
 
static VectorInt orderRanks (const VectorDouble &vecin, bool ascending=true, int size=-1)
 
static VectorInt sortRanks (const VectorDouble &vecin, bool ascending=true, int size=-1)
 
static VectorInt reorder (const VectorInt &vecin, const VectorInt &order, int size=-1)
 
static VectorDouble reorder (const VectorDouble &vecin, const VectorInt &order, int size=-1)
 
static void arrangeInPlace (int safe, VectorInt &ranks, VectorDouble &values, bool ascending=true, int size=-1)
 
static void arrangeInPlace (int safe, VectorInt &ranks, VectorInt &values, bool ascending=true, int size=-1)
 
static VectorInt filter (const VectorInt &vecin, int vmin=ITEST, int vmax=ITEST, bool ascending=true)
 
static std::pair< double, double > rangeVals (const VectorDouble &vec)
 
static VectorDouble flatten (const VectorVectorDouble &vvd)
 
static VectorVectorDouble unflatten (const VectorDouble &vd, const VectorInt &sizes)
 
static void flattenInPlace (const VectorVectorDouble &vvd, VectorDouble &vd)
 
static void unflattenInPlace (const VectorDouble &vd, VectorVectorDouble &vvd)
 
static void linearComb (double val1, const VectorVectorDouble &in1, double val2, const VectorVectorDouble &in2, VectorVectorDouble &outv)
 
static VectorDouble suppressTest (const VectorDouble &vecin)
 

Member Function Documentation

◆ add()

VectorDouble VectorHelper::add ( const VectorDouble veca,
const VectorDouble vecb 
)
static

◆ addConstant() [1/2]

void VectorHelper::addConstant ( VectorDouble vec,
double  v 
)
static

◆ addConstant() [2/2]

void VectorHelper::addConstant ( VectorInt vec,
int  v 
)
static

◆ addInPlace() [1/4]

void VectorHelper::addInPlace ( const double *  veca,
const double *  vecb,
double *  res,
int  size 
)
static

◆ addInPlace() [2/4]

void VectorHelper::addInPlace ( const VectorDouble veca,
const VectorDouble vecb,
VectorDouble res,
int  size = 0 
)
static

◆ addInPlace() [3/4]

void VectorHelper::addInPlace ( const VectorVectorDouble in1,
const VectorVectorDouble in2,
VectorVectorDouble outv 
)
static

◆ addInPlace() [4/4]

void VectorHelper::addInPlace ( VectorDouble dest,
const VectorDouble src 
)
static

Performs: veca += vecb

Parameters
destInput/Output vector
srcAuxiliary vector

◆ addMultiplyConstantInPlace()

void VectorHelper::addMultiplyConstantInPlace ( double  val1,
const VectorVectorDouble in1,
VectorVectorDouble outv 
)
static

◆ arrangeInPlace() [1/2]

void VectorHelper::arrangeInPlace ( int  safe,
VectorInt ranks,
VectorDouble values,
bool  ascending = true,
int  size = -1 
)
static

Sorts the (double) array value() and the array ranks() if provided

Parameters
[in]safe1 if the value array if preserved 0 if the value array is also sorted
[in]ascendingSorting order
[in]sizeOptional vector dimension
[out]ranksinput and output int array
[out]valuesinput and output double array
Remarks
If ranks = NULL, ranks is ignored
When using 'size', the remaining part of arrays is unchanged

◆ arrangeInPlace() [2/2]

void VectorHelper::arrangeInPlace ( int  safe,
VectorInt ranks,
VectorInt values,
bool  ascending = true,
int  size = -1 
)
static

Sorts the (int) array value() and the array ranks() if provided

Parameters
[in]safe1 if the value array if preserved 0 if the value array is also sorted
[in]ascendingTrue for ascending order; False for descending order
[in]sizeOptional size
[out]ranksintput and output int array
[out]valuesinput and output int array
Remarks
If ranks = NULL, ranks is ignored
When using 'size', the remaining part of arrays is unchanged

◆ concatenate()

VectorDouble VectorHelper::concatenate ( const VectorDouble veca,
const VectorDouble vecb 
)
static

◆ copy() [1/3]

void VectorHelper::copy ( const VectorDouble vecin,
VectorDouble vecout,
int  size = -1 
)
static

◆ copy() [2/3]

void VectorHelper::copy ( const VectorInt vecin,
VectorInt vecout,
int  size = -1 
)
static

◆ copy() [3/3]

void VectorHelper::copy ( const VectorVectorDouble inv,
VectorVectorDouble outv 
)
static

◆ correlation()

double VectorHelper::correlation ( const VectorDouble veca,
const VectorDouble vecb 
)
static

◆ countDefined()

int VectorHelper::countDefined ( const VectorDouble vec)
static

◆ countUndefined()

int VectorHelper::countUndefined ( const VectorDouble vec)
static

◆ crossProduct3D()

VectorDouble VectorHelper::crossProduct3D ( const VectorDouble veca,
const VectorDouble vecb 
)
static

Cross product (limited to 3D)

Parameters
vecaFirst vector
vecbSecond Vector
Returns

◆ crossProduct3DInPlace()

void VectorHelper::crossProduct3DInPlace ( const double *  a,
const double *  b,
double *  v 
)
static

◆ cumul() [1/2]

double VectorHelper::cumul ( const VectorDouble vec)
static

◆ cumul() [2/2]

int VectorHelper::cumul ( const VectorInt vec)
static

◆ cumulate()

void VectorHelper::cumulate ( VectorDouble veca,
const VectorDouble vecb,
double  coeff = 1.,
double  addval = 0. 
)
static

◆ display() [1/4]

void VectorHelper::display ( const String title,
const VectorDouble vect,
bool  skipLine = true 
)
static

◆ display() [2/4]

void VectorHelper::display ( const String title,
const VectorInt vect,
bool  skipLine = true 
)
static

◆ display() [3/4]

void VectorHelper::display ( const String title,
const VectorString vect,
bool  skipLine = true 
)
static

◆ display() [4/4]

void VectorHelper::display ( const String title,
const VectorVectorDouble vect,
bool  skipLine = true 
)
static

◆ displayNNZ()

void VectorHelper::displayNNZ ( const String title,
const VectorDouble vect,
int  nclass = 10 
)
static

◆ displayRange() [1/2]

void VectorHelper::displayRange ( const String title,
const VectorDouble vect 
)
static

◆ displayRange() [2/2]

void VectorHelper::displayRange ( const String title,
const VectorInt vect 
)
static

◆ displayStats()

void VectorHelper::displayStats ( const String title,
const VectorDouble vect 
)
static

◆ divideConstant()

void VectorHelper::divideConstant ( VectorDouble vec,
double  v 
)
static

◆ divideInPlace()

void VectorHelper::divideInPlace ( VectorDouble vec,
const VectorDouble v 
)
static

◆ extensionDiagonal()

double VectorHelper::extensionDiagonal ( const VectorDouble mini,
const VectorDouble maxi 
)
static

Calculate the diagonal of the box extension

Parameters
miniArray of lower coordinates of the box
maxiArray of upper coordinates of the box
Returns
Remarks
If one coordinate is undefined, TEST is returned.

◆ fill() [1/3]

void VectorHelper::fill ( VectorDouble vec,
double  v,
int  size = 0 
)
static

◆ fill() [2/3]

void VectorHelper::fill ( VectorInt vec,
int  v,
int  size = 0 
)
static

◆ fill() [3/3]

void VectorHelper::fill ( VectorVectorDouble vec,
double  value 
)
static

◆ fillUndef()

void VectorHelper::fillUndef ( VectorDouble vec,
double  repl 
)
static

◆ filter()

VectorInt VectorHelper::filter ( const VectorInt vecin,
int  vmin = ITEST,
int  vmax = ITEST,
bool  ascending = true 
)
static

From an input list, filter out all the elements which do no lie within [vmin, vmax], suppress double occurrences and sort them out (ascending or descending)

Parameters
vecinInput array (integer)
vminlower bound included (or ITEST)
vmaxupper bound excluded (or ITEST)
ascendingTrue for ascending order; False for descending order
Returns
Output array (integers)

◆ flatten()

VectorDouble VectorHelper::flatten ( const VectorVectorDouble vvd)
static

Method which flattens a VectorVectorDouble into a VectorDouble

Parameters
vvdInput VectorVectorDouble
Returns
Returned VectorDouble

◆ flattenInPlace()

void VectorHelper::flattenInPlace ( const VectorVectorDouble vvd,
VectorDouble vd 
)
static

◆ getMostSignificant()

void VectorHelper::getMostSignificant ( const VectorDouble vec,
double  tol = EPSILON6,
int  nmax = -1 
)
static

Display the first significant values of the input vector. A "significant" value is a value larger than 'tol' in absolute value Values are listed by decreasing importance.

Parameters
vecInput Vector
tolTolerance above which a value is significant (in absolute value)
nmaxLimit on the number of values printed (-1: no limit)

◆ initVDouble() [1/2]

VectorDouble VectorHelper::initVDouble ( const double *  values,
int  number 
)
static

◆ initVDouble() [2/2]

VectorDouble VectorHelper::initVDouble ( int  nval,
double  value = 0. 
)
static

◆ initVInt() [1/2]

VectorInt VectorHelper::initVInt ( const int *  values,
int  number 
)
static

◆ initVInt() [2/2]

VectorInt VectorHelper::initVInt ( int  nval,
int  value = 0. 
)
static

◆ initVVDouble() [1/2]

VectorVectorDouble VectorHelper::initVVDouble ( const double *  value,
int  n1,
int  n2 
)
static

◆ initVVDouble() [2/2]

VectorVectorDouble VectorHelper::initVVDouble ( int  nval1,
int  nval2,
double  value = 0. 
)
static

◆ initVVInt()

VectorVectorInt VectorHelper::initVVInt ( int  nval1,
int  nval2,
int  value = 0 
)
static

◆ innerProduct() [1/3]

double VectorHelper::innerProduct ( const double *  veca,
const double *  vecb,
int  size 
)
static

◆ innerProduct() [2/3]

double VectorHelper::innerProduct ( const VectorDouble veca,
const VectorDouble vecb,
int  size = -1 
)
static

◆ innerProduct() [3/3]

double VectorHelper::innerProduct ( const VectorVectorDouble x,
const VectorVectorDouble y 
)
static

◆ inverse()

VectorDouble VectorHelper::inverse ( const VectorDouble vec)
static

◆ isConstant() [1/2]

bool VectorHelper::isConstant ( const VectorDouble vect,
double  refval = TEST 
)
static

Check if the contents of a vector is constant (equal to 'refval' is defined)

Parameters
vectInput vector
refvalReference value (TEST if not defined)
Returns

◆ isConstant() [2/2]

bool VectorHelper::isConstant ( const VectorInt vect,
int  refval = ITEST 
)
static

Check if the contents of a vector is constant (equal to 'refval' is defined)

Parameters
vectInput vector
refvalReference value (ITEST if not defined)
Returns

◆ isInList()

bool VectorHelper::isInList ( const VectorInt vec,
int  item 
)
static

◆ isSame() [1/2]

bool VectorHelper::isSame ( const VectorDouble v1,
const VectorDouble v2,
double  eps = EPSILON10 
)
static

◆ isSame() [2/2]

bool VectorHelper::isSame ( const VectorInt v1,
const VectorInt v2 
)
static

◆ linearComb()

void VectorHelper::linearComb ( double  val1,
const VectorVectorDouble in1,
double  val2,
const VectorVectorDouble in2,
VectorVectorDouble outv 
)
static

◆ maximum() [1/3]

double VectorHelper::maximum ( const VectorDouble vec,
bool  flagAbs = false 
)
static

◆ maximum() [2/3]

int VectorHelper::maximum ( const VectorInt vec,
bool  flagAbs = false 
)
static

◆ maximum() [3/3]

double VectorHelper::maximum ( const VectorVectorDouble vec,
bool  flagAbs = false 
)
static

◆ mean()

double VectorHelper::mean ( const VectorDouble vec)
static

◆ median()

double VectorHelper::median ( const VectorDouble vec)
static

◆ minimum() [1/3]

double VectorHelper::minimum ( const VectorDouble vec,
bool  flagAbs = false 
)
static

◆ minimum() [2/3]

int VectorHelper::minimum ( const VectorInt vec,
bool  flagAbs = false 
)
static

◆ minimum() [3/3]

double VectorHelper::minimum ( const VectorVectorDouble vec,
bool  flagAbs = false 
)
static

◆ multiplyConstant()

void VectorHelper::multiplyConstant ( VectorDouble vec,
double  v 
)
static

◆ multiplyConstantInPlace()

void VectorHelper::multiplyConstantInPlace ( const VectorDouble vec,
double  v,
VectorDouble vecout 
)
static

◆ multiplyInPlace()

void VectorHelper::multiplyInPlace ( VectorDouble vec,
const VectorDouble v 
)
static

◆ norm()

double VectorHelper::norm ( const VectorDouble vec)
static

◆ normalize() [1/2]

void VectorHelper::normalize ( double *  tab,
int  ntab 
)
static

◆ normalize() [2/2]

void VectorHelper::normalize ( VectorDouble vec)
static

◆ normalizeFromGaussianDistribution()

void VectorHelper::normalizeFromGaussianDistribution ( VectorDouble vec,
double  mini = 0.,
double  maxi = 1. 
)
static

◆ normalScore()

VectorDouble VectorHelper::normalScore ( const VectorDouble data,
const VectorDouble wt = VectorDouble() 
)
static

◆ normDistance()

double VectorHelper::normDistance ( const VectorDouble veca,
const VectorDouble vecb 
)
static

◆ orderRanks() [1/2]

VectorInt VectorHelper::orderRanks ( const VectorDouble vecin,
bool  ascending = true,
int  size = -1 
)
static

Returns the permutation which rearranges the input vector into any order

Parameters
vecinInput vector
ascendingTrue for ascending order; False otherwise
sizeOptional vector dimension
Returns
Vector of orders

◆ orderRanks() [2/2]

VectorInt VectorHelper::orderRanks ( const VectorInt vecin,
bool  ascending = true,
int  size = -1 
)
static

Returns the permutation which rearranges the input vector into any order

Parameters
vecinInput vector
ascendingTrue for ascending order; False otherwise
sizeOptional dimension of the input vector
Returns
Vector of orders

◆ pnormVec()

VectorDouble VectorHelper::pnormVec ( const VectorDouble vec)
static

◆ power()

VectorDouble VectorHelper::power ( const VectorDouble vec,
double  power 
)
static

◆ product() [1/2]

double VectorHelper::product ( const VectorDouble vec)
static

◆ product() [2/2]

int VectorHelper::product ( const VectorInt nx)
static

◆ qnormVec()

VectorDouble VectorHelper::qnormVec ( const VectorDouble vec)
static

◆ quantiles()

VectorDouble VectorHelper::quantiles ( const VectorDouble vec,
const VectorDouble probas 
)
static

Calculate the quantiles

Parameters
vecArray of values
probasArray of probabilities (sorted by ascending order)
Returns
Vector of data values for the different probabilities

◆ rangeVals()

std::pair< double, double > VectorHelper::rangeVals ( const VectorDouble vec)
static

◆ reorder() [1/2]

VectorDouble VectorHelper::reorder ( const VectorDouble vecin,
const VectorInt order,
int  size = -1 
)
static

◆ reorder() [2/2]

VectorInt VectorHelper::reorder ( const VectorInt vecin,
const VectorInt order,
int  size = -1 
)
static

◆ sampleRanks()

VectorInt VectorHelper::sampleRanks ( int  ntotal,
double  proportion = 0.,
int  number = 0,
int  seed = 242141,
int  optSort = 0 
)
static

Sample a set of 'ntotal' ranks (unique occurrence)

Parameters
ntotalDimension to be sampled
proportionProportion of elected samples (in [0,1])
numberNumber of elected samples
seedSeed used for the random number generator
optSortSorting: 0 for None; 1 for Ascending; -1 for Descending
Returns
A vector of indices lying between 0 and ntotal-1. No duplicate.
Remarks
If 'proportion' and 'number' are not specified,
the output vector has dimension equal to 'ntotal'

◆ sequence() [1/2]

VectorDouble VectorHelper::sequence ( double  valFrom,
double  valTo,
double  valStep = 1.,
double  ratio = 1. 
)
static

Create an output vector going from 'valFrom' to 'ValTo' by step of 'valStep' Create a vector containing the a sequence of numbers

Parameters
valFromStarting value
valToEnding value
valStepStep
ratioThe whole sequence can be ultimately scaled by 'ratio'
Returns

◆ sequence() [2/2]

VectorInt VectorHelper::sequence ( int  number,
int  ideb = 0,
int  step = 1 
)
static

Create an output vector containing the 'number' consecutive numbers starting from 'ideb'

Parameters
numberLength of the output vector
idebIndex of the first element of the output vector
stepStep between two consecutive values

◆ simulateBernoulli()

VectorDouble VectorHelper::simulateBernoulli ( int  n = 1,
double  proba = 0.5,
double  vone = 1.,
double  velse = 0. 
)
static

◆ simulateGaussian()

VectorDouble VectorHelper::simulateGaussian ( int  n = 1,
double  mean = 0.,
double  sigma = 1. 
)
static

◆ simulateGaussianInPlace()

void VectorHelper::simulateGaussianInPlace ( VectorDouble vect,
double  mean = 0.,
double  sigma = 1. 
)
static

◆ simulateUniform()

VectorDouble VectorHelper::simulateUniform ( int  n = 1,
double  mini = 0.,
double  maxi = 1. 
)
static

◆ sort() [1/2]

VectorDouble VectorHelper::sort ( const VectorDouble vecin,
bool  ascending = true,
int  size = -1 
)
static

◆ sort() [2/2]

VectorInt VectorHelper::sort ( const VectorInt vecin,
bool  ascending = true,
int  size = -1 
)
static

◆ sortInPlace() [1/2]

void VectorHelper::sortInPlace ( VectorDouble vecin,
bool  ascending = true,
int  size = -1 
)
static

◆ sortInPlace() [2/2]

void VectorHelper::sortInPlace ( VectorInt vecin,
bool  ascending = true,
int  size = -1 
)
static

◆ sortRanks()

VectorInt VectorHelper::sortRanks ( const VectorDouble vecin,
bool  ascending = true,
int  size = -1 
)
static

◆ stdv()

double VectorHelper::stdv ( const VectorDouble vec,
bool  scaleByN = false 
)
static

◆ subtract()

VectorDouble VectorHelper::subtract ( const VectorDouble veca,
const VectorDouble vecb 
)
static

Return a vector containing vecb - veca

Parameters
vecaInput Vector
vecbInput Vector
Returns

◆ subtractInPlace() [1/3]

void VectorHelper::subtractInPlace ( const VectorVectorDouble in1,
const VectorVectorDouble in2,
VectorVectorDouble outv 
)
static

◆ subtractInPlace() [2/3]

void VectorHelper::subtractInPlace ( VectorDouble dest,
const VectorDouble src 
)
static

Performs: veca -= vecb

Parameters
destInput/Output vector
srcAuxiliary vector

◆ subtractInPlace() [3/3]

void VectorHelper::subtractInPlace ( VectorInt dest,
const VectorInt src 
)
static

◆ suppressTest()

VectorDouble VectorHelper::suppressTest ( const VectorDouble vecin)
static

◆ toStringAsVD()

String VectorHelper::toStringAsVD ( const VectorDouble vec)
static

◆ toStringAsVI()

String VectorHelper::toStringAsVI ( const VectorInt vec)
static

◆ toStringAsVS()

String VectorHelper::toStringAsVS ( const VectorString vec)
static

◆ toStringAsVVD()

String VectorHelper::toStringAsVVD ( const VectorVectorDouble vec)
static

◆ unflatten()

VectorVectorDouble VectorHelper::unflatten ( const VectorDouble vd,
const VectorInt sizes 
)
static

◆ unflattenInPlace()

void VectorHelper::unflattenInPlace ( const VectorDouble vd,
VectorVectorDouble vvd 
)
static

◆ unique() [1/2]

VectorDouble VectorHelper::unique ( const VectorDouble vecin,
int  size = -1 
)
static

◆ unique() [2/2]

VectorInt VectorHelper::unique ( const VectorInt vecin,
int  size = -1 
)
static

◆ variance()

double VectorHelper::variance ( const VectorDouble vec,
bool  scaleByN = false 
)
static

The documentation for this class was generated from the following files: