GCBM
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TimeSeries::TimeSeriesPrep Class Reference
Collaboration diagram for TimeSeries::TimeSeriesPrep:
Collaboration graph

Public Member Functions

 TimeSeriesPrep (int yr0, int dataPerYr, int nYrs, bool subSame, DateOrigin origin, int extraSteps, const std::vector< boost::optional< double >> raw)
 
 TimeSeriesPrep ()
 
 ~TimeSeriesPrep ()=default
 
void setTiming (const flint::ITiming *timing)
 
const std::vector< double > & series ()
 
double value ()
 
int yr0 () const
 
int nYrs () const
 
int dataPerYr () const
 
bool subSame () const
 
const std::vector< boost::optional< double > > raw () const
 
DateOrigin origin () const
 
ExtrapType extrap () const
 

Private Member Functions

void preparedTS ()
 
void calcSizes ()
 
std::vector< double > fillGapsMult ()
 
void computeOneDataPoint (const std::vector< double > &data, std::vector< double > &prep)
 
void computeAvgYr (const std::vector< double > &data)
 
void computeWholeYrsInterp (const std::vector< double > &data, std::vector< double > &prep)
 
void computeWholeYrsBefore (const std::vector< double > &data, std::vector< double > &prep)
 
void computeWholeYrsAfter (const std::vector< double > &data, std::vector< double > &prep)
 
void computeOneWholeYr (const std::vector< double > &data, std::vector< double > &prep, int dix, int pix)
 
void computeOddStepsBefore (const std::vector< double > &data, std::vector< double > &prep)
 
void computeOddStepsAfter (const std::vector< double > &data, std::vector< double > &prep)
 
void copyOddStepsBefore (const std::vector< double > &src, std::vector< double > &prep, int srcIx)
 
void copyOddStepsAfter (const std::vector< double > &src, std::vector< double > &prep, int srcIx, int pix)
 
int dixFromYr (const std::vector< double > &data, int yr)
 
void interpOneYr (const double *d, double *p, int prepIxLo, int prepIxHi)
 
void interpOneYrWithCheck (const std::vector< double > &data, std::vector< double > &prep, int dix, int pix, int prepIxLo, int prepIxHi)
 

Private Attributes

ExtrapType _extrap
 
DateOrigin _origin
 
int _yr0
 
int _nYrs
 
int _dataPerYr
 
double _mult
 
bool _subSame
 
const flint::ITiming * _timing
 
const std::vector< boost::optional< double > > _raw
 
std::vector< double > _series
 
bool _prepared
 
int _prepFirstYr
 
int _prepFirstStep
 
int _prepLastYr
 
int _prepStepsPerYr
 
std::vector< double > _avgData
 
std::vector< double > _avgPrep
 
int _dataStYr
 
int _dataEnYr
 
int _prepNSteps
 
int _prepStYr
 
int _prepEnYr
 
int _oddStepsBefore
 
int _wholeYrsBefore
 
int _wholeYrsInterp
 
int _wholeYrsAfter
 
int _oddStepsAfter
 
int _nWholeYrs
 
int _firstWholeYr
 
int _extraStepsIfSprout
 

Constructor & Destructor Documentation

◆ TimeSeriesPrep() [1/2]

TimeSeriesPrep ( int  yr0,
int  dataPerYr,
int  nYrs,
bool  subSame,
DateOrigin  origin,
int  extraSteps,
const std::vector< boost::optional< double >>  raw 
)

◆ TimeSeriesPrep() [2/2]

◆ ~TimeSeriesPrep()

~TimeSeriesPrep ( )
default

Member Function Documentation

◆ calcSizes()

void calcSizes ( )
private

◆ computeAvgYr()

void computeAvgYr ( const std::vector< double > &  data)
private

◆ computeOddStepsAfter()

void computeOddStepsAfter ( const std::vector< double > &  data,
std::vector< double > &  prep 
)
private

◆ computeOddStepsBefore()

void computeOddStepsBefore ( const std::vector< double > &  data,
std::vector< double > &  prep 
)
private

◆ computeOneDataPoint()

void computeOneDataPoint ( const std::vector< double > &  data,
std::vector< double > &  prep 
)
private

◆ computeOneWholeYr()

void computeOneWholeYr ( const std::vector< double > &  data,
std::vector< double > &  prep,
int  dix,
int  pix 
)
private

◆ computeWholeYrsAfter()

void computeWholeYrsAfter ( const std::vector< double > &  data,
std::vector< double > &  prep 
)
private

◆ computeWholeYrsBefore()

void computeWholeYrsBefore ( const std::vector< double > &  data,
std::vector< double > &  prep 
)
private

◆ computeWholeYrsInterp()

void computeWholeYrsInterp ( const std::vector< double > &  data,
std::vector< double > &  prep 
)
private

◆ copyOddStepsAfter()

void copyOddStepsAfter ( const std::vector< double > &  src,
std::vector< double > &  prep,
int  srcIx,
int  pix 
)
private

◆ copyOddStepsBefore()

void copyOddStepsBefore ( const std::vector< double > &  src,
std::vector< double > &  prep,
int  srcIx 
)
private

◆ dataPerYr()

int dataPerYr ( ) const

◆ dixFromYr()

int dixFromYr ( const std::vector< double > &  data,
int  yr 
)
private

◆ extrap()

ExtrapType extrap ( ) const

◆ fillGapsMult()

std::vector< double > fillGapsMult ( )
private

◆ interpOneYr()

void interpOneYr ( const double *  d,
double *  p,
int  prepIxLo,
int  prepIxHi 
)
private

◆ interpOneYrWithCheck()

void interpOneYrWithCheck ( const std::vector< double > &  data,
std::vector< double > &  prep,
int  dix,
int  pix,
int  prepIxLo,
int  prepIxHi 
)
private

◆ nYrs()

int nYrs ( ) const

◆ origin()

DateOrigin origin ( ) const

◆ preparedTS()

void preparedTS ( )
private

◆ raw()

const std::vector< boost::optional< double > > raw ( ) const

◆ series()

const std::vector< double > & series ( )

◆ setTiming()

void setTiming ( const flint::ITiming *  timing)

◆ subSame()

bool subSame ( ) const

◆ value()

double value ( )

◆ yr0()

int yr0 ( ) const

Member Data Documentation

◆ _avgData

std::vector<double> _avgData
private

◆ _avgPrep

std::vector<double> _avgPrep
private

◆ _dataEnYr

int _dataEnYr
private

◆ _dataPerYr

int _dataPerYr
private

◆ _dataStYr

int _dataStYr
private

◆ _extrap

ExtrapType _extrap
private

◆ _extraStepsIfSprout

int _extraStepsIfSprout
private

◆ _firstWholeYr

int _firstWholeYr
private

◆ _mult

double _mult
private

◆ _nWholeYrs

int _nWholeYrs
private

◆ _nYrs

int _nYrs
private

◆ _oddStepsAfter

int _oddStepsAfter
private

◆ _oddStepsBefore

int _oddStepsBefore
private

◆ _origin

DateOrigin _origin
private

◆ _prepared

bool _prepared
private

◆ _prepEnYr

int _prepEnYr
private

◆ _prepFirstStep

int _prepFirstStep
private

◆ _prepFirstYr

int _prepFirstYr
private

◆ _prepLastYr

int _prepLastYr
private

◆ _prepNSteps

int _prepNSteps
private

◆ _prepStepsPerYr

int _prepStepsPerYr
private

◆ _prepStYr

int _prepStYr
private

◆ _raw

const std::vector<boost::optional<double> > _raw
private

◆ _series

std::vector<double> _series
private

◆ _subSame

bool _subSame
private

◆ _timing

const flint::ITiming* _timing
private

◆ _wholeYrsAfter

int _wholeYrsAfter
private

◆ _wholeYrsBefore

int _wholeYrsBefore
private

◆ _wholeYrsInterp

int _wholeYrsInterp
private

◆ _yr0

int _yr0
private

The documentation for this class was generated from the following file: