FMT 0.9.8
Forest management tools for forest planning
|
#include <FMTbounds.hpp>
Public Member Functions | |
FMTspec () | |
virtual | ~FMTspec ()=default |
FMTspec (const FMTspec &rhs) | |
FMTspec & | operator= (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 FMTyldbounds & | getyieldbound (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< FMTyldbounds > | yieldbounds |
the yields bounds vector lower>=y1<=upper,lower>=y2<=upper | |
Friends | |
class | Core::FMTyields |
class | boost::serialization::access |
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
Core::FMTspec::FMTspec | ( | ) |
Default constructor for FMTspec
|
virtualdefault |
Destructor for FMTspec
bool Core::FMTspec::add | ( | const FMTspec & | rhs | ) |
Add yields spec or age, period or lock spec from an other spec.
bool Core::FMTspec::addbounds | ( | const FMTagebounds & | bound | ) |
Set age bounds
bool Core::FMTspec::addbounds | ( | const FMTlockbounds & | bound | ) |
Set lock bounds
bool Core::FMTspec::addbounds | ( | const FMTyldbounds & | bound | ) |
Set yield bounds
|
inline |
Return true if all age,period and lock are within the bounds and when the yields (values) are within the yield bounds
|
inline |
return true if the given period, age and lock respect the age,period and lock bounds.
|
inline |
Return true if all the yields (values) are within the yield bounds.
bool Core::FMTspec::empty | ( | ) | const |
Return true if all bounds are empty.
bool Core::FMTspec::emptyage | ( | ) | const |
Return true if age bound is empty.
bool Core::FMTspec::emptylock | ( | ) | const |
Return true if lock bounds is empty.
bool Core::FMTspec::emptyperiod | ( | ) | const |
Return true if period bounds is empty.
bool Core::FMTspec::emptyylds | ( | ) | const |
Return true if yields bounds are empty.
int Core::FMTspec::getagelowerbound | ( | ) | const |
Get the lower bound of the age bounds.
int Core::FMTspec::getageupperbound | ( | ) | const |
Get the upper bounds of the age bounds.
int Core::FMTspec::getlocklowerbound | ( | ) | const |
Get the lower bound of the age bounds.
int Core::FMTspec::getlockupperbound | ( | ) | const |
Get the upper bounds of the age bounds.
int Core::FMTspec::getperiodlowerbound | ( | ) | const |
Get the lower bound of the period bounds.
int Core::FMTspec::getperiodupperbound | ( | ) | const |
Get the upper bound of the period bounds.
|
inline |
return the reference of a given FMTyldbounds using the name of the FMTyldbounds.
|
inline |
Return tthe yields bounds of the spec.
|
inline |
Return the yields names of the yield bounds.
size_t Core::FMTspec::hash | ( | ) | const |
Return the hashed value of FMTspec.
bool Core::FMTspec::issubsetof | ( | const FMTspec & | rhs | ) | const |
return true if this spec is the subset of the rhs spec.
|
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.
bool Core::FMTspec::setbounds | ( | const FMTperbounds & | bound | ) |
Set period bounds
|
friend |
|
friend |
serialize function is for serialization, used to do multiprocessing across multiple cpus (pickle in Pyhton)
|
protected |
Age bounds so lower >= age <= upper.
|
protected |
Lock bounds so lower >= lock <= upper.
|
protected |
Period bounds so lower >= period <= upper.
|
protected |
the yields bounds vector lower>=y1<=upper,lower>=y2<=upper
|
protected |
The names of each yield in the vector of yieldbounds.