queso-0.53.0
|
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 32 of file ScalarSequence.C.
QUESO::ScalarSequence< T >::~ScalarSequence | ( | ) |
Destructor.
Definition at line 54 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 2497 of file ScalarSequence.C.
References QUESO::ScalarSequence< T >::m_seq, queso_require_greater_equal_msg, and QUESO::ScalarSequence< T >::subSequenceSize().
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 1332 of file ScalarSequence.C.
References queso_require_msg.
Referenced by QUESO::SequenceOfVectors< V, M >::autoCorrViaDef().
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 1361 of file ScalarSequence.C.
References QUESO::Fft< T >::forward(), and QUESO::Fft< T >::inverse().
Referenced by QUESO::ArrayOfSequences< V, M >::autoCorrViaFft(), and 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 1441 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 1302 of file ScalarSequence.C.
References queso_require_msg.
Referenced by QUESO::SequenceOfVectors< V, M >::autoCovariance().
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 2468 of file ScalarSequence.C.
References queso_error_msg, and queso_not_implemented.
void QUESO::ScalarSequence< T >::clear | ( | ) |
Clears the sequence of scalars.
Resets its values and then its size to zero.
Definition at line 123 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 3102 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 465 of file ScalarSequence.C.
const BaseEnvironment & QUESO::ScalarSequence< T >::env | ( | ) | const |
Access to QUESO environment.
Definition at line 101 of file ScalarSequence.C.
Referenced by QUESO::ComputeCovCorrBetweenScalarSequences(), and QUESO::ComputeUnifiedGaussian2dKde().
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 206 of file ScalarSequence.C.
References queso_require_equal_to_msg, and queso_require_msg.
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 3158 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 3117 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 2429 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 235 of file ScalarSequence.C.
References queso_error_msg, queso_require_equal_to_msg, RawValue_MPI_DOUBLE, RawValue_MPI_IN_PLACE, and RawValue_MPI_INT.
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 61 of file ScalarSequence.C.
References copy.
const T & QUESO::ScalarSequence< T >::operator[] | ( | unsigned int | posId | ) | const |
Access position posId
of the sequence of scalars (const).
Definition at line 69 of file ScalarSequence.C.
References queso_require_less_msg.
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 84 of file ScalarSequence.C.
References queso_require_less_msg.
|
private |
Sorts/merges data in parallel using MPI.
Definition at line 3199 of file ScalarSequence.C.
References k, 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 3181 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 186 of file ScalarSequence.C.
References queso_require_msg.
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 173 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 >::subMedianExtra(), 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 513 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 115 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 534 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 710 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 1747 of file ScalarSequence.C.
References queso_require_greater_equal_msg.
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 2319 of file ScalarSequence.C.
References k, QUESO::MiscGaussianDensity(), and queso_require_msg.
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 1610 of file ScalarSequence.C.
References queso_require_equal_to_msg, and queso_require_greater_equal_msg.
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 2004 of file ScalarSequence.C.
References queso_require_equal_to_msg, queso_require_less_msg, and QUESO::ScalarSequence< T >::subSequenceSize().
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 367 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 836 of file ScalarSequence.C.
References queso_require_msg.
Referenced by QUESO::ArrayOfSequences< V, M >::mean(), and QUESO::SequenceOfVectors< V, M >::subMeanExtra().
const T & QUESO::ScalarSequence< T >::subMeanPlain | ( | ) | const |
Finds the mean value of the sub-sequence of scalars.
Definition at line 393 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 952 of file ScalarSequence.C.
References queso_require_msg, QUESO::ScalarSequence< T >::resizeSequence(), and QUESO::ScalarSequence< T >::subSort().
Referenced by QUESO::SequenceOfVectors< V, M >::subMedianExtra().
const T & QUESO::ScalarSequence< T >::subMedianPlain | ( | ) | const |
Finds the median value of the sub-sequence of scalars.
Definition at line 417 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 1510 of file ScalarSequence.C.
References queso_require_less_equal_msg, and queso_require_msg.
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 341 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 1216 of file ScalarSequence.C.
References queso_require_msg.
Referenced by QUESO::SequenceOfVectors< V, M >::subPopulationVariance().
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 2518 of file ScalarSequence.C.
References queso_require_equal_to_msg, QUESO::ScalarSequence< T >::resizeSequence(), QUESO::ScalarSequence< T >::subMaxPlain(), and QUESO::ScalarSequence< T >::subSequenceSize().
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 1128 of file ScalarSequence.C.
References queso_require_msg.
Referenced by QUESO::SequenceOfVectors< V, M >::subSampleStd().
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 1042 of file ScalarSequence.C.
References queso_require_msg.
Referenced by QUESO::SequenceOfVectors< V, M >::subSampleVarianceExtra().
const T & QUESO::ScalarSequence< T >::subSampleVariancePlain | ( | ) | const |
Finds the variance of a sample of the sub-sequence of scalars.
Definition at line 441 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 2208 of file ScalarSequence.C.
References queso_require_msg.
Referenced by QUESO::SequenceOfVectors< V, M >::subScalesForKde().
unsigned int QUESO::ScalarSequence< T >::subSequenceSize | ( | ) | const |
Size of the sub-sequence of scalars.
Definition at line 136 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::ScalarSequence< T >::subInterQuantileRange(), 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 1883 of file ScalarSequence.C.
References QUESO::ScalarSequence< T >::resizeSequence(), and QUESO::ScalarSequence< T >::subSort().
Referenced by QUESO::ScalarSequence< T >::subMedianExtra(), and QUESO::ScalarSequence< T >::subSort().
|
private |
Sorts the sequence of scalars in the private attribute m_seq
.
Definition at line 3189 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 569 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 747 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 799 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 1789 of file ScalarSequence.C.
References queso_require_greater_equal_msg.
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 1831 of file ScalarSequence.C.
References queso_require_greater_equal_msg.
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 2578 of file ScalarSequence.C.
References queso_require_greater_equal_msg.
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 2606 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 2349 of file ScalarSequence.C.
References k, QUESO::MiscGaussianDensity(), queso_error_msg, queso_require_msg, RawValue_MPI_DOUBLE, RawValue_MPI_SUM, and RawValue_MPI_UNSIGNED.
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 1657 of file ScalarSequence.C.
References queso_error_msg, queso_require_equal_to_msg, queso_require_greater_equal_msg, RawValue_MPI_SUM, and RawValue_MPI_UNSIGNED.
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 2117 of file ScalarSequence.C.
References queso_error_msg, queso_require_equal_to_msg, RawValue_MPI_SUM, RawValue_MPI_UNSIGNED, and QUESO::ScalarSequence< T >::subSequenceSize().
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 380 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 874 of file ScalarSequence.C.
References queso_error_msg, queso_require_msg, RawValue_MPI_DOUBLE, RawValue_MPI_SUM, and RawValue_MPI_UNSIGNED.
Referenced by QUESO::ComputeCovCorrBetweenScalarSequences(), QUESO::MLSampling< P_V, P_M >::generateSequence(), and QUESO::SequenceOfVectors< V, M >::unifiedMeanExtra().
const T & QUESO::ScalarSequence< T >::unifiedMeanPlain | ( | bool | useOnlyInter0Comm | ) | const |
Finds the mean value of the unified sequence of scalars.
Definition at line 405 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 995 of file ScalarSequence.C.
References queso_error_msg, and queso_require_msg.
Referenced by QUESO::SequenceOfVectors< V, M >::unifiedMedianExtra().
const T & QUESO::ScalarSequence< T >::unifiedMedianPlain | ( | bool | useOnlyInter0Comm | ) | const |
Finds the median value of the unified sequence of scalars.
Definition at line 429 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 1539 of file ScalarSequence.C.
References queso_error_msg, RawValue_MPI_DOUBLE, RawValue_MPI_MAX, and RawValue_MPI_MIN.
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 354 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 1243 of file ScalarSequence.C.
References queso_error_msg, queso_require_msg, RawValue_MPI_DOUBLE, RawValue_MPI_SUM, and RawValue_MPI_UNSIGNED.
Referenced by QUESO::SequenceOfVectors< V, M >::unifiedPopulationVariance().
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 2548 of file ScalarSequence.C.
References queso_require_equal_to_msg, QUESO::ScalarSequence< T >::resizeSequence(), QUESO::ScalarSequence< T >::subMaxPlain(), and QUESO::ScalarSequence< T >::subSequenceSize().
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 2833 of file ScalarSequence.C.
References dataIn, QUESO::FilePtrSetStruct::ifsVar, QUESO::MiscGetEllapsedSeconds(), queso_error_msg, queso_require_equal_to_msg, queso_require_greater_equal_msg, queso_require_less_msg, 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 1156 of file ScalarSequence.C.
References queso_error_msg, queso_require_msg, RawValue_MPI_DOUBLE, RawValue_MPI_SUM, and RawValue_MPI_UNSIGNED.
Referenced by QUESO::SequenceOfVectors< V, M >::unifiedSampleStd().
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 1069 of file ScalarSequence.C.
References queso_error_msg, queso_require_msg, RawValue_MPI_DOUBLE, RawValue_MPI_SUM, and RawValue_MPI_UNSIGNED.
Referenced by QUESO::ComputeCovCorrBetweenScalarSequences(), and QUESO::SequenceOfVectors< V, M >::unifiedSampleVarianceExtra().
const T & QUESO::ScalarSequence< T >::unifiedSampleVariancePlain | ( | bool | useOnlyInter0Comm | ) | const |
Finds the variance of a sample of the unified sequence of scalars.
Definition at line 453 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 2248 of file ScalarSequence.C.
References queso_error_msg, queso_require_msg, RawValue_MPI_SUM, and RawValue_MPI_UNSIGNED.
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 143 of file ScalarSequence.C.
References queso_error_msg, RawValue_MPI_SUM, and RawValue_MPI_UNSIGNED.
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 1900 of file ScalarSequence.C.
References queso_error_msg, queso_require_equal_to_msg, 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, and QUESO::ScalarSequence< T >::subSequenceSize().
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 611 of file ScalarSequence.C.
References queso_error_msg.
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 2632 of file ScalarSequence.C.
References QUESO::MiscGetEllapsedSeconds(), QUESO::FilePtrSetStruct::ofsVar, queso_error_msg, 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.