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

#include <FMTlinegraph.hpp>

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

Public Member Functions

 FMTlinegraph ()
 
 ~FMTlinegraph ()=default
 
 FMTlinegraph (const FMTgraphbuild lbuildtype)
 
 FMTlinegraph (const FMTlinegraph &rhs)
 
 FMTlinegraph (const FMTgraph< FMTbasevertexproperties, FMTbaseedgeproperties > &rhs)
 
FMTlinegraphoperator= (const FMTlinegraph &rhs)
 
FMTlinegraphoperator= (const FMTgraph< FMTbasevertexproperties, FMTbaseedgeproperties > &rhs)
 
void setaction (FMTvertex_descriptor active, const int &actionID, const std::vector< Core::FMTdevelopmentpath > &paths)
 
size_t operate (const Core::FMTaction &action, const int &action_id, const Core::FMTtransition &transition, const Core::FMTyields &ylds, const std::vector< Core::FMTtheme > &themes)
 
void grow ()
 
FMTvertex_descriptor getactivevertex () const
 
int getlastactionid (const int &period) const
 
std::vector< int > getperiodactionids (const int &period) const
 
std::vector< FMTpredictorgetperiodpredictors (const int &period, const Models::FMTmodel &model, const std::vector< std::string > &yieldnames, bool periodonevalues=false, bool withGCBMid=true) const
 
int getinedgeactionid (const FMTvertex_descriptor &vdesc) const
 
const Core::FMTdevelopmentgetperiodstartdev (const int &period) const
 
const Core::FMTdevelopmentgetperiodstopdev (const int &period) const
 
int randomoperate (const std::vector< int > &operables, const Models::FMTmodel &model, FMTvertex_descriptor &front_vertex, std::default_random_engine &generator, const Core::FMTdevelopment &active_development, bool dontchoosegrow=false)
 
std::vector< int > randombuildperiod (const Models::FMTmodel &model, std::default_random_engine &generator, boost::unordered_map< Core::FMTdevelopment, std::vector< int > > &operability, bool dontchoosegrow=false)
 
FMTgraphstats clearfromperiod (const int &period, bool updatedevelopments=false)
 
FMTlinegraph partialcopy (const int &period) const
 
std::vector< std::vector< bool > > getactions (const Models::FMTmodel &model, const int &fromperiod, std::map< Core::FMTdevelopment, std::vector< bool > > &operability) const
 
const Core::FMTdevelopmentgetbasedevelopment () const
 
size_t getbasehash (const Core::FMTmask &dynamicmask) const
 
std::string getbasestr (const Core::FMTmask &dynamicmask) const
 
Core::FMTmask getbasemask (const Core::FMTmask &dynamicmask) const
 
size_t getedgeshash (const int &maximalperiod, bool &gotthewhole) const
 
std::string getedgesstr (const int &maximalperiod, bool &gotthewhole) const
 
void filledgesmask (Core::FMTmask &mask, const int &maximalperiod) const
 
bool stringforconstraint (std::string &value, const int &stop, const Core::FMTmask &dynamicmask) const
 
bool hashforconstraint (size_t &hashvalue, const int &stop, const Core::FMTmask &dynamicmask) const
 
bool isonlygrow (int period=0) const
 
bool ismovable (const std::vector< const Core::FMTaction * > &actions, const Core::FMTyields &yields, const int &period, boost::unordered_map< Core::FMTdevelopment, bool > *operability=nullptr) const
 
bool operator== (const FMTlinegraph &rhs) const
 
void clearnodecache ()
 
std::vector< int > anyusageof (Core::FMToutputnode output_node, const Models::FMTmodel &model, const int &startingperiod) const
 
- Public Member Functions inherited from Graph::FMTgraph< FMTbasevertexproperties, FMTbaseedgeproperties >
 FMTgraph ()
 
 FMTgraph (const FMTgraphbuild lbuildtype)
 
 FMTgraph (const FMTgraph &rhs)
 
virtual ~FMTgraph ()=default
 
void swap (FMTgraph &rhs)
 
FMTgraphoperator= (const FMTgraph &rhs)
 
bool operator== (const FMTgraph &rhs) const
 
bool operator!= (const FMTgraph &rhs) const
 
void clearcache ()
 
void cleardevelopments ()
 
FMTgraphbuild getbuildtype () const
 
void setbuildtype (const FMTgraphbuild &build)
 
boost::unordered_set< Core::FMTlookup< FMTvertex_descriptor, Core::FMTdevelopment > > getdevsset (const int &period) const
 
bool containsdevelopment (const Core::FMTdevelopment &development, const boost::unordered_set< Core::FMTlookup< FMTvertex_descriptor, Core::FMTdevelopment > > &alldevs) const
 
std::queue< FMTvertex_descriptorinitialize (const std::vector< Core::FMTactualdevelopment > &actdevelopments)
 
FMTgraphstats build (const Models::FMTmodel &model, std::queue< FMTvertex_descriptor > actives, int compressageoperability=1)
 
bool isnotransfer (const FMTvertex_descriptor &descriptor, size_t outcount=0) const
 
double getinproportion (const FMTvertex_descriptor &vertex_descriptor) const
 
double getinproportion (const FMTvertex_descriptor &vertex_descriptor) const
 
FMTgraphstats naturalgrowth (std::queue< FMTvertex_descriptor > actives, FMTgraphstats statsdiff, bool typeIImatrix=false, bool splitgrowth=false)
 
std::vector< const Core::FMTdevelopment * > nochoice (const Core::FMTmask &basemask, const int &death_id) const
 
void getvariablenames (const std::vector< Core::FMTaction > &actions, std::vector< std::string > &colnames) const
 
void gettransferrownames (std::vector< std::string > &rownames) const
 
std::vector< Core::FMTactualdevelopmentgetperiodstopdev (const int location, const double *actual_solution) const
 
std::map< std::string, double > getoutput (const Models::FMTmodel &model, const Core::FMToutput &output, int period, const double *solution, Core::FMToutputlevel level=Core::FMToutputlevel::standard) const
 
FMTvertex_descriptor getdevelopment (const Core::FMTdevelopment &developement, const boost::unordered_set< Core::FMTlookup< FMTvertex_descriptor, Core::FMTdevelopment > > &alldevs) const
 
const Core::FMTdevelopmentgetdevelopment (const FMTvertex_descriptor &descriptor) const
 
FMTvertex_descriptor adddevelopment (const Core::FMTfuturdevelopment &futurdevelopement, boost::unordered_set< Core::FMTlookup< FMTvertex_descriptor, Core::FMTdevelopment > > &alldevs, bool forcenewone=false)
 
FMTvertex_descriptor adddevelopment (const Core::FMTfuturdevelopment &futurdevelopement)
 
size_t hash (size_t seed=0) const
 
void addaction (const int &actionID, FMTgraphstats &statsdiff, std::queue< FMTvertex_descriptor > &actives, const FMTvertex_descriptor &out_vertex, const std::vector< Core::FMTdevelopmentpath > &paths, boost::unordered_set< Core::FMTlookup< FMTvertex_descriptor, Core::FMTdevelopment > > &devsets, bool inserie=false)
 
void addaction (const int &actionID, FMTgraphstats &statsdiff, std::queue< FMTvertex_descriptor > &actives, const FMTvertex_descriptor &out_vertex, const std::vector< Core::FMTdevelopmentpath > &paths)
 
double outarea (const FMTvertex_descriptor &out_vertex, const int &actionID, const double *&solution) const
 
double outarea (const FMTvertex_descriptor &out_vertex, const int &actionID, const double *&solution) const
 
FMTvertex_descriptor getgrowthsource (const FMTvertex_descriptor &out_vertex) const
 
std::vector< FMTvertex_descriptorgetactionsources (const FMTvertex_descriptor &out_vertex, const int &actionid) const
 
double inarea (const FMTvertex_descriptor &out_vertex, const double *&solution, int actionid=-1, bool growth=false) const
 
double inarea (const FMTvertex_descriptor &out_vertex, const double *&solution, int actionid, bool growth) const
 
bool periodstart (const FMTvertex_descriptor &out_vertex) const
 
bool onlypertiodstart (const FMTvertex_descriptor &out_vertex) const
 
int getmaximalock (const int &period)
 
bool periodstop (const FMTvertex_descriptor &out_vertex) const
 
std::vector< Core::FMTdevelopmentpathgetpaths (const FMTvertex_descriptor &out_vertex, const int &actionID) const
 
std::vector< Core::FMTdevelopmentpathgetpaths (const FMTvertex_descriptor &out_vertex, const int &actionID) const
 
bool isvalidouputnode (const Models::FMTmodel &model, const Core::FMToutputnode &node, std::vector< const Core::FMTaction * > &action_IDS, int period) const
 
bool isvalidgraphnode (const Models::FMTmodel &model, const FMTvertex_descriptor &vertex_descriptor, const Core::FMToutputnode &node, const std::vector< const Core::FMTaction * > &selected) const
 
std::map< int, double > locatenode (const Models::FMTmodel &model, Core::FMToutputnode output_node, int period) const
 
std::map< std::string, std::map< int, double > > locatenodebytheme (const Models::FMTmodel &model, Core::FMToutputnode output_node, int period) const
 
std::vector< FMTvertex_descriptorgetnode (const Models::FMTmodel &model, Core::FMToutputnode &output_node, int period) const
 
std::map< int, double > getvariables (const Models::FMTmodel &model, const Core::FMToutputnode &output_node, const std::vector< FMTvertex_descriptor > &verticies) const
 
std::map< int, double > getvariables (const Models::FMTmodel &model, const Core::FMToutputnode &output_node, const std::vector< FMTvertex_descriptor > &verticies) const
 
bool isanyoperables (const FMTvertex_descriptor &descriptor, const std::vector< bool > &actionsop) const noexcept
 
bool anyoperables (const FMTvertex_descriptor &descriptor, const std::vector< int > &action_ids) const
 
std::vector< int > getinvariables (const FMTvertex_descriptor &out_vertex) const
 
std::vector< double > getinproportions (const FMTvertex_descriptor &out_vertex) const
 
std::map< int, int > getinidsvariables (const FMTvertex_descriptor &out_vertex) const
 
std::map< int, int > getoutvariables (const FMTvertex_descriptor &out_vertex) const
 
std::map< int, int > getoutvariables (const FMTvertex_descriptor &out_vertex) const
 
std::vector< int > getoutactions (const FMTvertex_descriptor &out_vertex) const
 
std::vector< const Core::FMTaction * > selectedactions (const Models::FMTmodel &model, const std::vector< int > &action_IDS) const
 
bool constraintlenght (const Core::FMTconstraint &constraint, int &start, int &stop) const
 
FMTgraphstats getstats () const
 
FMTgraphstatsgetstatsptr ()
 
void setstats (const FMTgraphstats &newstats)
 
FMTgraphstats buildschedule (const Models::FMTmodel &model, std::queue< FMTvertex_descriptor > actives, const Core::FMTschedule &schedule)
 
FMTgraphstats eraseperiod (std::vector< int > &deletedconstraints, std::vector< int > &deletedvariables, bool keepbounded=false)
 
FMTgraphstats eraseperiod (std::vector< int > &deletedconstraints, std::vector< int > &deletedvariables, bool keepbounded)
 
bool empty () const
 
std::queue< FMTvertex_descriptorgetactiveverticies () const
 
const FMTvertex_pairgetperiodverticies (int period) const
 
size_t size () const
 
void setconstraintID (const FMTvertex_descriptor &vertex, const int &id)
 
void setconstraintID (const FMTvertex_descriptor &vertex, const int &id)
 
bool gettransferrow (const FMTvertex_descriptor &vertex_descriptor, std::vector< int > &row_starts, std::vector< int > &cols, std::vector< double > &cols_value) const
 
bool gettransferrow (const FMTvertex_descriptor &vertex_descriptor, std::vector< int > &row_starts, std::vector< int > &cols, std::vector< double > &cols_value) const
 
void getinitialbounds (std::vector< double > &lower_bounds, std::vector< double > &upper_bounds) const
 
size_t nedges () const
 
std::vector< FMTvertex_descriptorgetnodebystaticmask (const Models::FMTmodel &model, const Core::FMToutputnode &node, int period) const
 
std::map< std::string, double > getsource (const Models::FMTmodel &model, const Core::FMToutputnode &node, int period, const Core::FMTtheme &theme, const double *solution, Core::FMToutputlevel level=Core::FMToutputlevel::standard) const
 
Graph::FMTgraphvertextoyield getvertextoyieldinfo (const Models::FMTmodel &model, const FMTvertex_descriptor &descriptor) const
 
const FMTvertex_descriptorgetvertexfromvertexinfo (const Graph::FMTgraphvertextoyield *info) const
 
std::map< std::string, double > getvalues (const Models::FMTmodel &model, const std::vector< FMTvertex_descriptor > &verticies, const Core::FMToutputnode &node, const Core::FMTtheme &theme, const double *solution, Core::FMToutputlevel level) const
 
int getperiod () const
 
void rebasecache ()
 
void generatedevelopments ()
 
bool sameedgesas (const FMTgraph &rhs) const
 
void updatematrixindex (const std::vector< int > &removedvariables, const std::vector< int > &removedconstraints)
 
void updatematrixindex (const std::vector< int > &removedvariables, const std::vector< int > &removedconstraints)
 
int getfirstactiveperiod () const
 
FMTinedge_iterator getlastdisturbance (FMTinedge_iterator activeedge, int &periodtolastdisturbance) const
 
void filluplastactions (const int &targetperiod, const FMTvertex_descriptor &targetdescriptor, std::vector< const FMTbaseedgeproperties * > &lastactions, std::vector< int > &distances, const size_t &depth) const
 
size_t getamountofpaths (const Core::FMTdevelopment &dev, const int &actionid, const Models::FMTmodel &model, const boost::unordered_set< Core::FMTlookup< FMTvertex_descriptor, Core::FMTdevelopment > > &actualperioddevs) const
 
std::vector< Core::FMTaction >::const_iterator getactionoffirstserie (const FMTvertex_descriptor &targetdescriptor, std::vector< Core::FMTaction >::const_iterator theaction, const size_t &seriemaxsize, const std::vector< Core::FMTaction > &actions) const
 
bool keepforserie (const FMTvertex_descriptor &targetdescriptor, std::vector< Core::FMTaction >::const_iterator theaction, const size_t &seriemaxsize, const std::vector< Core::FMTaction > &actions, bool &onserie) const
 
std::vector< std::string > getactionserie (FMTvertex_descriptor targetdescriptor, const size_t &maxactions, const std::vector< Core::FMTaction > &actions) const
 
std::set< Core::FMTSeriegetallseries (FMTvertex_descriptor targetdescriptor, const std::string &seriestarter, const std::vector< Core::FMTaction > &actions, const std::unordered_set< int > &actionselected, const Core::FMTmask &mask) const
 
size_t timesincelastaction (const FMTvertex_descriptor &targetdescriptor) const
 
std::vector< FMTpredictorgetpredictors (const FMTvertex_descriptor &targetdescriptor, const Models::FMTmodel &model, const std::vector< std::string > &yieldnames, const size_t &depth, bool periodonevalues=false, bool withGCBMid=true) const
 
int getfirstperiod () const
 
void postsolve (const Core::FMTmaskfilter &filter, const std::vector< Core::FMTtheme > &originalbasethemes, const std::vector< int > &actionmapconnection)
 
Core::FMTschedule getschedule (const std::vector< Core::FMTaction > &actions, const double *actual_solution, const int &lperiod, bool withlock=false) const
 
std::set< Core::FMTSeriegetrorations (const Models::FMTmodel &model, const Core::FMTmask &mask, const std::string &aggregate) const
 
Core::FMTschedule getoutvariablesproportions (const std::vector< Core::FMTaction > &actions, const double *actual_solution, const int &lperiod, bool withlock=false) const
 
 operator std::string () const
 
- Public Member Functions inherited from Core::FMTobject
 FMTobject ()
 
virtual ~FMTobject ()
 
 FMTobject (const std::shared_ptr< Exception::FMTexceptionhandler > exhandler)
 
 FMTobject (const FMTobject &rhs)
 
FMTobjectoperator= (const FMTobject &rhs)
 
virtual void passinlogger (const std::shared_ptr< Logging::FMTlogger > &logger)
 
void passinexceptionhandler (const std::shared_ptr< Exception::FMTexceptionhandler > &exhandler)
 
void redirectlogtofile (const std::string &location)
 
virtual void setdefaultlogger ()
 
virtual void setquietlogger ()
 
virtual void settasklogger ()
 
virtual void setdebuglogger ()
 
void setdefaultexceptionhandler ()
 
void setquietexceptionhandler ()
 
void setdebugexceptionhandler ()
 
void setfreeexceptionhandler ()
 
void disablenestedexceptions ()
 
void enablenestedexceptions ()
 
void seterrorstowarnings (const std::vector< Exception::FMTexc > &errors)
 
void setmaxwarningsbeforesilenced (const size_t &maxwarningcount)
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Public Types inherited from Graph::FMTgraph< FMTbasevertexproperties, FMTbaseedgeproperties >
typedef boost::graph_traits< FMTadjacency_list >::vertex_descriptor FMTvertex_descriptor
 
typedef boost::graph_traits< FMTadjacency_list >::edge_descriptor FMTedge_descriptor
 
typedef boost::graph_traits< FMTadjacency_list >::in_edge_iterator FMTinedge_iterator
 
typedef boost::graph_traits< FMTadjacency_list >::out_edge_iterator FMToutedge_iterator
 
typedef boost::graph_traits< FMTadjacency_list >::vertex_iterator FMTvertex_iterator
 
typedef boost::graph_traits< FMTadjacency_list >::edge_iterator FMTedge_iterator
 
typedef std::pair< FMToutedge_iterator, FMToutedge_iteratorFMToutedge_pair
 
typedef std::pair< FMTvertex_iterator, FMTvertex_iteratorFMTvertex_pair
 
- Static Public Member Functions inherited from Core::FMTobject
static std::string getruntimelocation ()
 
static unsigned long long getavailablememory ()
 
- Protected Types inherited from Graph::FMTgraph< FMTbasevertexproperties, FMTbaseedgeproperties >
typedef boost::adjacency_list< boost::listS, boost::listS, boost::bidirectionalS, FMTbasevertexproperties, FMTbaseedgeproperties, boost::no_property, boost::listS > FMTadjacency_list
 
typedef std::vector< FMToutputnodecache< FMTvertex_descriptorFMT_COMMAFMTvertex_iterator > >::reverse_iterator reversecachenodeit
 
- Protected Member Functions inherited from Graph::FMTgraph< FMTbasevertexproperties, FMTbaseedgeproperties >
void updatevarsmap (std::map< int, double > &variables, const int &var, const double &coef) const
 
std::vector< FMTvertex_pair >::iterator getfirstblock ()
 
std::vector< FMTvertex_pair >::const_iterator getfirstconstblock () const
 
bool isdependant (const FMTvertex_descriptor &descriptor, const int &theactionid, bool &newedge) const
 
- Protected Member Functions inherited from Core::FMTobject
template<class Archive >
void forcesave (Archive &ar, const unsigned int version) const
 
template<class Archive >
void forceload (Archive &ar, const unsigned int version)
 
void checksignals () const
 
void setCPLhandler ()
 
- Static Protected Member Functions inherited from Core::FMTobject
static std::chrono::time_point< std::chrono::high_resolution_clock > getclock ()
 
template<class chrono >
static double getduration (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 
static std::string getdurationinseconds (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 
- Protected Attributes inherited from Graph::FMTgraph< FMTbasevertexproperties, FMTbaseedgeproperties >
FMTadjacency_list data
 
FMTgraphbuild buildtype
 
std::vector< FMTvertex_pairdevelopments
 
std::vector< FMToutputnodecache< FMTvertex_descriptor FMT_COMMA FMTvertex_iterator > > nodescache
 
FMTgraphstats stats
 
- Static Protected Attributes inherited from Core::FMTobject
static std::shared_ptr< Exception::FMTexceptionhandler_exhandler
 A shared pointer to the exception handler.
 
static std::shared_ptr< Logging::FMTlogger_logger
 A shared pointer to the logger.
 

Detailed Description

FMTlinegraph is a simple graph where edges - verticies -1. Each actions occuring in the graph generate only one new vertex like that 0-—0-—0-—0. This graph is used with FMTlayer to simulate the preocess of growth and havest of a single forest stand where each action produce only one new stade. This class is heavely used in the FMTsesmodel and FMTsamodel and is normaly used with spatialy explicit models.

Constructor & Destructor Documentation

◆ FMTlinegraph() [1/4]

Graph::FMTlinegraph::FMTlinegraph ( )

Default constructor of FMTlinegraph.

◆ ~FMTlinegraph()

Graph::FMTlinegraph::~FMTlinegraph ( )
default

Default desctructor of FMTlinegraph.

◆ FMTlinegraph() [2/4]

Graph::FMTlinegraph::FMTlinegraph ( const FMTgraphbuild  lbuildtype)

Constructor for the linegraph, can be scheudle build or full build.

◆ FMTlinegraph() [3/4]

Graph::FMTlinegraph::FMTlinegraph ( const FMTlinegraph rhs)

Copy constructor of the FMTlinegraph.

◆ FMTlinegraph() [4/4]

Graph::FMTlinegraph::FMTlinegraph ( const FMTgraph< FMTbasevertexproperties, FMTbaseedgeproperties > &  rhs)

Copy constructor with the parent class FMTgraph.

Member Function Documentation

◆ anyusageof()

std::vector< int > Graph::FMTlinegraph::anyusageof ( Core::FMToutputnode  output_node,
const Models::FMTmodel model,
const int &  startingperiod 
) const

Returns the period at which the vertex fall within the outputnode description.

◆ clearfromperiod()

FMTgraphstats Graph::FMTlinegraph::clearfromperiod ( const int &  period,
bool  updatedevelopments = false 
)

This function will remove every vertex and edge present in the graph starting from this (period). if updatedevelopements is true the map holding the developements location will be updated.

◆ clearnodecache()

void Graph::FMTlinegraph::clearnodecache ( )

Clear the node cache when getting outpus of the linegraph.

◆ filledgesmask()

void Graph::FMTlinegraph::filledgesmask ( Core::FMTmask mask,
const int &  maximalperiod 
) const

Fill up a unique mask based on the edges from period 0 to (maximalperiod).

◆ getactions()

std::vector< std::vector< bool > > Graph::FMTlinegraph::getactions ( const Models::FMTmodel model,
const int &  fromperiod,
std::map< Core::FMTdevelopment, std::vector< bool > > &  operability 
) const

Starting (fromperiod) the function will return the a vector of of vector of bool if true the action is operable at the specified period of the vector.

◆ getactivevertex()

FMTvertex_descriptor Graph::FMTlinegraph::getactivevertex ( ) const

Returns the last active vertex of the graph.

◆ getbasedevelopment()

const Core::FMTdevelopment & Graph::FMTlinegraph::getbasedevelopment ( ) const

Returns a reference to the first developement of the graph.

◆ getbasehash()

size_t Graph::FMTlinegraph::getbasehash ( const Core::FMTmask dynamicmask) const

Returnsa base hash of the starting developement of the linegraph based on a dynamicmask filter.

◆ getbasemask()

Core::FMTmask Graph::FMTlinegraph::getbasemask ( const Core::FMTmask dynamicmask) const

Returns a filtered mask of the starting developement mask of the linegraph based on a dynamicmask filter.

◆ getbasestr()

std::string Graph::FMTlinegraph::getbasestr ( const Core::FMTmask dynamicmask) const

Returns a base string of the starting developement of the linegraph based on a dynamicmask filter.

◆ getedgeshash()

size_t Graph::FMTlinegraph::getedgeshash ( const int &  maximalperiod,
bool &  gotthewhole 
) const

Returns a filtered mask of the starting developement mask of the linegraph based on a dynamicmask filter.

◆ getedgesstr()

std::string Graph::FMTlinegraph::getedgesstr ( const int &  maximalperiod,
bool &  gotthewhole 
) const

Returns a string representing the edges of the linegraph from 0 to period (maximalperiod)

◆ getinedgeactionid()

int Graph::FMTlinegraph::getinedgeactionid ( const FMTvertex_descriptor vdesc) const

Get the in edge action id of a vertex.

◆ getlastactionid()

int Graph::FMTlinegraph::getlastactionid ( const int &  period) const

Get the last action id of the last edge of the (period) of the graph.

◆ getperiodactionids()

std::vector< int > Graph::FMTlinegraph::getperiodactionids ( const int &  period) const

Get the action id of every action done in period in order.

◆ getperiodpredictors()

std::vector< FMTpredictor > Graph::FMTlinegraph::getperiodpredictors ( const int &  period,
const Models::FMTmodel model,
const std::vector< std::string > &  yieldnames,
bool  periodonevalues = false,
bool  withGCBMid = true 
) const

Returns a vector of predictors for a given (period), (actionsmap), (yieldnames) and yields.

◆ getperiodstartdev()

const Core::FMTdevelopment & Graph::FMTlinegraph::getperiodstartdev ( const int &  period) const

Get a reference to the first development(vertex) seen in the (period).

◆ getperiodstopdev()

const Core::FMTdevelopment & Graph::FMTlinegraph::getperiodstopdev ( const int &  period) const

Get a reference to the last development(vertex) seen in the (period).

◆ grow()

void Graph::FMTlinegraph::grow ( )

Grow the last active vertex of the linegraph generating new edge and vertex.

◆ hashforconstraint()

bool Graph::FMTlinegraph::hashforconstraint ( size_t &  hashvalue,
const int &  stop,
const Core::FMTmask dynamicmask 
) const

Fill a hash for uniqueness of the FMTlinegraph.

◆ ismovable()

bool Graph::FMTlinegraph::ismovable ( const std::vector< const Core::FMTaction * > &  actions,
const Core::FMTyields yields,
const int &  period,
boost::unordered_map< Core::FMTdevelopment, bool > *  operability = nullptr 
) const

Add actions (edges) + (verticies) to the graph based an event. Returns true if the graph can be modified at (period) and operated by different action or can be turned into natural grow.

◆ isonlygrow()

bool Graph::FMTlinegraph::isonlygrow ( int  period = 0) const

Returns true if the graph is never operated by any actions.

◆ operate()

size_t Graph::FMTlinegraph::operate ( const Core::FMTaction action,
const int &  action_id,
const Core::FMTtransition transition,
const Core::FMTyields ylds,
const std::vector< Core::FMTtheme > &  themes 
)

Operate the last active vertex and return the length of the generated developpementpath.

◆ operator=() [1/2]

FMTlinegraph & Graph::FMTlinegraph::operator= ( const FMTgraph< FMTbasevertexproperties, FMTbaseedgeproperties > &  rhs)

Copy assignment with parent FMTgraph

◆ operator=() [2/2]

FMTlinegraph & Graph::FMTlinegraph::operator= ( const FMTlinegraph rhs)

Copy assignment of FMTlinegraph

◆ operator==()

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

Comparison operator of FMTlinegraph

◆ partialcopy()

FMTlinegraph Graph::FMTlinegraph::partialcopy ( const int &  period) const

This function will copy all verticies and edges of the graph from period = 0 to (period).

◆ randombuildperiod()

std::vector< int > Graph::FMTlinegraph::randombuildperiod ( const Models::FMTmodel model,
std::default_random_engine &  generator,
boost::unordered_map< Core::FMTdevelopment, std::vector< int > > &  operability,
bool  dontchoosegrow = false 
)

Randomly operate the active vertex to completybuild the active period of the graph. Returns the action id of the new edges generated.

◆ randomoperate()

int Graph::FMTlinegraph::randomoperate ( const std::vector< int > &  operables,
const Models::FMTmodel model,
FMTvertex_descriptor front_vertex,
std::default_random_engine &  generator,
const Core::FMTdevelopment active_development,
bool  dontchoosegrow = false 
)

Randomly operate an (active _developement) (front_vertex) and returns the action id.

◆ setaction()

void Graph::FMTlinegraph::setaction ( FMTvertex_descriptor  active,
const int &  actionID,
const std::vector< Core::FMTdevelopmentpath > &  paths 
)

Generate a new period container at the end of the linegraph. Add an edge action based on paths on an active vertex.

◆ stringforconstraint()

bool Graph::FMTlinegraph::stringforconstraint ( std::string &  value,
const int &  stop,
const Core::FMTmask dynamicmask 
) const

Fill a string for uniqueness of the FMTlinegraph.

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: