ALMaSS Rabbit ODdox  1.1
The rabbit model description following ODdox protocol
PollenNectarDevelopmentCurve Class Reference

A standard class to contain a pollen or nectar curve based on indexed rates. More...

#include <plants.h>

Public Member Functions

 PollenNectarDevelopmentCurve (vector< int > *a_index, vector< double > *a_slopes)
 
 ~PollenNectarDevelopmentCurve ()
 
double GetData (int a_index)
 The basic return function for the curve - day indexed. More...
 
int closest (int a_value)
 

Protected Attributes

int m_CurveRefNum
 a reference to identify this precise curve - needs external management More...
 
vector< double > m_data
 The slopes used. More...
 
vector< int > m_index
 the index values to the slopes More...
 

Detailed Description

A standard class to contain a pollen or nectar curve based on indexed rates.

Definition at line 183 of file plants.h.

Constructor & Destructor Documentation

◆ PollenNectarDevelopmentCurve()

PollenNectarDevelopmentCurve::PollenNectarDevelopmentCurve ( vector< int > *  a_index,
vector< double > *  a_slopes 
)
inline

Definition at line 186 of file plants.h.

186  {
187  m_index = *a_index;
188  m_data = *a_slopes;
189  }

◆ ~PollenNectarDevelopmentCurve()

PollenNectarDevelopmentCurve::~PollenNectarDevelopmentCurve ( )
inline

Definition at line 190 of file plants.h.

190 { ; }

Member Function Documentation

◆ closest()

int PollenNectarDevelopmentCurve::closest ( int  a_value)
inline

Definition at line 196 of file plants.h.

196  {
197  // returns the vector index for m_index where the value contained is the first number greater than a_value
198  return int(std::distance(m_index.begin(), upper_bound(m_index.begin(), m_index.end(), a_value)));
199  }

◆ GetData()

double PollenNectarDevelopmentCurve::GetData ( int  a_index)
inline

The basic return function for the curve - day indexed.

Definition at line 193 of file plants.h.

193  {
194  return m_data[a_index];
195  }

Referenced by VegElement::PollenNectarPhenologyCalculation().

Member Data Documentation

◆ m_CurveRefNum

int PollenNectarDevelopmentCurve::m_CurveRefNum
protected

a reference to identify this precise curve - needs external management

Definition at line 202 of file plants.h.

◆ m_data

vector<double> PollenNectarDevelopmentCurve::m_data
protected

The slopes used.

Definition at line 204 of file plants.h.

◆ m_index

vector<int> PollenNectarDevelopmentCurve::m_index
protected

the index values to the slopes

Definition at line 206 of file plants.h.


The documentation for this class was generated from the following file:
PollenNectarDevelopmentCurve::m_data
vector< double > m_data
The slopes used.
Definition: plants.h:204
PollenNectarDevelopmentCurve::m_index
vector< int > m_index
the index values to the slopes
Definition: plants.h:206