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

Child class of FMTDevelopment representing a future stand generated by growth or transition, not existing in the actual forest. More...

#include <FMTFuturDevelopment.h>

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

Public Member Functions

 FMTFuturDevelopment (FMTFuturDevelopment &&rhs)
 Move copy constructor.
 
FMTFuturDevelopmentoperator= (FMTFuturDevelopment &&rhs)
 Move assignment operator for FMTFuturDevelopment.
 
 FMTFuturDevelopment ()
 Default constructor for FMTFuturDevelopment.
 
 ~FMTFuturDevelopment ()=default
 Default destructor for FMTFuturDevelopment.
 
 FMTFuturDevelopment (const FMTDevelopment &dev)
 Construct a future development from a development.
 
 FMTFuturDevelopment (const FMTFuturDevelopment &rhs)
 Copy constructor for FMTFuturDevelopment.
 
bool operator== (const FMTFuturDevelopment &rhs) const
 Equality comparison operator of FMTFuturDevelopment.
 
FMTFuturDevelopmentoperator= (const FMTFuturDevelopment &rhs)
 Copy assignment operator for FMTFuturDevelopment.
 
std::unique_ptr< FMTDevelopmentclone () const override
 Return a unique pointer of FMTDevelopment cloning the future development.
 
double getArea () const override
 Return the area of the future development, which is 0.
 
- Public Member Functions inherited from Core::FMTDevelopment
 FMTDevelopment (FMTDevelopment &&rhs)
 Move copy constructor.
 
FMTDevelopmentoperator= (FMTDevelopment &&rhs)
 Move assignment operator for FMTDevelopment.
 
int getAge () const
 Get the age of the development.
 
uint8_t getShortAge () const
 Get the age of the development as a short int.
 
int getLock () const
 Get the lock of the development.
 
int getPeriod () const
 Get the period of the development.
 
const Core::FMTMaskgetMask () const
 Get a const reference to the mask of the development.
 
Core::FMTMask getMaskCopy () const
 Get a copy of the mask of the development.
 
void setAge (const int &lage)
 Set the age of the development.
 
void setLock (const int &llock)
 Set the lock of the development.
 
void setPeriod (const int &lperiod)
 Set the period of the development.
 
void setMask (const Core::FMTMask &p_mask)
 Set the mask of the development.
 
 FMTDevelopment ()
 Default constructor for FMTDevelopment.
 
virtual ~FMTDevelopment ()=default
 Default virtual destructor for FMTDevelopment.
 
 FMTDevelopment (const FMTMask &p_mask, const int &p_age, const int &p_lock)
 Construct a development from a mask, an age and a lock level.
 
 FMTDevelopment (const FMTMask &p_mask, const int &p_age, const int &p_lock, const int &p_period)
 Construct a development from a mask, an age, a lock level and a period.
 
 FMTDevelopment (const FMTDevelopment &rhs)
 Copy constructor for FMTDevelopment.
 
virtual std::unique_ptr< FMTDevelopmentclone () const
 Virtual clone function for FMTDevelopment.
 
FMTDevelopmentoperator= (const FMTDevelopment &rhs)
 Copy assignment operator for FMTDevelopment.
 
bool operator== (const FMTDevelopment &rhs) const
 Equality comparison operator of FMTDevelopment.
 
bool operator!= (const FMTDevelopment &rhs) const
 Inequality comparison operator of FMTDevelopment.
 
bool operator< (const FMTDevelopment &rhs) const
 Less than comparison operator of FMTDevelopment.
 
FMTFuturDevelopment grow () const
 Return a grown copy of this development, increasing the age and period and decreasing the lock level if it was greater than 0.
 
FMTYieldRequest getYieldRequest (const Graph::FMTGraphVertexToYield *graphyieldrequest=nullptr) const
 Get a yield request for this development, without reference to a graph unless one is provided.
 
std::string getNonOperabilityInfo (const FMTAction &p_action, const Core::FMTYields &p_yields, const Graph::FMTGraphVertexToYield *p_yieldRequest) const
 Check why this developpement is not operable for p_action and return the info.
 
bool operable (const FMTAction &action, const Core::FMTYields &ylds, const Graph::FMTGraphVertexToYield *graphyieldrequest=nullptr) const
 Check if this development is operable to an action based on multiple yields.
 
bool anyOperable (const std::vector< const FMTAction * > &actions, const Core::FMTYields &ylds, const Graph::FMTGraphVertexToYield *graphyieldrequest=nullptr) const
 Check if this development is operable to any of the actions based on multiple yields.
 
virtual operator std::string () const
 Return the string representation of the development as in the area section.
 
virtual double getArea () const
 Return the area of the development.
 
FMTDevelopment clearLock () const
 Return a copy of this development with the lock level set to 0.
 
std::vector< FMTDevelopmentPathoperate (const FMTAction &action, const FMTTransition &Transition, const Core::FMTYields &ylds, const std::vector< FMTTheme > &themes) const
 Return the development paths resulting from operating this development with an action and a transition based on yields and sorted themes.
 
double getInventoryCoef (const Core::FMTYields &ylds, const std::string &target_yield, const Graph::FMTGraphVertexToYield *graphyieldrequest=nullptr) const
 Return the inventory coefficient of the development for a given yield based on the yields.
 
double getHarvestCoef (const std::vector< FMTDevelopmentPath > &topaths, const FMTAction &action, const Core::FMTYields &ylds, const std::string &target_yield, const Graph::FMTGraphVertexToYield *graphyieldrequest=nullptr) const
 Return the harvest coefficient of the development for a given yield following multiple development paths for an action based on yields.
 
bool is (const FMTSpec &specification, const Core::FMTYields &ylds, const Graph::FMTGraphVertexToYield *graphyieldrequest=nullptr) const
 Check if this development respects a specification based on multiple yields.
 
bool worthTestingOperability (const FMTAction &action) const
 Return true if it is worth testing operability for the action, used for optimization.
 
std::vector< int > anyWorthTestingOperability (const std::vector< const FMTAction * > &actions, const FMTAction &firstaction) const
 Return the pointer distances from the first action of the actions worth testing for operability.
 
std::vector< bool > isAnyWorthTestingOperability (const std::vector< const FMTAction * > &actions, const std::vector< FMTAction > &allactions) const noexcept
 Return a vector of booleans, true if the corresponding action is worth testing for operability.
 
size_t hash () const
 Return the hash of the development combining its mask, age, lock and period.
 
- Public Member Functions inherited from Core::FMTObject
 FMTObject ()
 Default constructor for FMTObject.
 
virtual ~FMTObject ()
 Default virtual destructor for FMTObject.
 
 FMTObject (const std::unique_ptr< Exception::FMTExceptionHandler > exhandler)
 Construct a FMTObject passing in the exception handler of another FMTObject.
 
 FMTObject (const FMTObject &rhs)
 Copy constructor for FMTObject.
 
FMTObjectoperator= (const FMTObject &rhs)
 Copy assignment operator for FMTObject.
 
virtual void passInLogger (const std::unique_ptr< Logging::FMTLogger > &logger)
 Pass in the logger of another FMTObject.
 
void passInExceptionHandler (const std::unique_ptr< Exception::FMTExceptionHandler > &exhandler)
 Pass in the exception handler of another FMTObject.
 
void redirectLogToFile (const std::string &location)
 Redirect the log to a specific file, appending to it.
 
virtual void setDefaultLogger ()
 Create and set a default logger to the FMTObject.
 
virtual void setQuietLogger ()
 Create and set a quiet logger to the FMTObject.
 
virtual void setTaskLogger ()
 Create and set a task logger to the FMTObject.
 
virtual void setDebugLogger ()
 Create and set a debug logger to the FMTObject.
 
void setDefaultExceptionHandler ()
 Create and set a default exception handler to the FMTObject.
 
void setQuietExceptionHandler ()
 Create and set a quiet exception handler to the FMTObject.
 
void setDebugExceptionHandler ()
 Create and set a debug exception handler to the FMTObject.
 
void setFreeExceptionHandler ()
 Create and set a free exception handler to the FMTObject.
 
void disableNestedExceptions ()
 Disable the nested exception throw of the exception handler.
 
void enableNestedExceptions ()
 Enable the nested exception throw of the exception handler.
 
void setErrorsToWarnings (const std::vector< Exception::FMTexc > &errors)
 Set a list of errors to be cast to warnings on the exception handler.
 
void setMaxWarningsBeforeSilenced (const size_t &maxwarningcount)
 Set the number of warnings raised before being silenced.
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 Serialize the FMTFuturDevelopment through its base FMTDevelopment for multiprocessing across multiple cpus (pickle in Python).
 

Additional Inherited Members

- Static Public Member Functions inherited from Core::FMTObject
static Logging::FMTLoggergetLogger ()
 get a pointer to the actual logger.
 
static Exception::FMTExceptionHandlergetExceptionHandler ()
 get a pointer to the actual exception handler.
 
static std::string getRuntimeLocation ()
 Return the location of the FMT shared library.
 
static unsigned long long getAvailableMemory ()
 Return the available memory in bytes.
 
static void setTerminateStack ()
 will write the stack in the log when terminate called and raise a function failed.
 
static void setAbortStack ()
 will write the stack in the log when abort called with SIGABRT and raise a function failed.
 
- Protected Member Functions inherited from Core::FMTObject
template<class Archive >
void forceSave (Archive &ar, const unsigned int version) const
 Force the serialization to save useful information, which the default FMTObject serialization does not.
 
template<class Archive >
void forceLoad (Archive &ar, const unsigned int version)
 Force the serialization to load useful information, which the default FMTObject serialization does not.
 
void checkSignals () const
 Check if the user has sent a ctrl-c signal using boost::python to FMT.
 
void setCplHandler ()
 Pass the FMT exception handler to the GDAL exception handler (GDAL only).
 
- Static Protected Member Functions inherited from Core::FMTObject
static std::chrono::time_point< std::chrono::high_resolution_clock > getClock ()
 Return a clock of the current time.
 
template<class chrono >
static double getDuration (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 Return the time elapsed since a start clock as a double.
 
static std::string getDurationInSeconds (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 Return the time elapsed since a start clock in seconds as a string.
 
static void _logStack ()
 Log the stack trace...
 
static void _terminate ()
 Raise an error with the boost stacktrace.
 
static void _abort (int p_signal)
 Raise an error with the boost stacktrace on abort.
 
- Static Protected Attributes inherited from Core::FMTObject
static std::unique_ptr< Exception::FMTExceptionHandler_exhandler
 A shared pointer to the exception handler.
 
static std::unique_ptr< Logging::FMTLogger_logger
 A shared pointer to the logger.
 

Detailed Description

Child class of FMTDevelopment representing a future stand generated by growth or transition, not existing in the actual forest.

Constructor & Destructor Documentation

◆ FMTFuturDevelopment() [1/4]

Core::FMTFuturDevelopment::FMTFuturDevelopment ( FMTFuturDevelopment &&  rhs)

Move copy constructor.

Parameters
[in]rhsdevelopment to swap

◆ FMTFuturDevelopment() [2/4]

Core::FMTFuturDevelopment::FMTFuturDevelopment ( )

Default constructor for FMTFuturDevelopment.

◆ ~FMTFuturDevelopment()

Core::FMTFuturDevelopment::~FMTFuturDevelopment ( )
default

Default destructor for FMTFuturDevelopment.

◆ FMTFuturDevelopment() [3/4]

Core::FMTFuturDevelopment::FMTFuturDevelopment ( const FMTDevelopment dev)

Construct a future development from a development.

Parameters
[in]devthe development.

◆ FMTFuturDevelopment() [4/4]

Core::FMTFuturDevelopment::FMTFuturDevelopment ( const FMTFuturDevelopment rhs)

Copy constructor for FMTFuturDevelopment.

Parameters
[in]rhsthe FMTFuturDevelopment to copy.

Member Function Documentation

◆ clone()

std::unique_ptr< FMTDevelopment > Core::FMTFuturDevelopment::clone ( ) const
overridevirtual

Return a unique pointer of FMTDevelopment cloning the future development.

Returns
a unique pointer to the cloned development.

Reimplemented from Core::FMTDevelopment.

◆ getArea()

double Core::FMTFuturDevelopment::getArea ( ) const
overridevirtual

Return the area of the future development, which is 0.

Returns
the area of the future development (0).

Reimplemented from Core::FMTDevelopment.

◆ operator=() [1/2]

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

Copy assignment operator for FMTFuturDevelopment.

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

◆ operator=() [2/2]

FMTFuturDevelopment & Core::FMTFuturDevelopment::operator= ( FMTFuturDevelopment &&  rhs)

Move assignment operator for FMTFuturDevelopment.

Parameters
[in]rhsthe development to move from.
Returns
a reference to this FMTFuturDevelopment.

◆ operator==()

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

Equality comparison operator of FMTFuturDevelopment.

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialize the FMTFuturDevelopment through its base FMTDevelopment for multiprocessing across multiple cpus (pickle in Python).

Template Parameters
Archivethe archive type.
Parameters
[in,out]arthe archive to serialize to or from.
[in]versionthe serialization version.

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