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>
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); }
long stageInterval() const
Return the number of primary values per block at this stage.
AutoCorrStage()
Constructor.
int bufferSize() const
Return current size of history buffer.
void serializePrivate(Archive &ar, const unsigned int version)
Serialize private data members, and descendants.
int bufferCapacity_
Physical capacity (# of elements) of buffer, corr, and nCorr.
int maxStageId_
Maximum allowed stage index (controls maximum degree of blocking).
int blockFactor_
Number of values per block (ratio of intervals for successive stages).
void allocate()
Allocate memory and initialize to empty state.
Auto-correlation function, using hierarchical algorithm.
int maxDelay() const
Return maximum delay, in primary samples.
virtual void readParameters(std::istream &in)
Read parameters from file and initialize.
virtual void load(Serializable::IArchive &ar)
Load internal state from an archive.
AutoCorrelation()
Constructor.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
ScalarParam< Type > & readOptional(std::istream &in, const char *label, Type &value)
Add and read a new optional ScalarParam < Type > object.
ScalarParam< Type > & loadParameter(Serializable::IArchive &ar, const char *label, Type &value, bool isRequired)
Add and load a new ScalarParam < Type > object.
BinaryFileIArchive IArchive
Type of input archive used by load method.
BinaryFileOArchive OArchive
Type of output archive used by save method.
Utility classes for scientific computation.