queso-0.51.1
|
Class for handling scalar samples. More...
#include <ScalarSequence.h>
Public Types | |
Class typedefs | |
typedef std::vector< T >::iterator | seqScalarPositionIteratorTypedef |
typedef std::vector< T > ::const_iterator | seqScalarPositionConstIteratorTypedef |
Public Member Functions | |
Constructor/Destructor methods | |
ScalarSequence (const BaseEnvironment &env, unsigned int subSequenceSize, const std::string &name) | |
Default constructor. More... | |
~ScalarSequence () | |
Destructor. More... | |
Set methods | |
ScalarSequence< T > & | operator= (const ScalarSequence< T > &rhs) |
Assignment operator; it copies rhs to this . More... | |
Access methods | |
const T & | operator[] (unsigned int posId) const |
Access position posId of the sequence of scalars (const). More... | |
T & | operator[] (unsigned int posId) |
Access position posId of the sequence of scalars (non-const). More... | |
Sequence methods | |
const BaseEnvironment & | env () const |
Access to QUESO environment. More... | |
const std::string & | name () const |
Access to the name of the sequence of scalars. More... | |
void | setName (const std::string &newName) |
Sets a new name to the sequence of scalars. More... | |
void | clear () |
Clears the sequence of scalars. More... | |
unsigned int | subSequenceSize () const |
Size of the sub-sequence of scalars. More... | |
unsigned int | unifiedSequenceSize (bool useOnlyInter0Comm) const |
Size of the unified sequence of scalars. More... | |
void | resizeSequence (unsigned int newSequenceSize) |
Resizes the size of the sequence of scalars. More... | |
void | resetValues (unsigned int initialPos, unsigned int) |
Sets numPos values of the sequence to zero, starting at position initialPos . More... | |
void | erasePositions (unsigned int initialPos, unsigned int numPos) |
Erases numPos values of the sequence, starting at position initialPos . More... | |
void | getUnifiedContentsAtProc0Only (bool useOnlyInter0Comm, std::vector< T > &outputVec) const |
Gets the unified contents of processor of rank equals to 0. More... | |
const T & | subMinPlain () const |
Finds the minimum value of the sub-sequence of scalars. More... | |
const T & | unifiedMinPlain (bool useOnlyInter0Comm) const |
Finds the minimum value of the unified sequence of scalars. More... | |
const T & | subMaxPlain () const |
Finds the maximum value of the sub-sequence of scalars. More... | |
const T & | unifiedMaxPlain (bool useOnlyInter0Comm) const |
Finds the maximum value of the unified sequence of scalars. More... | |
const T & | subMeanPlain () const |
Finds the mean value of the sub-sequence of scalars. More... | |
const T & | unifiedMeanPlain (bool useOnlyInter0Comm) const |
Finds the mean value of the unified sequence of scalars. More... | |
const T & | subMedianPlain () const |
Finds the median value of the sub-sequence of scalars. More... | |
const T & | unifiedMedianPlain (bool useOnlyInter0Comm) const |
Finds the median value of the unified sequence of scalars. More... | |
const T & | subSampleVariancePlain () const |
Finds the variance of a sample of the sub-sequence of scalars. More... | |
const T & | unifiedSampleVariancePlain (bool useOnlyInter0Comm) const |
Finds the variance of a sample of the unified sequence of scalars. More... | |
void | deleteStoredScalars () |
Deletes all stored scalars. More... | |
void | setGaussian (const T &mean, const T &stdDev) |
Sets the values of the sequence as a Gaussian distribution of mean given by meanVec and standard deviation by stdDevVec . More... | |
void | setUniform (const T &a, const T &b) |
Sets the values of the sequence as a uniform distribution between the values given by vectors aVec and bVec . More... | |
void | subUniformlySampledCdf (unsigned int numIntervals, T &minDomainValue, T &maxDomainValue, std::vector< T > &cdfValues) const |
Uniformly samples from the CDF from the sub-sequence. More... | |
void | unifiedUniformlySampledCdf (bool useOnlyInter0Comm, unsigned int numIntervals, T &unifiedMinDomainValue, T &unifiedMaxDomainValue, std::vector< T > &unifiedCdfValues) const |
Uniformly samples from the CDF from the unified sequence. More... | |
void | subBasicCdf (unsigned int numIntervals, UniformOneDGrid< T > *&gridValues, std::vector< T > &cdfValues) const |
Finds the Cumulative Distribution Function (CDF) of the sub-sequence of scalars. More... | |
void | subWeightCdf (unsigned int numIntervals, std::vector< T > &gridValues, std::vector< T > &cdfValues) const |
Finds the Weighted Cumulative Distribution Function (CDF) of the sub-sequence of scalars. More... | |
void | subWeightCdf (unsigned int numIntervals, UniformOneDGrid< T > *&gridValues, std::vector< T > &cdfValues) const |
Finds the Weighted Cumulative Distribution Function (CDF) of the sub-sequence of scalars. More... | |
T | subMeanExtra (unsigned int initialPos, unsigned int numPos) const |
Finds the mean value of the sub-sequence, considering numPos positions starting at position initialPos . More... | |
T | unifiedMeanExtra (bool useOnlyInter0Comm, unsigned int initialPos, unsigned int localNumPos) const |
Finds the mean value of the unified sequence of numPos positions starting at position initialPos . More... | |
T | subMedianExtra (unsigned int initialPos, unsigned int numPos) const |
Finds the median value of the sub-sequence, considering numPos positions starting at position initialPos . More... | |
T | unifiedMedianExtra (bool useOnlyInter0Comm, unsigned int initialPos, unsigned int localNumPos) const |
Finds the median value of the unified sequence, considering numPos positions starting at position initialPos . More... | |
T | subSampleVarianceExtra (unsigned int initialPos, unsigned int numPos, const T &meanValue) const |
Finds the sample variance of the sub-sequence, considering numPos positions starting at position initialPos and of mean meanVec . More... | |
T | unifiedSampleVarianceExtra (bool useOnlyInter0Comm, unsigned int initialPos, unsigned int localNumPos, const T &unifiedMeanValue) const |
Finds the sample variance of the unified sequence, considering numPos positions starting at position initialPos and of mean meanVec . More... | |
T | subSampleStd (unsigned int initialPos, unsigned int numPos, const T &meanValue) const |
Finds the sample standard deviation of the unified sequence, considering numPos positions starting at position initialPos and of mean meanValue . More... | |
T | unifiedSampleStd (bool useOnlyInter0Comm, unsigned int initialPos, unsigned int localNumPos, const T &unifiedMeanValue) const |
Finds the sample standard deviation of the unified sequence, considering localnumPos positions starting at position initialPos and of mean unifiedMeanValue . More... | |
T | subPopulationVariance (unsigned int initialPos, unsigned int numPos, const T &meanValue) const |
Finds the population variance of the sub-sequence, considering numPos positions starting at position initialPos and of mean meanValue . More... | |
T | unifiedPopulationVariance (bool useOnlyInter0Comm, unsigned int initialPos, unsigned int numPos, const T &unifiedMeanValue) const |
Finds the population variance of the unified sequence, considering numPos positions starting at position initialPos and of mean meanValue . More... | |
T | autoCovariance (unsigned int initialPos, unsigned int numPos, const T &meanValue, unsigned int lag) const |
Calculates the autocovariance. More... | |
T | autoCorrViaDef (unsigned int initialPos, unsigned int numPos, unsigned int lag) const |
Calculates the autocorrelation via definition. More... | |
void | autoCorrViaFft (unsigned int initialPos, unsigned int numPos, unsigned int maxLag, std::vector< T > &autoCorrs) const |
Calculates the autocorrelation via Fast Fourier transforms (FFT). More... | |
void | autoCorrViaFft (unsigned int initialPos, unsigned int numPos, unsigned int numSum, T &autoCorrsSum) const |
Calculates the sum of autocorrelation via Fast Fourier transforms (FFT). More... | |
void | subMinMaxExtra (unsigned int initialPos, unsigned int numPos, T &minValue, T &maxValue) const |
Finds the minimum and the maximum values of the sub-sequence, considering numPos positions starting at position initialPos . More... | |
void | unifiedMinMaxExtra (bool useOnlyInter0Comm, unsigned int initialPos, unsigned int numPos, T &unifiedMinValue, T &unifiedMaxValue) const |
Finds the minimum and the maximum values of the unified sequence, considering numPos positions starting at position initialPos . More... | |
void | subHistogram (unsigned int initialPos, const T &minHorizontalValue, const T &maxHorizontalValue, std::vector< T > ¢ers, std::vector< unsigned int > &bins) const |
Calculates the histogram of the sub-sequence. More... | |
void | unifiedHistogram (bool useOnlyInter0Comm, unsigned int initialPos, const T &unifiedMinHorizontalValue, const T &unifiedMaxHorizontalValue, std::vector< T > &unifiedCenters, std::vector< unsigned int > &unifiedBins) const |
Calculates the histogram of the unified sequence. More... | |
void | subBasicHistogram (unsigned int initialPos, const T &minHorizontalValue, const T &maxHorizontalValue, UniformOneDGrid< T > *&gridValues, std::vector< unsigned int > &bins) const |
Calculates the histogram of the sub-sequence. More... | |
void | subWeightHistogram (unsigned int initialPos, const T &minHorizontalValue, const T &maxHorizontalValue, UniformOneDGrid< T > *&gridValues, std::vector< unsigned int > &bins) const |
Calculates the weighted histogram of the sub-sequence. More... | |
void | subWeightHistogram (unsigned int initialPos, const T &minHorizontalValue, const T &maxHorizontalValue, std::vector< T > &gridValues, std::vector< unsigned int > &bins) const |
Calculates the weighted histogram of the sub-sequence. More... | |
void | subSort (unsigned int initialPos, ScalarSequence< T > &sortedSequence) const |
Sorts the sub-sequence of scalars. More... | |
void | unifiedSort (bool useOnlyInter0Comm, unsigned int initialPos, ScalarSequence< T > &unifiedSortedSequence) const |
Sorts the unified sequence of scalars. More... | |
T | subInterQuantileRange (unsigned int initialPos) const |
Returns the interquartile range of the values in the sub-sequence. More... | |
T | unifiedInterQuantileRange (bool useOnlyInter0Comm, unsigned int initialPos) const |
Returns the interquartile range of the values in the unified sequence. More... | |
T | subScaleForKde (unsigned int initialPos, const T &iqrValue, unsigned int kdeDimension) const |
Selects the scales (output value) for the kernel density estimation, considering only the sub-sequence. More... | |
T | unifiedScaleForKde (bool useOnlyInter0Comm, unsigned int initialPos, const T &unifiedIqrValue, unsigned int kdeDimension) const |
Selects the scales (bandwidth) for the kernel density estimation, considering the unified sequence. More... | |
void | subGaussian1dKde (unsigned int initialPos, double scaleValue, const std::vector< T > &evaluationPositions, std::vector< double > &densityValues) const |
Gaussian kernel for the KDE estimate of the sub-sequence. More... | |
void | unifiedGaussian1dKde (bool useOnlyInter0Comm, unsigned int initialPos, double unifiedScaleValue, const std::vector< T > &unifiedEvaluationPositions, std::vector< double > &unifiedDensityValues) const |
Gaussian kernel for the KDE estimate of the unified sequence. More... | |
void | filter (unsigned int initialPos, unsigned int spacing) |
Filters positions in the sequence of vectors. More... | |
T | brooksGelmanConvMeasure (bool useOnlyInter0Comm, unsigned int initialPos, unsigned int spacing) const |
Estimates convergence rate using Brooks & Gelman method. More... | |
void | append (const ScalarSequence< T > &src, unsigned int srcInitialPos, unsigned int srcNumPos) |
Appends the scalar sequence src to this sequence. More... | |
T | subPositionsOfMaximum (const ScalarSequence< T > &subCorrespondingScalarValues, ScalarSequence< T > &subPositionsOfMaximum) |
Finds the positions where the maximum element occurs in the sub-sequence. More... | |
T | unifiedPositionsOfMaximum (const ScalarSequence< T > &subCorrespondingScalarValues, ScalarSequence< T > &unifiedPositionsOfMaximum) |
Finds the positions where the maximum element occurs in the unified sequence. More... | |
void | subWriteContents (unsigned int initialPos, unsigned int numPos, const std::string &fileName, const std::string &fileType, const std::set< unsigned int > &allowedSubEnvIds) const |
Writes the sub-sequence to a file. More... | |
void | subWriteContents (unsigned int initialPos, unsigned int numPos, std::ofstream &ofs, const std::string &fileType) const |
Writes the sub-sequence to a file. More... | |
void | unifiedWriteContents (const std::string &fileName, const std::string &fileType) const |
Writes the unified sequence to a file. More... | |
void | unifiedReadContents (const std::string &fileName, const std::string &fileType, const unsigned int subSequenceSize) |
Reads the unified sequence from a file. More... | |
Private Member Functions | |
void | copy (const ScalarSequence< T > &src) |
Copies the scalar sequence src to this . More... | |
void | extractScalarSeq (unsigned int initialPos, unsigned int spacing, unsigned int numPos, ScalarSequence< T > &scalarSeq) const |
Extracts a sequence of scalars. More... | |
void | extractRawData (unsigned int initialPos, unsigned int spacing, unsigned int numPos, std::vector< double > &rawData) const |
Extracts the raw data. More... | |
std::vector< T > & | rawData () |
The sequence of scalars. Access to private attribute m_seq . More... | |
void | subSort () |
Sorts the sequence of scalars in the private attribute m_seq . More... | |
void | parallelMerge (std::vector< T > &sortedBuffer, const std::vector< T > &leafData, unsigned int treeLevel) const |
Sorts/merges data in parallel using MPI. More... | |
Private Attributes | |
const BaseEnvironment & | m_env |
std::string | m_name |
std::vector< T > | m_seq |
T * | m_subMinPlain |
T * | m_unifiedMinPlain |
T * | m_subMaxPlain |
T * | m_unifiedMaxPlain |
T * | m_subMeanPlain |
T * | m_unifiedMeanPlain |
T * | m_subMedianPlain |
T * | m_unifiedMedianPlain |
T * | m_subSampleVariancePlain |
T * | m_unifiedSampleVariancePlain |
Class for handling scalar samples.
This class handles scalar samples generated by an algorithm, as well as operations that can be carried over them, e.g., calculation of means, correlation and covariance matrices.
Definition at line 54 of file ScalarSequence.h.
typedef std::vector<T>::const_iterator QUESO::ScalarSequence< T >::seqScalarPositionConstIteratorTypedef |
Definition at line 60 of file ScalarSequence.h.
typedef std::vector<T>::iterator QUESO::ScalarSequence< T >::seqScalarPositionIteratorTypedef |
Definition at line 59 of file ScalarSequence.h.
QUESO::ScalarSequence< T >::ScalarSequence | ( | const BaseEnvironment & | env, |
unsigned int | subSequenceSize, | ||
const std::string & | name | ||
) |
Default constructor.
Definition at line 31 of file ScalarSequence.C.
QUESO::ScalarSequence< T >::~ScalarSequence | ( | ) |
Destructor.
Definition at line 53 of file ScalarSequence.C.
void QUESO::ScalarSequence< T >::append | ( | const ScalarSequence< T > & | src, |
unsigned int | srcInitialPos, | ||
unsigned int | srcNumPos | ||
) |
Appends the scalar sequence src
to this
sequence.
This routine deletes all stored computed scalars.
Definition at line 2649 of file ScalarSequence.C.
References QUESO::ScalarSequence< T >::m_seq, QUESO::ScalarSequence< T >::subSequenceSize(), and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::MLSampling< P_V, P_M >::generateBalLinkedChains_all(), and QUESO::MLSampling< P_V, P_M >::generateUnbLinkedChains_all().
T QUESO::ScalarSequence< T >::autoCorrViaDef | ( | unsigned int | initialPos, |
unsigned int | numPos, | ||
unsigned int | lag | ||
) | const |
Calculates the autocorrelation via definition.
Autocorrelation is the cross-correlation of a variable with itself; it describes the correlation between values of the process at different times, as a function of the two times. It is calculated over a sequence of vectors with initial position initialPos
, considering numPos
positions, a lag of lag
, with mean given by meanValue
. Output: the calculated autocorrelations of the sequence of vectors.
Definition at line 1406 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
void QUESO::ScalarSequence< T >::autoCorrViaFft | ( | unsigned int | initialPos, |
unsigned int | numPos, | ||
unsigned int | maxLag, | ||
std::vector< T > & | autoCorrs | ||
) | const |
Calculates the autocorrelation via Fast Fourier transforms (FFT).
Definition at line 1438 of file ScalarSequence.C.
References QUESO::Fft< T >::forward(), and QUESO::Fft< T >::inverse().
Referenced by QUESO::SequenceOfVectors< V, M >::autoCorrViaFft().
void QUESO::ScalarSequence< T >::autoCorrViaFft | ( | unsigned int | initialPos, |
unsigned int | numPos, | ||
unsigned int | numSum, | ||
T & | autoCorrsSum | ||
) | const |
Calculates the sum of autocorrelation via Fast Fourier transforms (FFT).
Definition at line 1518 of file ScalarSequence.C.
References QUESO::Fft< T >::forward(), and QUESO::Fft< T >::inverse().
T QUESO::ScalarSequence< T >::autoCovariance | ( | unsigned int | initialPos, |
unsigned int | numPos, | ||
const T & | meanValue, | ||
unsigned int | lag | ||
) | const |
Calculates the autocovariance.
The autocovariance is the covariance of a variable with itself at some other time. It is calculated over a sequence of scalars with initial position initialPos
, considering numPos
positions, a lag of lag
, with mean given by meanValue
. Output: the calculated autocovariances of the sequence of scalars.
Definition at line 1373 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
T QUESO::ScalarSequence< T >::brooksGelmanConvMeasure | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
unsigned int | spacing | ||
) | const |
Estimates convergence rate using Brooks & Gelman method.
TODO: implement me!
Definition at line 2614 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
void QUESO::ScalarSequence< T >::clear | ( | ) |
Clears the sequence of scalars.
Resets its values and then its size to zero.
Definition at line 128 of file ScalarSequence.C.
Referenced by QUESO::MLSampling< P_V, P_M >::generateSequence_Step02_inter0().
|
private |
Copies the scalar sequence src
to this
.
This routine deletes all stored computed scalars.
Definition at line 3311 of file ScalarSequence.C.
References QUESO::ScalarSequence< T >::m_name, QUESO::ScalarSequence< T >::m_seq, and QUESO::ScalarSequence< T >::subSequenceSize().
void QUESO::ScalarSequence< T >::deleteStoredScalars | ( | ) |
Deletes all stored scalars.
Definition at line 488 of file ScalarSequence.C.
const BaseEnvironment & QUESO::ScalarSequence< T >::env | ( | ) | const |
Access to QUESO environment.
Definition at line 106 of file ScalarSequence.C.
Referenced by QUESO::ComputeCovCorrBetweenScalarSequences(), QUESO::ComputeSubGaussian2dKde(), QUESO::ComputeUnifiedGaussian2dKde(), and QUESO::SubF1F2Gaussian2dKdeIntegral().
void QUESO::ScalarSequence< T >::erasePositions | ( | unsigned int | initialPos, |
unsigned int | numPos | ||
) |
Erases numPos
values of the sequence, starting at position initialPos
.
This routine deletes all stored computed scalars.
Definition at line 217 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
Referenced by QUESO::ArrayOfSequences< V, M >::erasePositions().
|
private |
Extracts the raw data.
This method saves in rawData
the data from the sequence of scalars (in private attribute m_seq
) starting at position (initialPos
), with a spacing of spacing
until numPos
positions have been extracted.
Definition at line 3367 of file ScalarSequence.C.
|
private |
Extracts a sequence of scalars.
The sequence of scalars has size numPos
, and it will be extracted starting at position (initialPos
) of this
sequence of scalars, given spacing spacing
.
Definition at line 3326 of file ScalarSequence.C.
References QUESO::ScalarSequence< T >::resizeSequence().
void QUESO::ScalarSequence< T >::filter | ( | unsigned int | initialPos, |
unsigned int | spacing | ||
) |
Filters positions in the sequence of vectors.
Filtered positions will start at initialPos
, and with spacing given by spacing
.
Definition at line 2575 of file ScalarSequence.C.
Referenced by QUESO::MLSampling< P_V, P_M >::generateSequence(), QUESO::MetropolisHastingsSG< P_V, P_M >::generateSequence(), and QUESO::MLSampling< P_V, P_M >::generateSequence_Step11_inter0().
void QUESO::ScalarSequence< T >::getUnifiedContentsAtProc0Only | ( | bool | useOnlyInter0Comm, |
std::vector< T > & | outputVec | ||
) | const |
Gets the unified contents of processor of rank equals to 0.
Definition at line 252 of file ScalarSequence.C.
References RawValue_MPI_DOUBLE, RawValue_MPI_IN_PLACE, RawValue_MPI_INT, and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::MLSampling< P_V, P_M >::generateSequence_Step05_inter0(), and QUESO::MLSampling< P_V, P_M >::generateSequence_Step09_all().
const std::string & QUESO::ScalarSequence< T >::name | ( | ) | const |
ScalarSequence< T > & QUESO::ScalarSequence< T >::operator= | ( | const ScalarSequence< T > & | rhs | ) |
Assignment operator; it copies rhs
to this
.
Definition at line 60 of file ScalarSequence.C.
const T & QUESO::ScalarSequence< T >::operator[] | ( | unsigned int | posId | ) | const |
Access position posId
of the sequence of scalars (const).
Definition at line 68 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
T & QUESO::ScalarSequence< T >::operator[] | ( | unsigned int | posId | ) |
Access position posId
of the sequence of scalars (non-const).
This routine deletes all stored computed scalars.
Definition at line 86 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
|
private |
Sorts/merges data in parallel using MPI.
Definition at line 3408 of file ScalarSequence.C.
References RawValue_MPI_DOUBLE, RawValue_MPI_UNSIGNED, SCALAR_SEQUENCE_DATA_MPI_MSG, SCALAR_SEQUENCE_INIT_MPI_MSG, and SCALAR_SEQUENCE_SIZE_MPI_MSG.
|
private |
The sequence of scalars. Access to private attribute m_seq
.
Definition at line 3390 of file ScalarSequence.C.
Referenced by QUESO::ScalarSequence< T >::unifiedSort().
void QUESO::ScalarSequence< T >::resetValues | ( | unsigned int | initialPos, |
unsigned int | numPos | ||
) |
Sets numPos
values of the sequence to zero, starting at position initialPos
.
This routine deletes all stored computed scalars.
Definition at line 194 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
void QUESO::ScalarSequence< T >::resizeSequence | ( | unsigned int | newSequenceSize | ) |
Resizes the size of the sequence of scalars.
This routine deletes all stored computed scalars.
Definition at line 181 of file ScalarSequence.C.
Referenced by QUESO::ArrayOfSequences< V, M >::extractScalarSeq(), QUESO::SequenceOfVectors< V, M >::extractScalarSeq(), QUESO::ScalarSequence< T >::extractScalarSeq(), QUESO::MetropolisHastingsSG< P_V, P_M >::generateFullChain(), QUESO::MLSampling< P_V, P_M >::generateSequence_Level0_all(), QUESO::ScalarSequence< T >::subPositionsOfMaximum(), QUESO::ScalarSequence< T >::subSort(), QUESO::ScalarSequence< T >::unifiedPositionsOfMaximum(), and QUESO::ScalarSequence< T >::unifiedSort().
void QUESO::ScalarSequence< T >::setGaussian | ( | const T & | mean, |
const T & | stdDev | ||
) |
Sets the values of the sequence as a Gaussian distribution of mean given by meanVec
and standard deviation by stdDevVec
.
This routine deletes all stored computed scalars.
Definition at line 536 of file ScalarSequence.C.
Referenced by QUESO::ArrayOfSequences< V, M >::setGaussian().
void QUESO::ScalarSequence< T >::setName | ( | const std::string & | newName | ) |
Sets a new name to the sequence of scalars.
Definition at line 120 of file ScalarSequence.C.
Referenced by QUESO::MLSampling< P_V, P_M >::generateSequence(), QUESO::MLSampling< P_V, P_M >::generateSequence_Level0_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step02_inter0(), and QUESO::MLSampling< P_V, P_M >::generateSequence_Step11_inter0().
void QUESO::ScalarSequence< T >::setUniform | ( | const T & | a, |
const T & | b | ||
) |
Sets the values of the sequence as a uniform distribution between the values given by vectors aVec
and bVec
.
This routine deletes all stored computed scalars.
Definition at line 557 of file ScalarSequence.C.
Referenced by QUESO::ArrayOfSequences< V, M >::setUniform().
void QUESO::ScalarSequence< T >::subBasicCdf | ( | unsigned int | numIntervals, |
UniformOneDGrid< T > *& | gridValues, | ||
std::vector< T > & | cdfValues | ||
) | const |
Finds the Cumulative Distribution Function (CDF) of the sub-sequence of scalars.
Definition at line 736 of file ScalarSequence.C.
void QUESO::ScalarSequence< T >::subBasicHistogram | ( | unsigned int | initialPos, |
const T & | minHorizontalValue, | ||
const T & | maxHorizontalValue, | ||
UniformOneDGrid< T > *& | gridValues, | ||
std::vector< unsigned int > & | bins | ||
) | const |
Calculates the histogram of the sub-sequence.
It requires the specification of the maximum (maxHorizontalValue
) and the minimum (minHorizontalValue
) values if the data and the initial position (initialPos
) from where the data will be considered. Output: grid values that will act as the center of each bin (gridValues
) and the number of data occurrences in each bin (bins
).
Definition at line 1848 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
void QUESO::ScalarSequence< T >::subGaussian1dKde | ( | unsigned int | initialPos, |
double | scaleValue, | ||
const std::vector< T > & | evaluationPositions, | ||
std::vector< double > & | densityValues | ||
) | const |
Gaussian kernel for the KDE estimate of the sub-sequence.
Computes a probability density estimate of the sample in this
sub-sequence, starting at position initialPos
. densityValues
is the vector of density values evaluated at the points in evaluationPositions
. The estimate is based on Gaussian (normal) kernel function, using a window parameter (scaleValue
).
Definition at line 2456 of file ScalarSequence.C.
References QUESO::MiscGaussianDensity(), and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::SequenceOfVectors< V, M >::subGaussian1dKde().
void QUESO::ScalarSequence< T >::subHistogram | ( | unsigned int | initialPos, |
const T & | minHorizontalValue, | ||
const T & | maxHorizontalValue, | ||
std::vector< T > & | centers, | ||
std::vector< unsigned int > & | bins | ||
) | const |
Calculates the histogram of the sub-sequence.
It requires the specification of the maximum (maxHorizontalValue
) and the minimum (minHorizontalValue
) values if the data and the initial position (initialPos
) from where the data will be considered. Output: the center of each bin (centers
) and the number of data occurrences in each bin (bins
).
Definition at line 1696 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
Referenced by QUESO::SequenceOfVectors< V, M >::subHistogram().
T QUESO::ScalarSequence< T >::subInterQuantileRange | ( | unsigned int | initialPos | ) | const |
Returns the interquartile range of the values in the sub-sequence.
The IQR is a robust estimate of the spread of the data, since changes in the upper and lower 25% of the data do not affect it. If there are outliers in the data, then the IQR is more representative than the standard deviation as an estimate of the spread of the body of the data. The IQR is less efficient than the standard deviation as an estimate of the spread when the data is all from the normal distribution. (from Matlab)
Definition at line 2120 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
Referenced by QUESO::SequenceOfVectors< V, M >::subInterQuantileRange().
const T & QUESO::ScalarSequence< T >::subMaxPlain | ( | ) | const |
Finds the maximum value of the sub-sequence of scalars.
Definition at line 390 of file ScalarSequence.C.
Referenced by QUESO::BaseVectorSequence< V, M >::subPositionsOfMaximum(), QUESO::ScalarSequence< T >::subPositionsOfMaximum(), QUESO::BaseVectorSequence< V, M >::unifiedPositionsOfMaximum(), and QUESO::ScalarSequence< T >::unifiedPositionsOfMaximum().
T QUESO::ScalarSequence< T >::subMeanExtra | ( | unsigned int | initialPos, |
unsigned int | numPos | ||
) | const |
Finds the mean value of the sub-sequence, considering numPos
positions starting at position initialPos
.
Definition at line 862 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
Referenced by QUESO::ArrayOfSequences< V, M >::mean().
const T & QUESO::ScalarSequence< T >::subMeanPlain | ( | ) | const |
Finds the mean value of the sub-sequence of scalars.
Definition at line 416 of file ScalarSequence.C.
T QUESO::ScalarSequence< T >::subMedianExtra | ( | unsigned int | initialPos, |
unsigned int | numPos | ||
) | const |
Finds the median value of the sub-sequence, considering numPos
positions starting at position initialPos
.
Definition at line 987 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
const T & QUESO::ScalarSequence< T >::subMedianPlain | ( | ) | const |
Finds the median value of the sub-sequence of scalars.
Definition at line 440 of file ScalarSequence.C.
void QUESO::ScalarSequence< T >::subMinMaxExtra | ( | unsigned int | initialPos, |
unsigned int | numPos, | ||
T & | minValue, | ||
T & | maxValue | ||
) | const |
Finds the minimum and the maximum values of the sub-sequence, considering numPos
positions starting at position initialPos
.
Definition at line 1587 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
Referenced by QUESO::MLSampling< P_V, P_M >::generateSequence(), QUESO::ArrayOfSequences< V, M >::minMax(), and QUESO::SequenceOfVectors< V, M >::subMinMaxExtra().
const T & QUESO::ScalarSequence< T >::subMinPlain | ( | ) | const |
Finds the minimum value of the sub-sequence of scalars.
Definition at line 364 of file ScalarSequence.C.
T QUESO::ScalarSequence< T >::subPopulationVariance | ( | unsigned int | initialPos, |
unsigned int | numPos, | ||
const T & | meanValue | ||
) | const |
Finds the population variance of the sub-sequence, considering numPos
positions starting at position initialPos
and of mean meanValue
.
Output: calculated population variance of the sub-sequence of scalars. The population variance is defined by , where is the sample mean and is the sample size. This procedure lets the users choose the initial position and the number of elements of the sequence which will be used to evaluate the population variance .
Definition at line 1278 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
T QUESO::ScalarSequence< T >::subPositionsOfMaximum | ( | const ScalarSequence< T > & | subCorrespondingScalarValues, |
ScalarSequence< T > & | subPositionsOfMaximum | ||
) |
Finds the positions where the maximum element occurs in the sub-sequence.
Definition at line 2676 of file ScalarSequence.C.
References QUESO::ScalarSequence< T >::resizeSequence(), QUESO::ScalarSequence< T >::subMaxPlain(), QUESO::ScalarSequence< T >::subSequenceSize(), and UQ_FATAL_TEST_MACRO.
T QUESO::ScalarSequence< T >::subSampleStd | ( | unsigned int | initialPos, |
unsigned int | numPos, | ||
const T & | meanValue | ||
) | const |
Finds the sample standard deviation of the unified sequence, considering numPos
positions starting at position initialPos
and of mean meanValue
.
Definition at line 1181 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
T QUESO::ScalarSequence< T >::subSampleVarianceExtra | ( | unsigned int | initialPos, |
unsigned int | numPos, | ||
const T & | meanValue | ||
) | const |
Finds the sample variance of the sub-sequence, considering numPos
positions starting at position initialPos
and of mean meanVec
.
Output: calculated sample variance of the sub-sequence of scalars. The sample variance is the second sample central moment and is defined by , where is the sample mean and is the sample size. This procedure lets the users choose the initial position and the number of elements of the sequence which will be used to evaluate the sample variance.
Definition at line 1086 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
const T & QUESO::ScalarSequence< T >::subSampleVariancePlain | ( | ) | const |
Finds the variance of a sample of the sub-sequence of scalars.
Definition at line 464 of file ScalarSequence.C.
T QUESO::ScalarSequence< T >::subScaleForKde | ( | unsigned int | initialPos, |
const T & | iqrValue, | ||
unsigned int | kdeDimension | ||
) | const |
Selects the scales (output value) for the kernel density estimation, considering only the sub-sequence.
The bandwidth of the kernel is a free parameter which exhibits a strong influence on the resulting estimate. Silverman (1986) suggests the following normal-based estimates: S1 = 1.06 × (standard deviation) × n^{-1/5} S2 = 0.79 × (iqrValue
) × n^{-1/5}, where iqrValue
is the interquartile range OutputValue = 0.90 × minimum(standard deviation, iqrValue
/1.34) × n^{-1/5}. These estimates are popular due to their simplicity, and are used in QUESO with the adaptation of the exponent oven the sample size n (-1/5) with -1/(4 + kdeDimension
) where kdeDimension
is the KDE dimension.
Definition at line 2336 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
Referenced by QUESO::SequenceOfVectors< V, M >::subScalesForKde().
unsigned int QUESO::ScalarSequence< T >::subSequenceSize | ( | ) | const |
Size of the sub-sequence of scalars.
Definition at line 141 of file ScalarSequence.C.
Referenced by QUESO::ScalarSequence< T >::append(), QUESO::ComputeCovCorrBetweenScalarSequences(), QUESO::ComputeSubGaussian2dKde(), QUESO::ScalarSequence< T >::copy(), QUESO::MLSampling< P_V, P_M >::generateBalLinkedChains_all(), QUESO::MLSampling< P_V, P_M >::generateSequence(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step02_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step03_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step04_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step05_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step09_all(), QUESO::MLSampling< P_V, P_M >::generateUnbLinkedChains_all(), QUESO::SubF1F2Gaussian2dKdeIntegral(), QUESO::BaseVectorSequence< V, M >::subPositionsOfMaximum(), QUESO::ScalarSequence< T >::subPositionsOfMaximum(), QUESO::ScalarSequence< T >::unifiedInterQuantileRange(), QUESO::BaseVectorSequence< V, M >::unifiedPositionsOfMaximum(), QUESO::ScalarSequence< T >::unifiedPositionsOfMaximum(), and QUESO::ScalarSequence< T >::unifiedSort().
void QUESO::ScalarSequence< T >::subSort | ( | unsigned int | initialPos, |
ScalarSequence< T > & | sortedSequence | ||
) | const |
Sorts the sub-sequence of scalars.
Definition at line 1993 of file ScalarSequence.C.
References QUESO::ScalarSequence< T >::resizeSequence(), and QUESO::ScalarSequence< T >::subSort().
Referenced by QUESO::ScalarSequence< T >::subSort().
|
private |
Sorts the sequence of scalars in the private attribute m_seq
.
Definition at line 3398 of file ScalarSequence.C.
void QUESO::ScalarSequence< T >::subUniformlySampledCdf | ( | unsigned int | numIntervals, |
T & | minDomainValue, | ||
T & | maxDomainValue, | ||
std::vector< T > & | cdfValues | ||
) | const |
Uniformly samples from the CDF from the sub-sequence.
Definition at line 592 of file ScalarSequence.C.
void QUESO::ScalarSequence< T >::subWeightCdf | ( | unsigned int | numIntervals, |
std::vector< T > & | gridValues, | ||
std::vector< T > & | cdfValues | ||
) | const |
Finds the Weighted Cumulative Distribution Function (CDF) of the sub-sequence of scalars.
Definition at line 773 of file ScalarSequence.C.
void QUESO::ScalarSequence< T >::subWeightCdf | ( | unsigned int | numIntervals, |
UniformOneDGrid< T > *& | gridValues, | ||
std::vector< T > & | cdfValues | ||
) | const |
Finds the Weighted Cumulative Distribution Function (CDF) of the sub-sequence of scalars.
Definition at line 825 of file ScalarSequence.C.
void QUESO::ScalarSequence< T >::subWeightHistogram | ( | unsigned int | initialPos, |
const T & | minHorizontalValue, | ||
const T & | maxHorizontalValue, | ||
UniformOneDGrid< T > *& | gridValues, | ||
std::vector< unsigned int > & | bins | ||
) | const |
Calculates the weighted histogram of the sub-sequence.
TODO:Note that this method is exactly the same as subBasicHistogram().
It requires the specification of the maximum (maxHorizontalValue
) and the minimum (minHorizontalValue
) values if the data and the initial position (initialPos
) from where the data will be considered. Output: grid values that will act as the center of each bin (gridValues
) and the number of data occurrences in each bin (bins
).
Definition at line 1893 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
void QUESO::ScalarSequence< T >::subWeightHistogram | ( | unsigned int | initialPos, |
const T & | minHorizontalValue, | ||
const T & | maxHorizontalValue, | ||
std::vector< T > & | gridValues, | ||
std::vector< unsigned int > & | bins | ||
) | const |
Calculates the weighted histogram of the sub-sequence.
In this method, gridValues
is a std::vector<T>, but internally, it will be copied to an structure of the type UniformOneDGrid<T>.
Definition at line 1938 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
void QUESO::ScalarSequence< T >::subWriteContents | ( | unsigned int | initialPos, |
unsigned int | numPos, | ||
const std::string & | fileName, | ||
const std::string & | fileType, | ||
const std::set< unsigned int > & | allowedSubEnvIds | ||
) | const |
Writes the sub-sequence to a file.
Given the allowed sub environments (allowedSubEnvIds
) that are allowed to write to file, together with the file name and type (fileName
, fileType
), it writes the entire sub- sequence to the file. The sum of the initial position of the sequence (initialPos
) with the number of positions that will be written (numPos
) must equal the size of the sequence.
Definition at line 2742 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
Referenced by QUESO::MetropolisHastingsSG< P_V, P_M >::generateFullChain(), and QUESO::MetropolisHastingsSG< P_V, P_M >::generateSequence().
void QUESO::ScalarSequence< T >::subWriteContents | ( | unsigned int | initialPos, |
unsigned int | numPos, | ||
std::ofstream & | ofs, | ||
const std::string & | fileType | ||
) | const |
Writes the sub-sequence to a file.
Uses object of the type std::ofstream.
Definition at line 2773 of file ScalarSequence.C.
void QUESO::ScalarSequence< T >::unifiedGaussian1dKde | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
double | unifiedScaleValue, | ||
const std::vector< T > & | unifiedEvaluationPositions, | ||
std::vector< double > & | unifiedDensityValues | ||
) | const |
Gaussian kernel for the KDE estimate of the unified sequence.
Definition at line 2489 of file ScalarSequence.C.
References QUESO::MiscGaussianDensity(), RawValue_MPI_DOUBLE, RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::SequenceOfVectors< V, M >::unifiedGaussian1dKde().
void QUESO::ScalarSequence< T >::unifiedHistogram | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
const T & | unifiedMinHorizontalValue, | ||
const T & | unifiedMaxHorizontalValue, | ||
std::vector< T > & | unifiedCenters, | ||
std::vector< unsigned int > & | unifiedBins | ||
) | const |
Calculates the histogram of the unified sequence.
Definition at line 1749 of file ScalarSequence.C.
References RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::SequenceOfVectors< V, M >::unifiedHistogram().
T QUESO::ScalarSequence< T >::unifiedInterQuantileRange | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos | ||
) | const |
Returns the interquartile range of the values in the unified sequence.
Definition at line 2239 of file ScalarSequence.C.
References RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, QUESO::ScalarSequence< T >::subSequenceSize(), and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::SequenceOfVectors< V, M >::unifiedInterQuantileRange().
const T & QUESO::ScalarSequence< T >::unifiedMaxPlain | ( | bool | useOnlyInter0Comm | ) | const |
Finds the maximum value of the unified sequence of scalars.
Definition at line 403 of file ScalarSequence.C.
Referenced by QUESO::MLSampling< P_V, P_M >::generateSequence_Step03_inter0().
T QUESO::ScalarSequence< T >::unifiedMeanExtra | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
unsigned int | localNumPos | ||
) | const |
Finds the mean value of the unified sequence of numPos
positions starting at position initialPos
.
Definition at line 903 of file ScalarSequence.C.
References RawValue_MPI_DOUBLE, RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::ComputeCovCorrBetweenScalarSequences(), and QUESO::MLSampling< P_V, P_M >::generateSequence().
const T & QUESO::ScalarSequence< T >::unifiedMeanPlain | ( | bool | useOnlyInter0Comm | ) | const |
Finds the mean value of the unified sequence of scalars.
Definition at line 428 of file ScalarSequence.C.
Referenced by QUESO::MLSampling< P_V, P_M >::generateSequence().
T QUESO::ScalarSequence< T >::unifiedMedianExtra | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
unsigned int | localNumPos | ||
) | const |
Finds the median value of the unified sequence, considering numPos
positions starting at position initialPos
.
Definition at line 1033 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
const T & QUESO::ScalarSequence< T >::unifiedMedianPlain | ( | bool | useOnlyInter0Comm | ) | const |
Finds the median value of the unified sequence of scalars.
Definition at line 452 of file ScalarSequence.C.
void QUESO::ScalarSequence< T >::unifiedMinMaxExtra | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
unsigned int | numPos, | ||
T & | unifiedMinValue, | ||
T & | unifiedMaxValue | ||
) | const |
Finds the minimum and the maximum values of the unified sequence, considering numPos
positions starting at position initialPos
.
Definition at line 1622 of file ScalarSequence.C.
References RawValue_MPI_DOUBLE, RawValue_MPI_MAX, RawValue_MPI_MIN, and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::MLSampling< P_V, P_M >::generateSequence(), and QUESO::SequenceOfVectors< V, M >::unifiedMinMaxExtra().
const T & QUESO::ScalarSequence< T >::unifiedMinPlain | ( | bool | useOnlyInter0Comm | ) | const |
Finds the minimum value of the unified sequence of scalars.
Definition at line 377 of file ScalarSequence.C.
T QUESO::ScalarSequence< T >::unifiedPopulationVariance | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
unsigned int | numPos, | ||
const T & | unifiedMeanValue | ||
) | const |
Finds the population variance of the unified sequence, considering numPos
positions starting at position initialPos
and of mean meanValue
.
Output: calculated population variance of the unified sequence of scalars.
Definition at line 1308 of file ScalarSequence.C.
References RawValue_MPI_DOUBLE, RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, and UQ_FATAL_TEST_MACRO.
T QUESO::ScalarSequence< T >::unifiedPositionsOfMaximum | ( | const ScalarSequence< T > & | subCorrespondingScalarValues, |
ScalarSequence< T > & | unifiedPositionsOfMaximum | ||
) |
Finds the positions where the maximum element occurs in the unified sequence.
Definition at line 2709 of file ScalarSequence.C.
References QUESO::ScalarSequence< T >::resizeSequence(), QUESO::ScalarSequence< T >::subMaxPlain(), QUESO::ScalarSequence< T >::subSequenceSize(), and UQ_FATAL_TEST_MACRO.
void QUESO::ScalarSequence< T >::unifiedReadContents | ( | const std::string & | fileName, |
const std::string & | fileType, | ||
const unsigned int | subSequenceSize | ||
) |
Reads the unified sequence from a file.
Definition at line 3006 of file ScalarSequence.C.
References QUESO::FilePtrSetStruct::ifsVar, QUESO::MiscGetEllapsedSeconds(), UQ_FATAL_TEST_MACRO, UQ_FILE_EXTENSION_FOR_HDF_FORMAT, UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT, and QUESO::UQ_OK_RC.
Referenced by QUESO::MLSampling< P_V, P_M >::restartML().
T QUESO::ScalarSequence< T >::unifiedSampleStd | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
unsigned int | localNumPos, | ||
const T & | unifiedMeanValue | ||
) | const |
Finds the sample standard deviation of the unified sequence, considering localnumPos
positions starting at position initialPos
and of mean unifiedMeanValue
.
Definition at line 1212 of file ScalarSequence.C.
References RawValue_MPI_DOUBLE, RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, and UQ_FATAL_TEST_MACRO.
T QUESO::ScalarSequence< T >::unifiedSampleVarianceExtra | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
unsigned int | localNumPos, | ||
const T & | unifiedMeanValue | ||
) | const |
Finds the sample variance of the unified sequence, considering numPos
positions starting at position initialPos
and of mean meanVec
.
Output:
samVec | is the vector of the calculated sample variance of the unified sequence of scalars. |
Definition at line 1116 of file ScalarSequence.C.
References RawValue_MPI_DOUBLE, RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::ComputeCovCorrBetweenScalarSequences().
const T & QUESO::ScalarSequence< T >::unifiedSampleVariancePlain | ( | bool | useOnlyInter0Comm | ) | const |
Finds the variance of a sample of the unified sequence of scalars.
Definition at line 476 of file ScalarSequence.C.
T QUESO::ScalarSequence< T >::unifiedScaleForKde | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
const T & | unifiedIqrValue, | ||
unsigned int | kdeDimension | ||
) | const |
Selects the scales (bandwidth) for the kernel density estimation, considering the unified sequence.
Definition at line 2379 of file ScalarSequence.C.
References RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::SequenceOfVectors< V, M >::unifiedScalesForKde().
unsigned int QUESO::ScalarSequence< T >::unifiedSequenceSize | ( | bool | useOnlyInter0Comm | ) | const |
Size of the unified sequence of scalars.
Definition at line 148 of file ScalarSequence.C.
References RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, and UQ_FATAL_TEST_MACRO.
Referenced by QUESO::MLSampling< P_V, P_M >::checkpointML(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step02_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step03_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step05_inter0(), and QUESO::MLSampling< P_V, P_M >::generateSequence_Step09_all().
void QUESO::ScalarSequence< T >::unifiedSort | ( | bool | useOnlyInter0Comm, |
unsigned int | initialPos, | ||
ScalarSequence< T > & | unifiedSortedSequence | ||
) | const |
Sorts the unified sequence of scalars.
Definition at line 2010 of file ScalarSequence.C.
References QUESO::ScalarSequence< T >::rawData(), RawValue_MPI_ANY_SOURCE, RawValue_MPI_DOUBLE, RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, QUESO::ScalarSequence< T >::resizeSequence(), SCALAR_SEQUENCE_INIT_MPI_MSG, QUESO::ScalarSequence< T >::subSequenceSize(), and UQ_FATAL_TEST_MACRO.
void QUESO::ScalarSequence< T >::unifiedUniformlySampledCdf | ( | bool | useOnlyInter0Comm, |
unsigned int | numIntervals, | ||
T & | unifiedMinDomainValue, | ||
T & | unifiedMaxDomainValue, | ||
std::vector< T > & | unifiedCdfValues | ||
) | const |
Uniformly samples from the CDF from the unified sequence.
Definition at line 634 of file ScalarSequence.C.
References UQ_FATAL_TEST_MACRO.
void QUESO::ScalarSequence< T >::unifiedWriteContents | ( | const std::string & | fileName, |
const std::string & | fileType | ||
) | const |
Writes the unified sequence to a file.
Writes the unified sequence in Matlab/Octave format or, if enabled, in HDF5 format.
Definition at line 2799 of file ScalarSequence.C.
References QUESO::MiscGetEllapsedSeconds(), QUESO::FilePtrSetStruct::ofsVar, UQ_FATAL_TEST_MACRO, UQ_FILE_EXTENSION_FOR_HDF_FORMAT, UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT, and QUESO::UQ_OK_RC.
Referenced by QUESO::MLSampling< P_V, P_M >::checkpointML(), QUESO::MLSampling< P_V, P_M >::generateSequence(), QUESO::MetropolisHastingsSG< P_V, P_M >::generateSequence(), QUESO::MLSampling< P_V, P_M >::generateSequence_Level0_all(), and QUESO::MLSampling< P_V, P_M >::generateSequence_Step11_inter0().
|
private |
Definition at line 516 of file ScalarSequence.h.
|
private |
Definition at line 517 of file ScalarSequence.h.
Referenced by QUESO::ScalarSequence< T >::copy().
|
private |
Definition at line 518 of file ScalarSequence.h.
Referenced by QUESO::ScalarSequence< T >::append(), and QUESO::ScalarSequence< T >::copy().
|
mutableprivate |
Definition at line 522 of file ScalarSequence.h.
|
mutableprivate |
Definition at line 524 of file ScalarSequence.h.
|
mutableprivate |
Definition at line 526 of file ScalarSequence.h.
|
mutableprivate |
Definition at line 520 of file ScalarSequence.h.
|
mutableprivate |
Definition at line 528 of file ScalarSequence.h.
|
mutableprivate |
Definition at line 523 of file ScalarSequence.h.
|
mutableprivate |
Definition at line 525 of file ScalarSequence.h.
|
mutableprivate |
Definition at line 527 of file ScalarSequence.h.
|
mutableprivate |
Definition at line 521 of file ScalarSequence.h.
|
mutableprivate |
Definition at line 529 of file ScalarSequence.h.