1 #ifndef UTIL_AUTOCORRELATION_TPP 2 #define UTIL_AUTOCORRELATION_TPP 11 #include "AutoCorrelation.h" 12 #include "AutoCorrStage.tpp" 22 template <
typename Data,
typename Product>
26 descendants_.append(
this);
32 template <
typename Data,
typename Product>
44 template <
typename Data,
typename Product>
47 loadParameter<int>(ar,
"bufferCapacity", bufferCapacity_);
56 template <
typename Data,
typename Product>
63 template <
typename Data,
typename Product>
66 int iStage = descendants_.size() - 1;
70 return (size - 1)*interval;
76 template <
typename Data,
typename Product>
80 { descendants_.append(ptr); }
int bufferSize() const
Return current size of history buffer.
void allocate()
Allocate memory and initialize to empty state.
Hierarchical auto-correlation function algorithm.
Saving / output archive for binary ostream.
Auto-correlation function, using hierarchical algorithm.
AutoCorrelation()
Constructor.
int blockFactor_
Number of values per block (ratio of intervals for successive stages).
Utility classes for scientific computation.
void serializePrivate(Archive &ar, const unsigned int version)
Serialize private data members, and descendants.
Saving archive for binary istream.
virtual void readParameters(std::istream &in)
Read parameters from file and initialize.
int maxDelay() const
Return maximum delay, in primary samples.
int maxStageId_
Maximum allowed stage index (controls maximum degree of blocking).
long stageInterval() const
Return the number of primary values per block at this stage.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
virtual void load(Serializable::IArchive &ar)
Load internal state from an archive.
ScalarParam< Type > & readOptional(std::istream &in, const char *label, Type &value)
Add and read a new optional ScalarParam < Type > object.