25 #ifndef UQ_ARRAY_OF_SEQUENCES_H
26 #define UQ_ARRAY_OF_SEQUENCES_H
28 #include <queso/VectorSequence.h>
46 template <
class V = GslVector,
class M = GslMatrix>
55 const std::string&
name);
70 void resetValues (
unsigned int initialPos,
unsigned int numPos);
74 void erasePositions (
unsigned int initialPos,
unsigned int numPos);
85 void setGaussian (
const V& meanVec,
const V& stdDevVec);
89 void setUniform (
const V& aVec,
const V& bVec );
92 void mean (
unsigned int initialPos,
99 V& unifiedMeanVec)
const;
136 const std::vector<unsigned int>& lags,
137 std::vector<V*>& corrVecs)
const;
144 V& autoCorrsSumVec)
const;
146 void minMax (
unsigned int initialPos,
154 std::vector<V*>& centersForAllBins,
155 std::vector<V*>& quanttsForAllBins)
const;
166 unsigned int kdeDimension,
171 V& densityVec)
const;
179 const std::vector<V*>& evaluationParamVecs,
180 std::vector<V*>& densityVecs)
const;
191 const std::string& fileType)
const;
196 const std::string& fileType,
197 const unsigned int subSequenceSize);
201 void select (
const std::vector<unsigned int>& idsOfUniquePositions);
205 void filter (
unsigned int initialPos,
206 unsigned int spacing);
212 unsigned int spacing,
214 unsigned int paramId,
217 #ifdef UQ_ALSO_COMPUTE_MDFS_WITHOUT_KDE
223 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
227 void bmm (
unsigned int initialPos,
228 unsigned int batchLength,
231 unsigned int fftSize,
232 unsigned int paramId,
233 std::vector<std::complex<double> >& resultData)
const;
236 void psd (
unsigned int initialPos,
237 unsigned int numBlocks,
239 unsigned int paramId,
240 std::vector<double>& psdResult)
const;
242 unsigned int numBlocks,
245 void geweke (
unsigned int initialPos,
258 unsigned int spacing,
260 unsigned int paramId,
261 std::vector<double>& rawData)
const;
274 #endif // UQ_ARRAY_OF_SEQUENCES_H
void sampleVariance(unsigned int initialPos, unsigned int numPos, const V &meanVec, V &samVec) const
Finds the sample variance of the sub-sequence, considering numPos positions starting at position init...
Class for handling array samples (arrays of scalar sequences).
Class to accommodate arrays of one-dimensional grid.
void setPositionValues(unsigned int posId, const V &vec)
Set the values of vec at position posId of the sequence.
void minMax(unsigned int initialPos, V &minVec, V &maxVec) const
Given an initial position initialPos, finds the minimum and the maximum values of the sequence...
unsigned int subSequenceSize() const
Size of the sub-sequence of arrays.
void fftForward(unsigned int initialPos, unsigned int fftSize, unsigned int paramId, std::vector< std::complex< double > > &resultData) const
A class representing a vector space.
void geweke(unsigned int initialPos, double ratioNa, double ratioNb, V &gewVec) const
void unifiedSampleVariance(unsigned int initialPos, unsigned int numPos, const V &meanVec, V &samVec) const
Finds the sample variance of the unified sequence, considering numPos positions starting at position ...
void autoCorrViaDef(unsigned int initialPos, unsigned int numPos, unsigned int lag, V &corrVec) const
Calculates autocorrelation via definition.
void populationVariance(unsigned int initialPos, unsigned int numPos, const V &meanVec, V &popVec) const
Finds the population variance of the sub-sequence, considering numPos positions starting at position ...
void psd(unsigned int initialPos, unsigned int numBlocks, double hopSizeRatio, unsigned int paramId, std::vector< double > &psdResult) const
void unifiedWriteContents(std::ofstream &ofsvar) const
Writes info of the unified sequence to a file.
Class to accommodate arrays of one-dimensional tables.
void erasePositions(unsigned int initialPos, unsigned int numPos)
Erases numPos elements of the sequence starting at position initialPos.
void interQuantileRange(unsigned int initialPos, V &iqrs) const
Returns the interquartile range of the values in the sequence.
void writeContents(std::ofstream &ofsvar) const
Write contents of the chain to a file.
void psdAtZero(unsigned int initialPos, unsigned int numBlocks, double hopSizeRatio, V &psdVec) const
Class for matrix operations using GSL library.
void autoCovariance(unsigned int initialPos, unsigned int numPos, const V &meanVec, unsigned int lag, V &covVec) const
Calculates the autocovariance.
void uniformlySampledMdf(const V &numEvaluationPointsVec, ArrayOfOneDGrids< V, M > &mdfGrids, ArrayOfOneDTables< V, M > &mdfValues) const
void uniformlySampledCdf(const V &numEvaluationPointsVec, ArrayOfOneDGrids< V, M > &cdfGrids, ArrayOfOneDTables< V, M > &cdfValues) const
~ArrayOfSequences()
Destructor.
void autoCorrViaFft(unsigned int initialPos, unsigned int numPos, const std::vector< unsigned int > &lags, std::vector< V * > &corrVecs) const
const std::string & name() const
Access to protected attribute m_name: name of the sequence of vectors.
void resetValues(unsigned int initialPos, unsigned int numPos)
Resets a total of numPos values of the sequence starting at position initialPos.
Base class for handling vector and array samples (sequence of vectors or arrays). ...
DistArray< ScalarSequence< double > * > m_scalarSequences
Sequence of scalars.
void setUniform(const V &aVec, const V &bVec)
Sets the values of the sequence as a uniform distribution between the values given by vectors aVec an...
Class for vector operations using GSL library.
void bmm(unsigned int initialPos, unsigned int batchLength, V &bmmVec) const
void extractRawData(unsigned int initialPos, unsigned int spacing, unsigned int numPos, unsigned int paramId, std::vector< double > &rawData) const
Extracts the raw data.
const VectorSpace< V, M > & vectorSpace() const
Vector space; access to protected attribute VectorSpace<V,M>& m_vectorSpace.
A class for partitioning vectors and matrices.
void scalesForKDE(unsigned int initialPos, const V &iqrs, unsigned int kdeDimension, V &scales) const
Selects the scales (bandwidth, scaleVec) for the kernel density estimation, of the sequence...
void histogram(unsigned int initialPos, const V &minVec, const V &maxVec, std::vector< V * > ¢ersForAllBins, std::vector< V * > &quanttsForAllBins) const
Calculates the histogram of the sequence.
void gaussianKDE(const V &evaluationParamVec, V &densityVec) const
Gaussian kernel for the KDE estimate of the sequence.
void setGaussian(const V &meanVec, const V &stdDevVec)
Sets the values of the sequence as a Gaussian distribution of mean given by meanVec and standard devi...
void filter(unsigned int initialPos, unsigned int spacing)
Filters positions in the sequence of vectors, starting at initialPos, and with spacing given by spaci...
void extractScalarSeq(unsigned int initialPos, unsigned int spacing, unsigned int numPos, unsigned int paramId, ScalarSequence< double > &scalarSeq) const
Extracts a sequence of scalars of size numPos, from position paramId of the array of sequences...
ArrayOfSequences(const VectorSpace< V, M > &vectorSpace, unsigned int subSequenceSize, const std::string &name)
Default constructor.
void unifiedReadContents(const std::string &fileName, const std::string &fileType, const unsigned int subSequenceSize)
Reads the unified sequence from a file.
void getPositionValues(unsigned int posId, V &vec) const
Gets the values of the sequence at position posId and stores them at vec.
void unifiedMean(unsigned int initialPos, unsigned int numPos, V &unifiedMeanVec) const
Finds the mean value of the unified sequence of numPos positions starting at position initialPos...
void select(const std::vector< unsigned int > &idsOfUniquePositions)
Select positions in the sequence of vectors.
void resizeSequence(unsigned int newSubSequenceSize)
Resizes the sequence.
void mean(unsigned int initialPos, unsigned int numPos, V &meanVec) const
Finds the mean value of the sub-sequence, considering numPos positions starting at position initialPo...