hydrobricks
Loading...
Searching...
No Matches
ParameterModifier Class Reference

#include <ParameterModifier.h>

Public Member Functions

 ParameterModifier (ParameterModifierType type)
 
void SetType (ParameterModifierType type)
 
ParameterModifierType GetType () const
 
bool SetYearlyValues (int yearStart, int yearEnd, const vecFloat &values)
 
bool SetMonthlyValues (const vecFloat &values)
 
bool SetDatesAndValues (const vecDouble &dates, const vecFloat &values)
 
float UpdateValue (double date)
 
bool UpdatesOnYearChange () const
 
bool UpdatesOnMonthChange () const
 
bool UpdatesOnDateChange () const
 

Detailed Description

Parameter modifier that changes parameter values over time. Supports yearly, monthly, and date-based modifications.

Member Function Documentation

◆ GetType()

ParameterModifierType ParameterModifier::GetType ( ) const
inline

Get the type of the modifier.

Returns
the modifier type.

◆ SetDatesAndValues()

bool ParameterModifier::SetDatesAndValues ( const vecDouble & dates,
const vecFloat & values )

Set the values of the parameter for a range of dates.

Parameters
datesvector of dates in MJD format
valuesvalues for each date
Returns
true if the values were set successfully, false otherwise

◆ SetMonthlyValues()

bool ParameterModifier::SetMonthlyValues ( const vecFloat & values)

Set the values of the parameter for each month.

Parameters
valuesvalues for each month (must be size 12)
Returns
true if the values were set successfully, false otherwise

◆ SetType()

void ParameterModifier::SetType ( ParameterModifierType type)
inline

Set the type of the modifier.

Parameters
typethe modifier type.

◆ SetYearlyValues()

bool ParameterModifier::SetYearlyValues ( int yearStart,
int yearEnd,
const vecFloat & values )

Set the values of the parameter for a range of years.

Parameters
yearStartstart year
yearEndend year
valuesvalues for each year
Returns
true if the values were set successfully, false otherwise

◆ UpdatesOnDateChange()

bool ParameterModifier::UpdatesOnDateChange ( ) const
inline

Check if the modifier needs to update for a date change.

Returns
true if the modifier updates on date changes.

◆ UpdatesOnMonthChange()

bool ParameterModifier::UpdatesOnMonthChange ( ) const
inline

Check if the modifier needs to update for a month change.

Returns
true if the modifier updates on month changes.

◆ UpdatesOnYearChange()

bool ParameterModifier::UpdatesOnYearChange ( ) const
inline

Check if the modifier needs to update for a year change.

Returns
true if the modifier updates on year changes.

◆ UpdateValue()

float ParameterModifier::UpdateValue ( double date)

Update the parameter value based on the current date.

Parameters
datecurrent date in MJD format.
Returns
the updated parameter value.

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