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

#include <FMTbounds.hpp>

Inheritance diagram for Core::FMTspec:
[legend]
Collaboration diagram for Core::FMTspec:
[legend]

Public Member Functions

 FMTspec ()
 
virtual ~FMTspec ()=default
 
 FMTspec (const FMTspec &rhs)
 
FMTspecoperator= (const FMTspec &rhs)
 
bool add (const FMTspec &rhs)
 
bool setbounds (const FMTperbounds &bound)
 
bool addbounds (const FMTagebounds &bound)
 
bool addbounds (const FMTyldbounds &bound)
 
bool addbounds (const FMTlockbounds &bound)
 
bool allowwithoutyield (const int &tperiod, const int &tage, const int &tlock) const
 
const FMTyldboundsgetyieldbound (const std::string &name) const
 
bool allowyields (const std::vector< double > &values) const
 
bool allow (const int &tperiod, const int &tage, const int &tlock, const std::vector< double > &values) const
 
const std::vector< std::string > & getylds () const
 
const std::vector< FMTyldbounds > & getyldbounds () const
 
virtual operator std::string () const
 
bool operator== (const FMTspec &rhs) const
 
bool operator< (const FMTspec &rhs) const
 
size_t hash () const
 
bool empty () const
 
bool emptyage () const
 
bool emptyylds () const
 
bool emptyperiod () const
 
bool emptylock () const
 
int getageupperbound () const
 
int getagelowerbound () const
 
int getperiodupperbound () const
 
int getperiodlowerbound () const
 
int getlockupperbound () const
 
int getlocklowerbound () const
 
bool issubsetof (const FMTspec &rhs) const
 

Protected Attributes

FMTperbounds per
 Period bounds so lower >= period <= upper.
 
FMTagebounds age
 Age bounds so lower >= age <= upper.
 
FMTlockbounds lock
 Lock bounds so lower >= lock <= upper.
 
std::vector< std::string > yieldnames
 The names of each yield in the vector of yieldbounds.
 
std::vector< FMTyldboundsyieldbounds
 the yields bounds vector lower>=y1<=upper,lower>=y2<=upper
 

Friends

class Core::FMTyields
 
class boost::serialization::access
 

Detailed Description

FMTspec represent the specifications of a group of FMTdevelopement. You can characterize a FMTdevelopement by it's period (FMTperbounds), it's age (FMTagebounds), it's lock (FMTlockbounds) and it's yields (yieldbounds). Bounds are "bounds" lower and upper bounds: Example: 1>=age<=10, 5>=period<=20, 0>=lock<=10 and 145<=yield<=700

Constructor & Destructor Documentation

◆ FMTspec() [1/2]

Core::FMTspec::FMTspec ( )

Default constructor for FMTspec

◆ ~FMTspec()

virtual Core::FMTspec::~FMTspec ( )
virtualdefault

Destructor for FMTspec

◆ FMTspec() [2/2]

Core::FMTspec::FMTspec ( const FMTspec rhs)

FMTspec copy constructor.

Member Function Documentation

◆ add()

bool Core::FMTspec::add ( const FMTspec rhs)

Add yields spec or age, period or lock spec from an other spec.

◆ addbounds() [1/3]

bool Core::FMTspec::addbounds ( const FMTagebounds bound)

Set age bounds

◆ addbounds() [2/3]

bool Core::FMTspec::addbounds ( const FMTlockbounds bound)

Set lock bounds

◆ addbounds() [3/3]

bool Core::FMTspec::addbounds ( const FMTyldbounds bound)

Set yield bounds

◆ allow()

bool Core::FMTspec::allow ( const int &  tperiod,
const int &  tage,
const int &  tlock,
const std::vector< double > &  values 
) const
inline

Return true if all age,period and lock are within the bounds and when the yields (values) are within the yield bounds

◆ allowwithoutyield()

bool Core::FMTspec::allowwithoutyield ( const int &  tperiod,
const int &  tage,
const int &  tlock 
) const
inline

return true if the given period, age and lock respect the age,period and lock bounds.

◆ allowyields()

bool Core::FMTspec::allowyields ( const std::vector< double > &  values) const
inline

Return true if all the yields (values) are within the yield bounds.

◆ empty()

bool Core::FMTspec::empty ( ) const

Return true if all bounds are empty.

◆ emptyage()

bool Core::FMTspec::emptyage ( ) const

Return true if age bound is empty.

◆ emptylock()

bool Core::FMTspec::emptylock ( ) const

Return true if lock bounds is empty.

◆ emptyperiod()

bool Core::FMTspec::emptyperiod ( ) const

Return true if period bounds is empty.

◆ emptyylds()

bool Core::FMTspec::emptyylds ( ) const

Return true if yields bounds are empty.

◆ getagelowerbound()

int Core::FMTspec::getagelowerbound ( ) const

Get the lower bound of the age bounds.

◆ getageupperbound()

int Core::FMTspec::getageupperbound ( ) const

Get the upper bounds of the age bounds.

◆ getlocklowerbound()

int Core::FMTspec::getlocklowerbound ( ) const

Get the lower bound of the age bounds.

◆ getlockupperbound()

int Core::FMTspec::getlockupperbound ( ) const

Get the upper bounds of the age bounds.

◆ getperiodlowerbound()

int Core::FMTspec::getperiodlowerbound ( ) const

Get the lower bound of the period bounds.

◆ getperiodupperbound()

int Core::FMTspec::getperiodupperbound ( ) const

Get the upper bound of the period bounds.

◆ getyieldbound()

const FMTyldbounds & Core::FMTspec::getyieldbound ( const std::string &  name) const
inline

return the reference of a given FMTyldbounds using the name of the FMTyldbounds.

◆ getyldbounds()

const std::vector< FMTyldbounds > & Core::FMTspec::getyldbounds ( ) const
inline

Return tthe yields bounds of the spec.

◆ getylds()

const std::vector< std::string > & Core::FMTspec::getylds ( ) const
inline

Return the yields names of the yield bounds.

◆ hash()

size_t Core::FMTspec::hash ( ) const

Return the hashed value of FMTspec.

◆ issubsetof()

bool Core::FMTspec::issubsetof ( const FMTspec rhs) const

return true if this spec is the subset of the rhs spec.

◆ operator std::string()

virtual Core::FMTspec::operator std::string ( ) const
virtual

Returns the string reprensentation of the FMTspec like _age >= lower and _Age <= upper and ....

Reimplemented in Core::FMTconstraint, Core::FMTfork, Core::FMToutputsource, and Core::FMTtransitionmask.

◆ operator<()

bool Core::FMTspec::operator< ( const FMTspec rhs) const

FMTspec less than operator.

◆ operator=()

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

Copy assignement of FMTspec

◆ operator==()

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

FMTspec equality operator.

◆ setbounds()

bool Core::FMTspec::setbounds ( const FMTperbounds bound)

Set period bounds

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

◆ Core::FMTyields

friend class Core::FMTyields
friend

serialize function is for serialization, used to do multiprocessing across multiple cpus (pickle in Pyhton)

Member Data Documentation

◆ age

FMTagebounds Core::FMTspec::age
protected

Age bounds so lower >= age <= upper.

◆ lock

FMTlockbounds Core::FMTspec::lock
protected

Lock bounds so lower >= lock <= upper.

◆ per

FMTperbounds Core::FMTspec::per
protected

Period bounds so lower >= period <= upper.

◆ yieldbounds

std::vector<FMTyldbounds> Core::FMTspec::yieldbounds
protected

the yields bounds vector lower>=y1<=upper,lower>=y2<=upper

◆ yieldnames

std::vector<std::string> Core::FMTspec::yieldnames
protected

The names of each yield in the vector of yieldbounds.


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