FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
Spatial::FMTevent Class Reference

#include <FMTevent.hpp>

Collaboration diagram for Spatial::FMTevent:
[legend]

Public Member Functions

std::set< FMTcoordinate >::const_iterator midposition () const
 
virtual ~FMTevent ()=default
 
 FMTevent ()
 
 FMTevent (const FMTcoordinate &location, const int &laction_id, const int &lperiod)
 
 FMTevent (const FMTevent &rhs)
 
FMTeventoperator= (const FMTevent &rhs)
 
bool empty () const
 
size_t size () const
 
size_t hash () const
 
FMTeventrelation getrelation (const FMTevent &rhs) const
 
virtual bool operator== (const FMTevent &rhs) const
 
bool operator!= (const FMTevent &rhs) const
 
virtual bool operator< (const FMTevent &rhs) const
 
size_t perimeter () const
 
size_t height () const
 
size_t width () const
 
FMTcoordinate averagecentroid () const
 
std::string getstats () const
 
virtual void erase (const FMTcoordinate &newlocation)
 
virtual void merge (const FMTevent &event)
 
virtual void insert (const FMTcoordinate &newlocation)
 
void setactionid (const int &laction_id)
 
void setperiod (const int &lperiod)
 
const int & getactionid () const
 
const int & getperiod () const
 
virtual std::vector< std::set< FMTcoordinate >::const_iterator > ignit (const size_t &eventmaximalsize, const std::set< FMTcoordinate >::const_iterator &ignit, const int &laction_id, const int &lperiod)
 
virtual bool spread (const size_t &eventminimalsize, const size_t &eventmaximalsize, const size_t &neighboringsize, const std::set< FMTcoordinate > &territory, std::vector< std::set< FMTcoordinate >::const_iterator > active)
 
double distance (const FMTevent &rhs) const
 
template<typename T >
bool within (const T &dist, const FMTevent &rhs) const
 
template<typename T >
bool within (const T &dist, const FMTcoordinate &location) const
 
bool contain (const FMTcoordinate &coord) const
 
bool potentialysplitevent (const FMTcoordinate &coord) const
 
bool splitevent (const unsigned int &ldistance, std::vector< FMTevent > &splittedevents) const
 
std::set< FMTcoordinategetterritory (const size_t &distance) const
 
std::vector< std::set< FMTcoordinate >::const_iterator > getborders () const
 
std::vector< FMTcoordinategetenveloppe () const
 
void getclosescoordinates (const FMTevent &rhs, std::set< FMTcoordinate >::const_iterator &thiscoordinate, std::set< FMTcoordinate >::const_iterator &rhscoordinate) const
 

Static Public Member Functions

static std::string getstatsheader ()
 

Public Attributes

std::set< FMTcoordinateelements
 

Protected Attributes

int action_id
 
int period
 

Friends

class boost::serialization::access
 

Detailed Description

This is the base class use to create FMTsaevent or FMTsesevent. It is a set of FMTcoordinate (elements) corresponding to the FMTcoordinates presents in the event.

Constructor & Destructor Documentation

◆ ~FMTevent()

virtual Spatial::FMTevent::~FMTevent ( )
virtualdefault

Destructor

◆ FMTevent() [1/3]

Spatial::FMTevent::FMTevent ( )

Constructor

◆ FMTevent() [2/3]

Spatial::FMTevent::FMTevent ( const FMTcoordinate location,
const int &  laction_id,
const int &  lperiod 
)

Constructor with coordinate, action_id and period

◆ FMTevent() [3/3]

Spatial::FMTevent::FMTevent ( const FMTevent rhs)

Copy constructor

Member Function Documentation

◆ averagecentroid()

FMTcoordinate Spatial::FMTevent::averagecentroid ( ) const

Return centroid based on the envelope of the event

◆ contain()

bool Spatial::FMTevent::contain ( const FMTcoordinate coord) const

Return true if coordinate is in elements

◆ distance()

double Spatial::FMTevent::distance ( const FMTevent rhs) const

Return the distance between this event and the event pass as argument

◆ empty()

bool Spatial::FMTevent::empty ( ) const
inline

Test whether event is empty

◆ erase()

virtual void Spatial::FMTevent::erase ( const FMTcoordinate newlocation)
virtual

Erase coordinate from event

◆ getactionid()

const int & Spatial::FMTevent::getactionid ( ) const
inline

Getter of the action id

◆ getborders()

std::vector< std::set< FMTcoordinate >::const_iterator > Spatial::FMTevent::getborders ( ) const

Returns coordinate of the border of the even

◆ getclosescoordinates()

void Spatial::FMTevent::getclosescoordinates ( const FMTevent rhs,
std::set< FMTcoordinate >::const_iterator &  thiscoordinate,
std::set< FMTcoordinate >::const_iterator &  rhscoordinate 
) const

Return the closes coordinate between two FMTevent

◆ getenveloppe()

std::vector< FMTcoordinate > Spatial::FMTevent::getenveloppe ( ) const
    Coordinates that create the envelope of the event

0//-//1// -//-//-// 2//-//3// Returns coordinate of the enveloppe

◆ getperiod()

const int & Spatial::FMTevent::getperiod ( ) const
inline

Getter of the period

◆ getrelation()

FMTeventrelation Spatial::FMTevent::getrelation ( const FMTevent rhs) const

◆ getstats()

std::string Spatial::FMTevent::getstats ( ) const

Return string containing size, perimeter, height and width

◆ getstatsheader()

static std::string Spatial::FMTevent::getstatsheader ( )
static

Return the header of the patch stats (size, perimeter, height and width)

◆ getterritory()

std::set< FMTcoordinate > Spatial::FMTevent::getterritory ( const size_t &  distance) const

Returns the adjacent territory of the event base on a distance.

◆ hash()

size_t Spatial::FMTevent::hash ( ) const

◆ height()

size_t Spatial::FMTevent::height ( ) const

Return height of the event

◆ ignit()

virtual std::vector< std::set< FMTcoordinate >::const_iterator > Spatial::FMTevent::ignit ( const size_t &  eventmaximalsize,
const std::set< FMTcoordinate >::const_iterator &  ignit,
const int &  laction_id,
const int &  lperiod 
)
virtual

◆ insert()

virtual void Spatial::FMTevent::insert ( const FMTcoordinate newlocation)
virtual

Insert coordinate in the event

◆ merge()

virtual void Spatial::FMTevent::merge ( const FMTevent event)
virtual

Merge two events

◆ midposition()

std::set< FMTcoordinate >::const_iterator Spatial::FMTevent::midposition ( ) const
inline

Get mid point of elements.

◆ operator!=()

bool Spatial::FMTevent::operator!= ( const FMTevent rhs) const

Comparison operator different than

◆ operator<()

virtual bool Spatial::FMTevent::operator< ( const FMTevent rhs) const
virtual

Comparison operator less than

◆ operator=()

FMTevent & Spatial::FMTevent::operator= ( const FMTevent rhs)

Copy assignment operator

◆ operator==()

virtual bool Spatial::FMTevent::operator== ( const FMTevent rhs) const
virtual

Comparison operator equal to

◆ perimeter()

size_t Spatial::FMTevent::perimeter ( ) const

The perimeter of the event, including any internal holes in the event.

◆ potentialysplitevent()

bool Spatial::FMTevent::potentialysplitevent ( const FMTcoordinate coord) const

Fastest way to evaluate if an event will be split after erasing a coordinate. Only when neighbors the 4 around the pixel

◆ setactionid()

void Spatial::FMTevent::setactionid ( const int &  laction_id)
inline

Setter for action id

◆ setperiod()

void Spatial::FMTevent::setperiod ( const int &  lperiod)
inline

Setter for period

◆ size()

size_t Spatial::FMTevent::size ( ) const
inline

Return event size

◆ splitevent()

bool Spatial::FMTevent::splitevent ( const unsigned int &  ldistance,
std::vector< FMTevent > &  splittedevents 
) const

Check if events are split and fill vector of split events Remove all elements from the current event and put it in the events in splittedevents

◆ spread()

virtual bool Spatial::FMTevent::spread ( const size_t &  eventminimalsize,
const size_t &  eventmaximalsize,
const size_t &  neighboringsize,
const std::set< FMTcoordinate > &  territory,
std::vector< std::set< FMTcoordinate >::const_iterator >  active 
)
virtual

◆ width()

size_t Spatial::FMTevent::width ( ) const

Return width of the event

◆ within() [1/2]

template<typename T >
bool Spatial::FMTevent::within ( const T &  dist,
const FMTcoordinate location 
) const

Return true if coordinate is within specified distance of the coordinates

◆ within() [2/2]

template<typename T >
bool Spatial::FMTevent::within ( const T &  dist,
const FMTevent rhs 
) const

Return true if the event is within specified distance of the envelope

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ action_id

int Spatial::FMTevent::action_id
protected

Coordinate where the event started Used in spread, the active coordinate are the next to spread. Action id from the FMTmodel.

◆ elements

std::set<FMTcoordinate> Spatial::FMTevent::elements

Coordinates presents in the event

◆ period

int Spatial::FMTevent::period
protected

Period at which the event take place


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