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

Edge properties of a FMTGraph, extending the base edge properties with a variable id and a proportion. More...

#include <FMTEdgeProperties.h>

Inheritance diagram for Graph::FMTEdgeProperties:
[legend]
Collaboration diagram for Graph::FMTEdgeProperties:
[legend]

Public Member Functions

 ~FMTEdgeProperties ()=default
 Default destructor for FMTEdgeProperties.
 
 FMTEdgeProperties ()=default
 Default constructor for FMTEdgeProperties.
 
 FMTEdgeProperties (const FMTEdgeProperties &rhs)=default
 Copy constructor for FMTEdgeProperties.
 
FMTEdgePropertiesoperator= (const FMTEdgeProperties &rhs)=default
 Copy assignment operator for FMTEdgeProperties.
 
int getVariableID () const override
 Return the variable id of the edge.
 
void setVariableID (const int &newvariableID)
 Set the variable id of the edge.
 
double getProportion () const override
 Return the proportion of the edge.
 
 FMTEdgeProperties (const int &laction, const int &lvariableID, const double &lproportion)
 Construct a FMTEdgeProperties from an action, a variable id and a proportion.
 
bool operator== (const FMTEdgeProperties &rhs) const
 Comparison operator for FMTEdgeProperties.
 
bool operator!= (const FMTEdgeProperties &rhs) const
 Comparison operator for FMTEdgeProperties.
 
std::string variableName () const
 Return the name of the variable of the edge.
 
const int * getVariablePtr () const
 Return a pointer to the variable id of the edge.
 
- Public Member Functions inherited from Graph::FMTBaseEdgeProperties
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.
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from Graph::FMTBaseEdgeProperties
int8_t action
 

Detailed Description

Edge properties of a FMTGraph, extending the base edge properties with a variable id and a proportion.

Constructor & Destructor Documentation

◆ ~FMTEdgeProperties()

Graph::FMTEdgeProperties::~FMTEdgeProperties ( )
default

Default destructor for FMTEdgeProperties.

◆ FMTEdgeProperties() [1/3]

Graph::FMTEdgeProperties::FMTEdgeProperties ( )
default

Default constructor for FMTEdgeProperties.

◆ FMTEdgeProperties() [2/3]

Graph::FMTEdgeProperties::FMTEdgeProperties ( const FMTEdgeProperties rhs)
default

Copy constructor for FMTEdgeProperties.

Parameters
[in]rhsthe FMTEdgeProperties to copy.

◆ FMTEdgeProperties() [3/3]

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

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

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

Member Function Documentation

◆ getProportion()

double Graph::FMTEdgeProperties::getProportion ( ) const
inlineoverridevirtual

Return the proportion of the edge.

Returns
the proportion.

Reimplemented from Graph::FMTBaseEdgeProperties.

◆ getVariableID()

int Graph::FMTEdgeProperties::getVariableID ( ) const
inlineoverridevirtual

Return the variable id of the edge.

Returns
the variable id.

Reimplemented from Graph::FMTBaseEdgeProperties.

◆ getVariablePtr()

const int * Graph::FMTEdgeProperties::getVariablePtr ( ) const
inline

Return a pointer to the variable id of the edge.

Returns
a pointer to the variable id.

◆ operator!=()

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

Comparison operator for FMTEdgeProperties.

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

◆ operator=()

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

Copy assignment operator for FMTEdgeProperties.

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

◆ operator==()

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

Comparison operator for FMTEdgeProperties.

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

◆ setVariableID()

void Graph::FMTEdgeProperties::setVariableID ( const int &  newvariableID)

Set the variable id of the edge.

Parameters
[in]newvariableIDthe new variable id.

◆ variableName()

std::string Graph::FMTEdgeProperties::variableName ( ) const
inline

Return the name of the variable of the edge.

Returns
the variable name.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

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