hydrobricks
Loading...
Searching...
No Matches
TimeSeriesDataIrregular Class Reference
Inheritance diagram for TimeSeriesDataIrregular:
TimeSeriesData

Public Member Functions

 TimeSeriesDataIrregular (vecDouble &dates)
 
bool SetValues (const vecDouble &values) override
 
double GetValueFor (double date) override
 
double GetCurrentValue () override
 
double GetSum () override
 
bool SetCursorToDate (double date) override
 
bool AdvanceOneTimeStep () override
 
double GetStart () const override
 
double GetEnd () const override
 
bool IsValid () const override
 
void Validate () const override
 
- Public Member Functions inherited from TimeSeriesData

Protected Attributes

vecDouble _dates
 
- Protected Attributes inherited from TimeSeriesData
vecDouble _values
 
int _cursor
 

Member Function Documentation

◆ AdvanceOneTimeStep()

bool TimeSeriesDataIrregular::AdvanceOneTimeStep ( )
overridevirtual

Advance the cursor to the next time step.

Returns
true if the cursor was successfully advanced to the next time step.

Implements TimeSeriesData.

◆ GetCurrentValue()

double TimeSeriesDataIrregular::GetCurrentValue ( )
overridevirtual

Get the current value.

Returns
the current value.

Reimplemented from TimeSeriesData.

◆ GetEnd()

double TimeSeriesDataIrregular::GetEnd ( ) const
overridevirtual

Get the end date of the time series data.

Returns
the end date of the time series data.

Implements TimeSeriesData.

◆ GetStart()

double TimeSeriesDataIrregular::GetStart ( ) const
overridevirtual

Get the start date of the time series data.

Returns
the start date of the time series data.

Implements TimeSeriesData.

◆ GetSum()

double TimeSeriesDataIrregular::GetSum ( )
overridevirtual

Get the sum of the values.

Returns
the sum of the values.

Reimplemented from TimeSeriesData.

◆ GetValueFor()

double TimeSeriesDataIrregular::GetValueFor ( double date)
overridevirtual

Get the value for the provided date.

Parameters
datedate to get the value for.
Returns
the value for the provided date.

Reimplemented from TimeSeriesData.

◆ IsValid()

bool TimeSeriesDataIrregular::IsValid ( ) const
nodiscardoverridevirtual

Check if the time series data is valid. Verifies that the data has values and date range is set correctly.

Returns
true if the time series data is valid, false otherwise.

Implements TimeSeriesData.

◆ SetCursorToDate()

bool TimeSeriesDataIrregular::SetCursorToDate ( double date)
overridevirtual

Set the cursor to the provided date.

Parameters
datedate to set the cursor to.
Returns
true if the cursor was successfully set to the provided date.

Implements TimeSeriesData.

◆ SetValues()

bool TimeSeriesDataIrregular::SetValues ( const vecDouble & values)
overridevirtual

Set the values of the time series data.

Parameters
valuesvector of values to set.
Returns
true if the values were successfully set.

Reimplemented from TimeSeriesData.

◆ Validate()

void TimeSeriesDataIrregular::Validate ( ) const
overridevirtual

Validate the time series data. Throws an exception if the time series data is invalid.

Exceptions
ModelConfigErrorif validation fails.

Implements TimeSeriesData.


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