queso-0.53.0
ScalarSequence.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef UQ_SCALAR_SEQUENCE_H
26 #define UQ_SCALAR_SEQUENCE_H
27 
28 #include <queso/Fft.h>
29 #include <queso/UniformOneDGrid.h>
30 #include <queso/Environment.h>
31 #include <queso/Miscellaneous.h>
32 #include <queso/Defines.h>
33 #include <vector>
34 #include <complex>
35 #include <sys/time.h>
36 
37 #define SCALAR_SEQUENCE_INIT_MPI_MSG 1
38 #define SCALAR_SEQUENCE_SIZE_MPI_MSG 1
39 #define SCALAR_SEQUENCE_DATA_MPI_MSG 1
40 
41 namespace QUESO {
42 
53 template <class T = double>
55 {
56 public:
58 
59  typedef typename std::vector<T>::iterator seqScalarPositionIteratorTypedef;
60  typedef typename std::vector<T>::const_iterator seqScalarPositionConstIteratorTypedef;
62 
66  unsigned int subSequenceSize,
67  const std::string& name);
71 
73 
77 
79 
80  const T& operator[] (unsigned int posId) const;
82 
84 
85  T& operator[] (unsigned int posId);
87 
89 
90  const BaseEnvironment& env () const;
92 
94  const std::string& name () const;
95 
97  void setName (const std::string& newName);
98 
100 
101  void clear ();
102 
104  unsigned int subSequenceSize () const;
105 
107  unsigned int unifiedSequenceSize (bool useOnlyInter0Comm) const;
108 
110 
111  void resizeSequence (unsigned int newSequenceSize);
112 
114 
115  void resetValues (unsigned int initialPos, unsigned int );
116 
118 
119  void erasePositions (unsigned int initialPos, unsigned int numPos);
120 
122  void getUnifiedContentsAtProc0Only(bool useOnlyInter0Comm,
123  std::vector<T>& outputVec) const;
124 
126  const T& subMinPlain () const;
127 
129  const T& unifiedMinPlain (bool useOnlyInter0Comm) const;
130 
132  const T& subMaxPlain () const;
133 
135  const T& unifiedMaxPlain (bool useOnlyInter0Comm) const;
136 
138  const T& subMeanPlain () const;
139 
141  const T& unifiedMeanPlain (bool useOnlyInter0Comm) const;
142 
144  const T& subMedianPlain () const;
145 
147  const T& unifiedMedianPlain (bool useOnlyInter0Comm) const;
148 
150  const T& subSampleVariancePlain () const;
151 
153  const T& unifiedSampleVariancePlain (bool useOnlyInter0Comm) const;
154 
156  void deleteStoredScalars ();
157 
159 
160  void setGaussian (const T& mean, const T& stdDev);
161 
163 
164  void setUniform (const T& a, const T& b );
165 
167  void subUniformlySampledCdf (unsigned int numIntervals,
168  T& minDomainValue,
169  T& maxDomainValue,
170  std::vector<T>& cdfValues) const;
171 
173  void unifiedUniformlySampledCdf (bool useOnlyInter0Comm,
174  unsigned int numIntervals,
175  T& unifiedMinDomainValue,
176  T& unifiedMaxDomainValue,
177  std::vector<T>& unifiedCdfValues) const;
179  void subBasicCdf (unsigned int numIntervals,
180  UniformOneDGrid<T>*& gridValues,
181  std::vector<T>& cdfValues) const;
183  void subWeightCdf (unsigned int numIntervals,
184  std::vector<T>& gridValues,
185  std::vector<T>& cdfValues) const;
186 
188  void subWeightCdf (unsigned int numIntervals,
189  UniformOneDGrid<T>*& gridValues,
190  std::vector<T>& cdfValues) const;
191 
193  T subMeanExtra (unsigned int initialPos,
194  unsigned int numPos) const;
195 
197  T unifiedMeanExtra (bool useOnlyInter0Comm,
198  unsigned int initialPos,
199  unsigned int localNumPos) const;
200 
202  T subMedianExtra (unsigned int initialPos,
203  unsigned int numPos) const;
204 
206  T unifiedMedianExtra (bool useOnlyInter0Comm,
207  unsigned int initialPos,
208  unsigned int localNumPos) const;
209 
211 
216  T subSampleVarianceExtra (unsigned int initialPos,
217  unsigned int numPos,
218  const T& meanValue) const;
220 
221  T unifiedSampleVarianceExtra (bool useOnlyInter0Comm,
222  unsigned int initialPos,
223  unsigned int localNumPos,
224  const T& unifiedMeanValue) const;
226  T subSampleStd (unsigned int initialPos,
227  unsigned int numPos,
228  const T& meanValue) const;
230  T unifiedSampleStd (bool useOnlyInter0Comm,
231  unsigned int initialPos,
232  unsigned int localNumPos,
233  const T& unifiedMeanValue) const;
235 
241  T subPopulationVariance (unsigned int initialPos,
242  unsigned int numPos,
243  const T& meanValue) const;
245 
246  T unifiedPopulationVariance (bool useOnlyInter0Comm,
247  unsigned int initialPos,
248  unsigned int numPos,
249  const T& unifiedMeanValue) const;
251 
255  T autoCovariance (unsigned int initialPos,
256  unsigned int numPos,
257  const T& meanValue,
258  unsigned int lag) const;
259 
261 
266  T autoCorrViaDef (unsigned int initialPos,
267  unsigned int numPos,
268  unsigned int lag) const;
269 
271  void autoCorrViaFft (unsigned int initialPos,
272  unsigned int numPos,
273  unsigned int maxLag,
274  std::vector<T>& autoCorrs) const;
275 
277  void autoCorrViaFft (unsigned int initialPos,
278  unsigned int numPos,
279  unsigned int numSum,
280  T& autoCorrsSum) const;
282  void subMinMaxExtra (unsigned int initialPos,
283  unsigned int numPos,
284  T& minValue,
285  T& maxValue) const;
287  void unifiedMinMaxExtra (bool useOnlyInter0Comm,
288  unsigned int initialPos,
289  unsigned int numPos,
290  T& unifiedMinValue,
291  T& unifiedMaxValue) const;
293 
297  void subHistogram (unsigned int initialPos,
298  const T& minHorizontalValue,
299  const T& maxHorizontalValue,
300  std::vector<T>& centers,
301  std::vector<unsigned int>& bins) const;
303  void unifiedHistogram (bool useOnlyInter0Comm,
304  unsigned int initialPos,
305  const T& unifiedMinHorizontalValue,
306  const T& unifiedMaxHorizontalValue,
307  std::vector<T>& unifiedCenters,
308  std::vector<unsigned int>& unifiedBins) const;
310 
314  void subBasicHistogram (unsigned int initialPos,
315  const T& minHorizontalValue,
316  const T& maxHorizontalValue,
317  UniformOneDGrid<T>*& gridValues,
318  std::vector<unsigned int>& bins) const;
320 
325  void subWeightHistogram (unsigned int initialPos,
326  const T& minHorizontalValue,
327  const T& maxHorizontalValue,
328  UniformOneDGrid<T>*& gridValues,
329  std::vector<unsigned int>& bins) const;
331 
333  void subWeightHistogram (unsigned int initialPos,
334  const T& minHorizontalValue,
335  const T& maxHorizontalValue,
336  std::vector<T>& gridValues,
337  std::vector<unsigned int>& bins) const;
339  void subSort (unsigned int initialPos,
340  ScalarSequence<T>& sortedSequence) const;
342  void unifiedSort (bool useOnlyInter0Comm,
343  unsigned int initialPos,
344  ScalarSequence<T>& unifiedSortedSequence) const;
346 
351  T subInterQuantileRange (unsigned int initialPos) const;
352 
354  T unifiedInterQuantileRange (bool useOnlyInter0Comm,
355  unsigned int initialPos) const;
356 
358 
366  T subScaleForKde (unsigned int initialPos,
367  const T& iqrValue,
368  unsigned int kdeDimension) const;
369 
371  T unifiedScaleForKde (bool useOnlyInter0Comm,
372  unsigned int initialPos,
373  const T& unifiedIqrValue,
374  unsigned int kdeDimension) const;
376 
380  void subGaussian1dKde (unsigned int initialPos,
381  double scaleValue,
382  const std::vector<T>& evaluationPositions,
383  std::vector<double>& densityValues) const;
384 
386  void unifiedGaussian1dKde (bool useOnlyInter0Comm,
387  unsigned int initialPos,
388  double unifiedScaleValue,
389  const std::vector<T>& unifiedEvaluationPositions,
390  std::vector<double>& unifiedDensityValues) const;
391 
393 
394  void filter (unsigned int initialPos,
395  unsigned int spacing);
396 
398 
399  T brooksGelmanConvMeasure (bool useOnlyInter0Comm,
400  unsigned int initialPos,
401  unsigned int spacing) const;
402 
404 
405  void append (const ScalarSequence<T>& src,
406  unsigned int srcInitialPos,
407  unsigned int srcNumPos);
409  T subPositionsOfMaximum (const ScalarSequence<T>& subCorrespondingScalarValues,
412  T unifiedPositionsOfMaximum (const ScalarSequence<T>& subCorrespondingScalarValues,
414 
416 
420  void subWriteContents (unsigned int initialPos,
421  unsigned int numPos,
422  const std::string& fileName,
423  const std::string& fileType,
424  const std::set<unsigned int>& allowedSubEnvIds) const;
426 
427  void subWriteContents (unsigned int initialPos,
428  unsigned int numPos,
429  std::ofstream& ofs,
430  const std::string& fileType) const;
432 
433  void unifiedWriteContents (const std::string& fileName,
434  const std::string& fileType) const;
435 
437  void unifiedReadContents (const std::string& fileName,
438  const std::string& fileType,
439  const unsigned int subSequenceSize);
440 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
441  T bmm (unsigned int initialPos,
442  unsigned int batchLength) const;
443  void psd (unsigned int initialPos,
444  unsigned int numBlocks,
445  double hopSizeRatio,
446  std::vector<double>& psdSequence) const;
447  T geweke (unsigned int initialPos,
448  double ratioNa,
449  double ratioNb) const;
450  T meanStacc (unsigned int initialPos) const;
451  void subCdfPercentageRange (unsigned int initialPos,
452  unsigned int numPos,
453  double range, // \in [0,1]
454  T& lowerValue,
455  T& upperValue) const;
456  void unifiedCdfPercentageRange (bool useOnlyInter0Comm,
457  unsigned int initialPos,
458  unsigned int numPos,
459  double range, // \in [0,1]
460  T& lowerValue,
461  T& upperValue) const;
462 
463  void subCdfStacc (unsigned int initialPos,
464  std::vector<double>& cdfStaccValues,
465  std::vector<double>& cdfStaccValuesup,
466  std::vector<double>& cdfStaccValueslow,
467  const ScalarSequence<T>& sortedDataValues) const;
468  void subCdfStacc (unsigned int initialPos,
469  const std::vector<T>& evaluationPositions,
470  std::vector<double>& cdfStaccValues) const;
471  void subUniformlySampledMdf (unsigned int numIntervals,
472  T& minDomainValue,
473  T& maxDomainValue,
474  std::vector<T>& mdfValues) const;
475  T subMeanCltStd (unsigned int initialPos,
476  unsigned int numPos,
477  const T& meanValue) const;
478  T unifiedMeanCltStd (bool useOnlyInter0Comm,
479  unsigned int initialPos,
480  unsigned int localNumPos,
481  const T& unifiedMeanValue) const;
482 #endif
483 
484 private:
486 
487  void copy (const ScalarSequence<T>& src);
488 
490 
492  void extractScalarSeq (unsigned int initialPos,
493  unsigned int spacing,
494  unsigned int numPos,
495  ScalarSequence<T>& scalarSeq) const;
497 
500  void extractRawData (unsigned int initialPos,
501  unsigned int spacing,
502  unsigned int numPos,
503  std::vector<double>& rawData) const;
504 
506  std::vector<T>& rawData ();
507 
509  void subSort ();
510 
512  void parallelMerge (std::vector<T>& sortedBuffer,
513  const std::vector<T>& leafData,
514  unsigned int treeLevel) const;
515 
517  std::string m_name;
518  std::vector<T> m_seq;
519 
520  mutable T* m_subMinPlain;
521  mutable T* m_unifiedMinPlain;
522  mutable T* m_subMaxPlain;
523  mutable T* m_unifiedMaxPlain;
524  mutable T* m_subMeanPlain;
525  mutable T* m_unifiedMeanPlain;
526  mutable T* m_subMedianPlain;
530 };
531 
532 // --------------------------------------------------
533 // Additional methods -------------------------------
534 // (outside class declaration) ----------------------
535 //---------------------------------------------------
536 template <class T>
537 void
539  const ScalarSequence<T>& scalarSeq2,
540  unsigned int initialPos,
541  double scaleValue1,
542  double scaleValue2,
543  const std::vector<T>& evaluationPositions1,
544  const std::vector<T>& evaluationPositions2,
545  std::vector<double>& densityValues);
546 
547 //---------------------------------------------------
548 template <class T>
549 void
550 ComputeUnifiedGaussian2dKde(bool useOnlyInter0Comm, // INPUT
551  const ScalarSequence<T>& scalarSeq1, // INPUT
552  const ScalarSequence<T>& scalarSeq2, // INPUT
553  unsigned int initialPos, // INPUT
554  double unifiedScaleValue1, // INPUT
555  double unifiedScaleValue2, // INPUT
556  const std::vector<T>& unifiedEvaluationPositions1, // INPUT
557  const std::vector<T>& unifiedEvaluationPositions2, // INPUT
558  std::vector<double>& unifiedDensityValues); // OUTPUT
559 
560 // --------------------------------------------------
561 template <class T>
562 void
564  const ScalarSequence<T>& subPSeq,
565  const ScalarSequence<T>& subQSeq,
566  unsigned int subNumSamples,
567  T& covValue,
568  T& corrValue);
569 
570 } // End namespace QUESO
571 
572 #endif // UQ_SCALAR_SEQUENCE_H
void ComputeUnifiedGaussian2dKde(bool useOnlyInter0Comm, const ScalarSequence< T > &scalarSeq1, const ScalarSequence< T > &scalarSeq2, unsigned int initialPos, double unifiedScaleValue1, double unifiedScaleValue2, const std::vector< T > &unifiedEvaluationPositions1, const std::vector< T > &unifiedEvaluationPositions2, std::vector< double > &unifiedDensityValues)
T autoCorrViaDef(unsigned int initialPos, unsigned int numPos, unsigned int lag) const
Calculates the autocorrelation via definition.
void subUniformlySampledCdf(unsigned int numIntervals, T &minDomainValue, T &maxDomainValue, std::vector< T > &cdfValues) const
Uniformly samples from the CDF from the sub-sequence.
void copy(const ScalarSequence< T > &src)
Copies the scalar sequence src to this.
const T & subMeanPlain() const
Finds the mean value of the sub-sequence of scalars.
void ComputeSubGaussian2dKde(const ScalarSequence< T > &scalarSeq1, const ScalarSequence< T > &scalarSeq2, unsigned int initialPos, double scaleValue1, double scaleValue2, const std::vector< T > &evaluationPositions1, const std::vector< T > &evaluationPositions2, std::vector< double > &densityValues)
void setName(const std::string &newName)
Sets a new name to the sequence of scalars.
const BaseEnvironment & m_env
const T & operator[](unsigned int posId) const
Access position posId of the sequence of scalars (const).
T subInterQuantileRange(unsigned int initialPos) const
Returns the interquartile range of the values in the sub-sequence.
const std::string & name() const
Access to the name of the sequence of scalars.
std::vector< T > & rawData()
The sequence of scalars. Access to private attribute m_seq.
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.
void clear()
Clears the sequence of scalars.
std::vector< T >::const_iterator seqScalarPositionConstIteratorTypedef
const T & unifiedMaxPlain(bool useOnlyInter0Comm) const
Finds the maximum value of the unified sequence of scalars.
ScalarSequence< T > & operator=(const ScalarSequence< T > &rhs)
Assignment operator; it copies rhs to this.
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...
void 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.
void parallelMerge(std::vector< T > &sortedBuffer, const std::vector< T > &leafData, unsigned int treeLevel) const
Sorts/merges data in parallel using MPI.
T autoCovariance(unsigned int initialPos, unsigned int numPos, const T &meanValue, unsigned int lag) const
Calculates the autocovariance.
const T & unifiedMeanPlain(bool useOnlyInter0Comm) const
Finds the mean value of the unified sequence of scalars.
T subMeanExtra(unsigned int initialPos, unsigned int numPos) const
Finds the mean value of the sub-sequence, considering numPos positions starting at position initialPo...
void resizeSequence(unsigned int newSequenceSize)
Resizes the size of the sequence of scalars.
void ComputeCovCorrBetweenScalarSequences(const ScalarSequence< T > &subPSeq, const ScalarSequence< T > &subQSeq, unsigned int subNumSamples, T &covValue, T &corrValue)
const T & unifiedSampleVariancePlain(bool useOnlyInter0Comm) const
Finds the variance of a sample of the unified sequence of scalars.
const T & subMinPlain() const
Finds the minimum value of the sub-sequence of scalars.
T subPositionsOfMaximum(const ScalarSequence< T > &subCorrespondingScalarValues, ScalarSequence< T > &subPositionsOfMaximum)
Finds the positions where the maximum element occurs in the sub-sequence.
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 a...
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 devi...
ScalarSequence(const BaseEnvironment &env, unsigned int subSequenceSize, const std::string &name)
Default constructor.
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 posit...
unsigned int unifiedSequenceSize(bool useOnlyInter0Comm) const
Size of the unified sequence of scalars.
T subMedianExtra(unsigned int initialPos, unsigned int numPos) const
Finds the median value of the sub-sequence, considering numPos positions starting at position initial...
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...
void append(const ScalarSequence< T > &src, unsigned int srcInitialPos, unsigned int srcNumPos)
Appends the scalar sequence src to this sequence.
void autoCorrViaFft(unsigned int initialPos, unsigned int numPos, unsigned int maxLag, std::vector< T > &autoCorrs) const
Calculates the autocorrelation via Fast Fourier transforms (FFT).
const T & subMaxPlain() const
Finds the maximum value of the sub-sequence of scalars.
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...
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-sequenc...
const T & unifiedMinPlain(bool useOnlyInter0Comm) const
Finds the minimum value of the unified sequence of scalars.
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 an...
T unifiedPositionsOfMaximum(const ScalarSequence< T > &subCorrespondingScalarValues, ScalarSequence< T > &unifiedPositionsOfMaximum)
Finds the positions where the maximum element occurs in the unified sequence.
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 starti...
T unifiedInterQuantileRange(bool useOnlyInter0Comm, unsigned int initialPos) const
Returns the interquartile range of the values in the unified sequence.
std::vector< T > m_seq
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.
void extractScalarSeq(unsigned int initialPos, unsigned int spacing, unsigned int numPos, ScalarSequence< T > &scalarSeq) const
Extracts a sequence of scalars.
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 starti...
void erasePositions(unsigned int initialPos, unsigned int numPos)
Erases numPos values of the sequence, starting at position initialPos.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
void unifiedWriteContents(const std::string &fileName, const std::string &fileType) const
Writes the unified sequence to a file.
void extractRawData(unsigned int initialPos, unsigned int spacing, unsigned int numPos, std::vector< double > &rawData) const
Extracts the raw data.
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.
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 ...
Class for accommodating uniform one-dimensional grids.
void unifiedSort(bool useOnlyInter0Comm, unsigned int initialPos, ScalarSequence< T > &unifiedSortedSequence) const
Sorts the unified sequence of scalars.
void deleteStoredScalars()
Deletes all stored scalars.
std::vector< T >::iterator seqScalarPositionIteratorTypedef
T brooksGelmanConvMeasure(bool useOnlyInter0Comm, unsigned int initialPos, unsigned int spacing) const
Estimates convergence rate using Brooks &amp; Gelman method.
~ScalarSequence()
Destructor.
void subSort()
Sorts the sequence of scalars in the private attribute m_seq.
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.
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.
const BaseEnvironment & env() const
Access to QUESO environment.
const T & subSampleVariancePlain() const
Finds the variance of a sample of the sub-sequence of scalars.
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.
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.
void getUnifiedContentsAtProc0Only(bool useOnlyInter0Comm, std::vector< T > &outputVec) const
Gets the unified contents of processor of rank equals to 0.
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 ...
Class for handling scalar samples.
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.
unsigned int subSequenceSize() const
Size of the sub-sequence of scalars.
const T & subMedianPlain() const
Finds the median value of the sub-sequence of scalars.
void resetValues(unsigned int initialPos, unsigned int)
Sets numPos values of the sequence to zero, starting at position initialPos.
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 init...
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.
void filter(unsigned int initialPos, unsigned int spacing)
Filters positions in the sequence of vectors.
const T & unifiedMedianPlain(bool useOnlyInter0Comm) const
Finds the median value of the unified sequence of scalars.
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 ini...
void unifiedReadContents(const std::string &fileName, const std::string &fileType, const unsigned int subSequenceSize)
Reads the unified sequence from a file.

Generated on Thu Jun 11 2015 13:52:31 for queso-0.53.0 by  doxygen 1.8.5