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

Base edge properties of a FMTGraph, holding the action of the edge. More...

#include <FMTBaseEdgeProperties.h>

Inheritance diagram for Graph::FMTBaseEdgeProperties:
[legend]

Public Member Functions

virtual ~FMTBaseEdgeProperties ()=default
 Default virtual destructor for FMTBaseEdgeProperties.
 
 FMTBaseEdgeProperties ()=default
 Default constructor for FMTBaseEdgeProperties.
 
 FMTBaseEdgeProperties (const FMTBaseEdgeProperties &rhs)=default
 Copy constructor for FMTBaseEdgeProperties.
 
FMTBaseEdgePropertiesoperator= (const FMTBaseEdgeProperties &rhs)=default
 Copy assignment operator for FMTBaseEdgeProperties.
 
 FMTBaseEdgeProperties (const int &laction, const int &lvariableID, const double &lproportion)
 Construct a FMTBaseEdgeProperties from an action, a variable id and a proportion.
 
constexpr FMTBaseEdgeProperties (const int &laction)
 Construct a FMTBaseEdgeProperties from an action.
 
virtual int getVariableID () const
 Return the variable id of the edge.
 
virtual double getProportion () const
 Return the proportion of the edge.
 
int getActionID () const
 Return the action id of the edge.
 
int8_t getShortActionID () const
 Return the short (int8) action id of the edge.
 
void setActionID (const int &newid)
 Set the action id of the edge.
 
bool isAction (const std::vector< Core::FMTAction > &actions, const Core::FMTAction &rhsaction) const
 Return true if the edge action matches a given action.
 
bool operator== (const FMTBaseEdgeProperties &rhs) const
 Comparison operator for FMTBaseEdgeProperties.
 
bool operator!= (const FMTBaseEdgeProperties &rhs) const
 Comparison operator for FMTBaseEdgeProperties.
 
bool operator< (const FMTBaseEdgeProperties &rhs) const
 Less than operator for FMTBaseEdgeProperties.
 

Protected Attributes

int8_t action
 

Friends

class boost::serialization::access
 

Detailed Description

Base edge properties of a FMTGraph, holding the action of the edge.

Constructor & Destructor Documentation

◆ ~FMTBaseEdgeProperties()

virtual Graph::FMTBaseEdgeProperties::~FMTBaseEdgeProperties ( )
virtualdefault

Default virtual destructor for FMTBaseEdgeProperties.

◆ FMTBaseEdgeProperties() [1/4]

Graph::FMTBaseEdgeProperties::FMTBaseEdgeProperties ( )
default

Default constructor for FMTBaseEdgeProperties.

◆ FMTBaseEdgeProperties() [2/4]

Graph::FMTBaseEdgeProperties::FMTBaseEdgeProperties ( const FMTBaseEdgeProperties rhs)
default

Copy constructor for FMTBaseEdgeProperties.

Parameters
[in]rhsthe FMTBaseEdgeProperties to copy.

◆ FMTBaseEdgeProperties() [3/4]

Graph::FMTBaseEdgeProperties::FMTBaseEdgeProperties ( const int &  laction,
const int &  lvariableID,
const double &  lproportion 
)

Construct a FMTBaseEdgeProperties from an action, a variable id and a proportion.

Parameters
[in]lactionthe action.
[in]lvariableIDthe variable id.
[in]lproportionthe proportion.

◆ FMTBaseEdgeProperties() [4/4]

constexpr Graph::FMTBaseEdgeProperties::FMTBaseEdgeProperties ( const int &  laction)
inlineconstexpr

Construct a FMTBaseEdgeProperties from an action.

Parameters
[in]lactionthe action.

Member Function Documentation

◆ getActionID()

int Graph::FMTBaseEdgeProperties::getActionID ( ) const
inline

Return the action id of the edge.

Returns
the action id.

◆ getProportion()

virtual double Graph::FMTBaseEdgeProperties::getProportion ( ) const
inlinevirtual

Return the proportion of the edge.

Returns
the proportion.

Reimplemented in Graph::FMTEdgeProperties.

◆ getShortActionID()

int8_t Graph::FMTBaseEdgeProperties::getShortActionID ( ) const
inline

Return the short (int8) action id of the edge.

Returns
the short action id.

◆ getVariableID()

virtual int Graph::FMTBaseEdgeProperties::getVariableID ( ) const
inlinevirtual

Return the variable id of the edge.

Returns
the variable id.

Reimplemented in Graph::FMTEdgeProperties.

◆ isAction()

bool Graph::FMTBaseEdgeProperties::isAction ( const std::vector< Core::FMTAction > &  actions,
const Core::FMTAction rhsaction 
) const

Return true if the edge action matches a given action.

Parameters
[in]actionsthe model actions.
[in]rhsactionthe action to test.
Returns
true if the edge is the given action else false.

◆ operator!=()

bool Graph::FMTBaseEdgeProperties::operator!= ( const FMTBaseEdgeProperties rhs) const

Comparison operator for FMTBaseEdgeProperties.

Parameters
[in]rhsthe FMTBaseEdgeProperties to compare to.
Returns
true if both edge properties are different else false.

◆ operator<()

bool Graph::FMTBaseEdgeProperties::operator< ( const FMTBaseEdgeProperties rhs) const

Less than operator for FMTBaseEdgeProperties.

Parameters
[in]rhsthe FMTBaseEdgeProperties to compare to.
Returns
true if this edge properties is less than the other else false.

◆ operator=()

FMTBaseEdgeProperties & Graph::FMTBaseEdgeProperties::operator= ( const FMTBaseEdgeProperties rhs)
default

Copy assignment operator for FMTBaseEdgeProperties.

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

◆ operator==()

bool Graph::FMTBaseEdgeProperties::operator== ( const FMTBaseEdgeProperties rhs) const

Comparison operator for FMTBaseEdgeProperties.

Parameters
[in]rhsthe FMTBaseEdgeProperties to compare to.
Returns
true if both edge properties are equal else false.

◆ setActionID()

void Graph::FMTBaseEdgeProperties::setActionID ( const int &  newid)

Set the action id of the edge.

Parameters
[in]newidthe new action id.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ action

int8_t Graph::FMTBaseEdgeProperties::action
protected

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