FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
Core::FMTData Class Reference

Data of a yield holding the values, sources and operators used to compute complex yields. More...

#include <FMTData.h>

Collaboration diagram for Core::FMTData:
[legend]

Public Member Functions

 FMTData ()
 Default constructor for FMTData.
 
 ~FMTData ()=default
 Default destructor for FMTData.
 
 FMTData (const FMTData &rhs)
 Copy constructor for FMTData.
 
 FMTData (const std::vector< double > &lvalues, const FMTyieldparserop &lops, const std::vector< std::string > &lsource)
 Construct a FMTData from values, an operator and sources.
 
 FMTData (const std::vector< double > &lvalues, const FMTyieldparserop &lops, const std::vector< std::string > &lsource, const std::vector< bool > &varstack)
 Construct a FMTData from values, an operator, sources and a stacking.
 
FMTDataoperator= (const FMTData &rhs)
 Copy assignment operator for FMTData.
 
FMTyieldparserop getOp () const
 Return the yield parser operator of the data.
 
void clearCache ()
 Clear the cached values of the data.
 
bool constant () const
 Return true if the data is constant.
 
bool nullData () const
 Return true if the data is null.
 
bool cacheValue (const FMTYieldRequest &request) const
 Return true if the value for a yield request is cached.
 
double get (const FMTYieldRequest &request) const
 Get the value of the data for a yield request.
 
void set (const double &value, const FMTYieldRequest &request, const bool &age_only) const
 Cache the value of the data for a yield request.
 
std::vector< const std::string * > getSources () const
 Return pointers to the sources of the data.
 
std::vector< std::string > getSourcesCopy () const
 Return a copy of the sources of the data.
 
std::vector< const double * > getValues () const
 Return pointers to the values of the data.
 
FMTExpression toExpression () const
 Convert the data to an FMTExpression.
 
bool operator== (const FMTData &rhs) const
 Equality comparison operator of FMTData.
 
 operator std::string () const
 Convert the data to its string representation.
 
FMTData operator* (const double &factor) const
 Multiply the data values by a factor.
 

Public Attributes

std::vector< double > data
 

Friends

class boost::serialization::access
 

Detailed Description

Data of a yield holding the values, sources and operators used to compute complex yields.

Constructor & Destructor Documentation

◆ FMTData() [1/4]

Core::FMTData::FMTData ( )

Default constructor for FMTData.

◆ ~FMTData()

Core::FMTData::~FMTData ( )
default

Default destructor for FMTData.

◆ FMTData() [2/4]

Core::FMTData::FMTData ( const FMTData rhs)

Copy constructor for FMTData.

Parameters
[in]rhsthe FMTData to copy.

◆ FMTData() [3/4]

Core::FMTData::FMTData ( const std::vector< double > &  lvalues,
const FMTyieldparserop lops,
const std::vector< std::string > &  lsource 
)

Construct a FMTData from values, an operator and sources.

Parameters
[in]lvaluesthe values.
[in]lopsthe yield parser operator.
[in]lsourcethe sources.

◆ FMTData() [4/4]

Core::FMTData::FMTData ( const std::vector< double > &  lvalues,
const FMTyieldparserop lops,
const std::vector< std::string > &  lsource,
const std::vector< bool > &  varstack 
)

Construct a FMTData from values, an operator, sources and a stacking.

Parameters
[in]lvaluesthe values.
[in]lopsthe yield parser operator.
[in]lsourcethe sources.
[in]varstackthe stacking of the sources (string = true, number = false).

Member Function Documentation

◆ cacheValue()

bool Core::FMTData::cacheValue ( const FMTYieldRequest request) const

Return true if the value for a yield request is cached.

Parameters
[in]requestthe yield request.
Returns
true if the value is cached else false.

◆ clearCache()

void Core::FMTData::clearCache ( )

Clear the cached values of the data.

◆ constant()

bool Core::FMTData::constant ( ) const

Return true if the data is constant.

Returns
true if the data is constant else false.

◆ get()

double Core::FMTData::get ( const FMTYieldRequest request) const

Get the value of the data for a yield request.

Parameters
[in]requestthe yield request.
Returns
the value of the data.

◆ getOp()

FMTyieldparserop Core::FMTData::getOp ( ) const

Return the yield parser operator of the data.

Returns
the yield parser operator.

◆ getSources()

std::vector< const std::string * > Core::FMTData::getSources ( ) const

Return pointers to the sources of the data.

Returns
the sources of the data.

◆ getSourcesCopy()

std::vector< std::string > Core::FMTData::getSourcesCopy ( ) const

Return a copy of the sources of the data.

Returns
a copy of the sources of the data.

◆ getValues()

std::vector< const double * > Core::FMTData::getValues ( ) const

Return pointers to the values of the data.

Returns
the values of the data.

◆ nullData()

bool Core::FMTData::nullData ( ) const

Return true if the data is null.

Returns
true if the data is null else false.

◆ operator std::string()

Core::FMTData::operator std::string ( ) const

Convert the data to its string representation.

Returns
the string representation of the data.

◆ operator*()

FMTData Core::FMTData::operator* ( const double &  factor) const

Multiply the data values by a factor.

Parameters
[in]factorthe factor to multiply by.
Returns
the multiplied data.

◆ operator=()

FMTData & Core::FMTData::operator= ( const FMTData rhs)

Copy assignment operator for FMTData.

Parameters
[in]rhsthe FMTData to copy.
Returns
a reference to this FMTData.

◆ operator==()

bool Core::FMTData::operator== ( const FMTData rhs) const

Equality comparison operator of FMTData.

Parameters
[in]rhsthe FMTData to compare with.
Returns
true if both data are equal else false.

◆ set()

void Core::FMTData::set ( const double &  value,
const FMTYieldRequest request,
const bool &  age_only 
) const

Cache the value of the data for a yield request.

Parameters
[in]valuethe value to cache.
[in]requestthe yield request.
[in]age_onlyif true caches on age only.

◆ toExpression()

FMTExpression Core::FMTData::toExpression ( ) const

Convert the data to an FMTExpression.

Returns
the expression of the data.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ data

std::vector<double> Core::FMTData::data

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