File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HollingsDiscCurveClass Class Reference

A Hollings Disc curve class - type II functional response. More...

#include <CurveClasses.h>

Inheritance diagram for HollingsDiscCurveClass:
CurveClass

Public Member Functions

 HollingsDiscCurveClass (double a_A, double a_B, bool a_reversecurve, double a_MaxX, double a_MinX, const char *a_name)
 
virtual ~HollingsDiscCurveClass ()
 
- Public Member Functions inherited from CurveClass
 CurveClass (bool a_reversecurve, double a_MaxX, double a_MinX, const char *a_name)
 
virtual ~CurveClass ()
 
virtual double GetY (double a_X)
 
virtual void WriteDataFile (int a_step)
 

Protected Member Functions

virtual double DoCalc (double a_x)
 The specific calulation of y for a given x. More...
 
- Protected Member Functions inherited from CurveClass
virtual void CalculateCurveValues ()
 fills in the curve for 10,000 values from MinX to MaxX More...
 

Protected Attributes

double m_parameterA
 Parameter A. More...
 
double m_parameterB
 Parameter B. More...
 
- Protected Attributes inherited from CurveClass
double m_parameterMaxX
 A parameter for a the maximum value of X we consider. More...
 
double m_parameterMinX
 A parameter for a the minimum value of X we consider. More...
 
double m_step
 The size of each step on the X-axis. More...
 
double m_step_inv
 The inverse of m_step. More...
 
double * m_values
 The values of y we store for each X. More...
 
string m_name
 A scaler for the x-values. More...
 
bool m_reversecurve
 If true the values fall from 1 to zero, otherwise its zero to 1. More...
 

Detailed Description

A Hollings Disc curve class - type II functional response.

Constructor & Destructor Documentation

◆ HollingsDiscCurveClass()

HollingsDiscCurveClass::HollingsDiscCurveClass ( double  a_A,
double  a_B,
bool  a_reversecurve,
double  a_MaxX,
double  a_MinX,
const char *  a_name 
)
188  : CurveClass( a_reversecurve, a_MaxX, a_MinX, a_name ) {
189  m_parameterA = a_A;
190  m_parameterB = a_B;
192 }

References CurveClass::CalculateCurveValues(), m_parameterA, and m_parameterB.

◆ ~HollingsDiscCurveClass()

HollingsDiscCurveClass::~HollingsDiscCurveClass ( )
virtual
195  {
196  ;
197 }

Member Function Documentation

◆ DoCalc()

double HollingsDiscCurveClass::DoCalc ( double  a_x)
protectedvirtual

The specific calulation of y for a given x.

Reimplemented from CurveClass.

200  {
201  return ((a_x * m_parameterA) / (1 + m_parameterA * m_parameterB * a_x));
202 }

References m_parameterA, and m_parameterB.

Member Data Documentation

◆ m_parameterA

double HollingsDiscCurveClass::m_parameterA
protected

Parameter A.

Hollings disc curve takes two parameters

Referenced by DoCalc(), and HollingsDiscCurveClass().

◆ m_parameterB

double HollingsDiscCurveClass::m_parameterB
protected

Parameter B.

Referenced by DoCalc(), and HollingsDiscCurveClass().


The documentation for this class was generated from the following files:
HollingsDiscCurveClass::m_parameterA
double m_parameterA
Parameter A.
Definition: CurveClasses.h:143
HollingsDiscCurveClass::m_parameterB
double m_parameterB
Parameter B.
Definition: CurveClasses.h:145
CurveClass::CalculateCurveValues
virtual void CalculateCurveValues()
fills in the curve for 10,000 values from MinX to MaxX
Definition: CurveClasses.cpp:57
CurveClass::CurveClass
CurveClass(bool a_reversecurve, double a_MaxX, double a_MinX, const char *a_name)
Definition: CurveClasses.cpp:40