![]() |
FMT 1.2.0
Forest management tools for forest planning
|
List of FMTFork describing the transition of an action, disturbing a development to generate new development paths. More...
#include <FMTTransition.h>
Public Member Functions | |
| FMTTransition & | operator+= (const FMTTransition &OtherTransition) |
| Append another transition to this transition, which needs to be unshrunk otherwise an exception is thrown. | |
| FMTTransition () | |
| Default constructor for FMTTransition. | |
| ~FMTTransition ()=default | |
| Default destructor for FMTTransition. | |
| FMTTransition (const std::string &lname) | |
| Construct a transition keeping only its name. | |
| FMTTransition (const FMTTransition &rhs) | |
| Copy constructor for FMTTransition. | |
| FMTTransition & | operator= (const FMTTransition &rhs) |
| Copy assignment operator for FMTTransition. | |
| operator std::string () const | |
| Convert the transition to a string as in a transition file. | |
| FMTTransition | single () const |
| Return a transition that leads to a single development path, selecting the one with the highest area proportion, for cell based models. | |
| std::string | getName () const |
| Get the name of the transition. | |
| void | setName (const std::string &p_name) |
| Set the name of the transition. | |
| bool | isLeaking () const |
| Return true if a fork has a total proportion different from 1. | |
| const FMTFork * | getFork (const Core::FMTDevelopment &development, const FMTYields &ylds) const |
| Return the first useful fork for which the development can be disturbed based on the yields. | |
| std::vector< const FMTTheme * > | getStaticThemes (const std::vector< const FMTTheme * > &themes) const |
| Return the themes that have no attribute change in the transition masks (static themes). | |
| std::vector< Core::FMTMask > | canProduce (const Core::FMTMask &testmask, const std::vector< Core::FMTTheme > &themes) const |
| Return all the source masks that can produce the given mask through the transition. | |
| unsigned int | ageAfter (const std::vector< FMTDevelopment > &devs, const FMTAction &action, const FMTYields &ylds, const std::vector< FMTTheme > &themes) const |
| Return the average age after disturbance across the developments, for GCBM. | |
| FMTMask | mainTarget (const std::vector< FMTDevelopment > &devs, const FMTYields &ylds) const |
| Return the most targeted mask across the developments based on the yields, for GCBM. | |
| std::map< std::string, std::vector< FMTDevelopment > > | attributeTargets (const std::vector< FMTDevelopment > &devs, const FMTYields &ylds, const std::vector< FMTTheme > &themes) const |
| Classify the developments by mask key based on the yields. | |
| bool | operator< (const FMTTransition &rhs) const |
| Less than comparison operator of FMTTransition. | |
| bool | operator== (const FMTTransition &rhs) const |
| Equality comparison operator of FMTTransition, checking if they have the same name. | |
| bool | operator!= (const FMTTransition &rhs) const |
| Inequality comparison operator of FMTTransition, checking if they have a different name. | |
| FMTTransition | preSolve (const FMTMaskFilter &filter, const std::vector< FMTTheme > &originalthemes, std::vector< FMTTheme > &newthemes, bool compressdata=false) const |
| Return a presolved transition based on a filter, the original themes and the new presolved themes. | |
| void | preSolveRef (const FMTMaskFilter &p_filter, const std::vector< FMTTheme > &p_originalThemes, std::vector< FMTTheme > &p_newthemes, bool p_compressdata=false) |
| Presolve the transition in place based on a filter, the original themes and the new presolved themes. | |
Protected Attributes | |
| std::string | name |
| name of the FMTtranstion same name seen in FMTAction | |
Friends | |
| class | boost::serialization::access |
| Serialize the FMTTransition through its base FMTList<FMTFork> for multiprocessing across multiple cpus (pickle in Python). | |
List of FMTFork describing the transition of an action, disturbing a development to generate new development paths.
Each FMTAction has its FMTTransition. Each fork is a transition source with its linked targets.
| Core::FMTTransition::FMTTransition | ( | ) |
Default constructor for FMTTransition.
|
default |
Default destructor for FMTTransition.
| Core::FMTTransition::FMTTransition | ( | const std::string & | lname | ) |
Construct a transition keeping only its name.
| [in] | lname | the name of the transition. |
| Core::FMTTransition::FMTTransition | ( | const FMTTransition & | rhs | ) |
Copy constructor for FMTTransition.
| [in] | rhs | the FMTTransition to copy. |
| unsigned int Core::FMTTransition::ageAfter | ( | const std::vector< FMTDevelopment > & | devs, |
| const FMTAction & | action, | ||
| const FMTYields & | ylds, | ||
| const std::vector< FMTTheme > & | themes | ||
| ) | const |
Return the average age after disturbance across the developments, for GCBM.
| [in] | devs | the developments. |
| [in] | action | the action. |
| [in] | ylds | the yields. |
| [in] | themes | the themes. |
| std::map< std::string, std::vector< FMTDevelopment > > Core::FMTTransition::attributeTargets | ( | const std::vector< FMTDevelopment > & | devs, |
| const FMTYields & | ylds, | ||
| const std::vector< FMTTheme > & | themes | ||
| ) | const |
Classify the developments by mask key based on the yields.
| [in] | devs | the developments. |
| [in] | ylds | the yields. |
| [in] | themes | the themes. |
| std::vector< Core::FMTMask > Core::FMTTransition::canProduce | ( | const Core::FMTMask & | testmask, |
| const std::vector< Core::FMTTheme > & | themes | ||
| ) | const |
Return all the source masks that can produce the given mask through the transition.
| [in] | testmask | the mask to produce. |
| [in] | themes | the themes. |
| const FMTFork * Core::FMTTransition::getFork | ( | const Core::FMTDevelopment & | development, |
| const FMTYields & | ylds | ||
| ) | const |
Return the first useful fork for which the development can be disturbed based on the yields.
| [in] | development | the development. |
| [in] | ylds | the yields. |
|
inline |
Get the name of the transition.
| std::vector< const FMTTheme * > Core::FMTTransition::getStaticThemes | ( | const std::vector< const FMTTheme * > & | themes | ) | const |
Return the themes that have no attribute change in the transition masks (static themes).
| [in] | themes | the themes to filter. |
| bool Core::FMTTransition::isLeaking | ( | ) | const |
Return true if a fork has a total proportion different from 1.
| FMTMask Core::FMTTransition::mainTarget | ( | const std::vector< FMTDevelopment > & | devs, |
| const FMTYields & | ylds | ||
| ) | const |
Return the most targeted mask across the developments based on the yields, for GCBM.
| [in] | devs | the developments. |
| [in] | ylds | the yields. |
| Core::FMTTransition::operator std::string | ( | ) | const |
Convert the transition to a string as in a transition file.
| bool Core::FMTTransition::operator!= | ( | const FMTTransition & | rhs | ) | const |
Inequality comparison operator of FMTTransition, checking if they have a different name.
| [in] | rhs | the transition to compare with. |
| FMTTransition & Core::FMTTransition::operator+= | ( | const FMTTransition & | OtherTransition | ) |
Append another transition to this transition, which needs to be unshrunk otherwise an exception is thrown.
| [in] | OtherTransition | the other transition to append to this one. |
| bool Core::FMTTransition::operator< | ( | const FMTTransition & | rhs | ) | const |
Less than comparison operator of FMTTransition.
| [in] | rhs | the transition to compare with. |
| FMTTransition & Core::FMTTransition::operator= | ( | const FMTTransition & | rhs | ) |
Copy assignment operator for FMTTransition.
| [in] | rhs | the FMTTransition to copy. |
| bool Core::FMTTransition::operator== | ( | const FMTTransition & | rhs | ) | const |
Equality comparison operator of FMTTransition, checking if they have the same name.
| [in] | rhs | the transition to compare with. |
| FMTTransition Core::FMTTransition::preSolve | ( | const FMTMaskFilter & | filter, |
| const std::vector< FMTTheme > & | originalthemes, | ||
| std::vector< FMTTheme > & | newthemes, | ||
| bool | compressdata = false |
||
| ) | const |
Return a presolved transition based on a filter, the original themes and the new presolved themes.
| [in] | filter | the mask filter. |
| [in] | originalthemes | the original themes. |
| [in,out] | newthemes | the presolved themes. |
| [in] | compressdata | if true compresses the data. |
| void Core::FMTTransition::preSolveRef | ( | const FMTMaskFilter & | p_filter, |
| const std::vector< FMTTheme > & | p_originalThemes, | ||
| std::vector< FMTTheme > & | p_newthemes, | ||
| bool | p_compressdata = false |
||
| ) |
Presolve the transition in place based on a filter, the original themes and the new presolved themes.
| [in] | p_filter | the mask filter. |
| [in] | p_originalThemes | the original themes. |
| [in,out] | p_newthemes | the presolved themes. |
| [in] | p_compressdata | if true compresses the data. |
| void Core::FMTTransition::setName | ( | const std::string & | p_name | ) |
Set the name of the transition.
| [in] | p_name | the name to set. |
| FMTTransition Core::FMTTransition::single | ( | ) | const |
Return a transition that leads to a single development path, selecting the one with the highest area proportion, for cell based models.
|
friend |
Serialize the FMTTransition through its base FMTList<FMTFork> for multiprocessing across multiple cpus (pickle in Python).
| Archive | the archive type. |
| [in,out] | ar | the archive to serialize to or from. |
| [in] | version | the serialization version. |
|
protected |
name of the FMTtranstion same name seen in FMTAction