![]() |
FMT 1.2.0
Forest management tools for forest planning
|
Container of FMTEvent handling event comparison and distance calculation efficiently, allowing the user to get events by period, action id and coordinates. More...
#include <FMTEventContainer.h>
Public Types | |
| typedef std::set< FMTEvent >::value_type | value_type |
| typedef std::set< FMTEvent >::iterator | iterator |
| typedef std::set< FMTEvent >::const_iterator | const_iterator |
| typedef std::set< FMTEvent >::const_reverse_iterator | const_reverse_iterator |
Public Member Functions | |
| FMTEventContainer ()=default | |
| Default constructor for FMTEventContainer. | |
| ~FMTEventContainer ()=default | |
| Default destructor for FMTEventContainer. | |
| FMTEventContainer (const FMTEventContainer &rhs)=default | |
| Copy constructor for FMTEventContainer. | |
| FMTEventContainer & | operator= (const FMTEventContainer &rhs)=default |
| Copy assignment operator for FMTEventContainer. | |
| bool | operator== (const FMTEventContainer &rhs) const |
| Comparison operator for FMTEventContainer. | |
| void | swap (FMTEventContainer &rhs) |
| Swap the events of this container with another one. | |
| const_iterator | begin () const |
| Return a const iterator to the first event. | |
| const_iterator | end () const |
| Return a const iterator past the last event. | |
| bool | empty () const |
| Test whether the container is empty. | |
| size_t | size () const |
| Return the number of events in the container. | |
| const_iterator | find (const int &period, const FMTCoordinate &coord) const |
| Return a const iterator to the first event found with a coordinate at a period. | |
| const_iterator | find (const FMTEvent &event) const |
| Return a const iterator to an event. | |
| void | insert (const FMTEvent &event) |
| Insert an event in the container. | |
| void | merge (const FMTEventContainer &levents) |
| Merge another FMTEventContainer into this one. | |
| void | erase (const FMTEvent &event) |
| Erase an event from the container. | |
| const_iterator | erase (const const_iterator event) |
| Erase an event from the container and return the next iterator. | |
| void | clear () |
| Clear the content of the container. | |
| int | lastPeriod () const |
| Return the period of the last event in the container. | |
| int | firstPeriod () const |
| Return the period of the first event in the container. | |
| void | eraseCoordinate (const FMTCoordinate &p_coord, const int &p_periodStart, const std::vector< std::vector< bool > > &p_actionstarget) |
| Erase all the coordinates corresponding to a coordinate in the events from a period. | |
| std::pair< const_iterator, const_iterator > | getBounds (const int &period) const |
| Return a pair of iterators pointing to the first and the last elements of a period. | |
| void | addAction (const FMTCoordinate &coord, const int &period, const int &actionid, const FMTBindingSpatialAction &binding, size_t p_GraphFamily) |
| Add an action at a coordinate, adding to an existing event if possible or aggregating events based on the binding. | |
| void | addActions (const FMTCoordinate &coord, const int &period, const std::vector< int > &actionids, const std::vector< FMTBindingSpatialAction > &bindings, size_t p_GraphFamily) |
| Add actions at a coordinate, adding to an existing event if possible or aggregating events based on the bindings. | |
| std::vector< const_iterator > | getEvents (const int &period, const int &action_id) const |
| Return the events at a period for an action. | |
| std::vector< const_iterator > | getEvents (const int &period, const int &action_id, const FMTCoordinate &minimalcoordinate, const FMTCoordinate &maximalcoordinate) const |
| Return the events at a period for an action between a minimal and a maximal coordinate. | |
| std::vector< std::vector< const_iterator > > | getMultipleEvents (const int &period, const std::vector< int > &action_ids, const FMTCoordinate &minimalcoordinate, const FMTCoordinate &maximalcoordinate) const |
| Return the events at a period for multiple actions between a minimal and a maximal coordinate. | |
| std::vector< const_iterator > | getEvents (const int &period, const std::vector< int > &actions_id) const |
| Return the events at a period for multiple action ids. | |
| std::vector< const_iterator > | getEvents (const int &period, const std::vector< bool > &actions_used) const |
| Return the events at a period for the used actions. | |
| std::vector< const_iterator > | getEvents (const int &period, const std::vector< bool > &actions_used, const FMTCoordinate &minimalcoordinate, const FMTCoordinate &maximalcoordinate) const |
| Return the events at a period for the used actions between a minimal and a maximal coordinate. | |
| std::vector< const_iterator > | getEvents (const int &period, const FMTCoordinate &coord) const |
| Return the events at a period for a coordinate. | |
| FMTEventContainer | getEventsToErase (const int &fromperiod, const std::vector< std::vector< bool > > &actionstarget, const FMTCoordinate &coord, const size_t &buffer, FMTEventContainer &newevents) const |
| Return the events to erase when removing a coordinate, starting from a period based on a buffer around the events, and fill the modified events. | |
| FMTEventContainer | getEventsToAdd (const FMTCoordinate &coord, const int &period, const int &actionid, const FMTBindingSpatialAction &binding, FMTEventContainer &newevents, size_t p_GraphFamily) const |
| Add an action to a coordinate and return the modified events whose infeasibility needs to be recalculated, filling the new events. | |
| FMTEventContainer | getContainer (std::vector< FMTCoordinate > coordinates, const int &minperiod, const int &maxperiod, const size_t &buffer) const |
| Return a subset of the container on the coordinates of interest. | |
| FMTEventContainer | addUpdate (const FMTEventContainer &newevents, const FMTEventContainer &eventstoremove) |
| Update the container by adding the new events and removing the events to remove, used to compute the infeasibility. | |
| std::vector< const_iterator > | getEvents (const int &period, const std::set< FMTCoordinate > &territory) const |
| Return the events at a period for multiple coordinates. | |
| double | minimalDistance (const FMTEvent &p_event, const unsigned int &p_distancel, const int &p_period, const std::vector< int > &p_actionsid) const |
| Return the minimal distance between an event and the other events for a period, or the distance plus one if the event is not within the distance. | |
| double | evaluateDistance (const FMTEvent &p_event, const double &p_lowerdistancetoevent, const double &p_upperdistancetoevent, const int &p_period, const std::vector< bool > &p_actionsused, boost::unordered_set< FMTEventRelation > &p_relations) const |
| Add up the distances of the events that are within (or not within) a distance range for a period. | |
| double | evaluateSize (const std::vector< bool > &p_actions, int p_period, size_t p_lowerBound, size_t p_upperBound, bool p_testLower) const |
| Evaluate the size infeasibility of the events for a period against a size range. | |
| double | getDispersion (const std::vector< bool > &p_actions, const FMTSpatialGraphs &p_Graphs, int p_themeId, int p_FirstPeriod, int p_LastPeriod, int p_bound) const |
| Evaluate the dispersion infeasibility of the events for a theme and a period range. | |
| double | getDispersion (int p_RuleId, const FMTSpatialGraphs &p_Graphs, int p_themeId, int p_FirstPeriod, int p_LastPeriod, int p_bound) const |
| Evaluate the dispersion infeasibility of the events for a rule, a theme and a period range. | |
| std::vector< FMTEventContainer::const_iterator > | getDispersionConflicts (const std::vector< bool > &p_actions, const FMTSpatialGraphs &p_Graphs, int p_themeId, int p_FirstPeriod, int p_LastPeriod, int p_bound) const |
| Return the events in dispersion conflict for a theme and a period range. | |
| std::vector< FMTEventContainer::const_iterator > | getDispersionConflicts (int p_RuleId, const FMTSpatialGraphs &p_Graphs, int p_themeId, int p_FirstPeriod, int p_LastPeriod, int p_bound) const |
| Return the events in dispersion conflict for a rule, a theme and a period range. | |
| std::vector< FMTEventContainer::const_iterator > | getEventsOf (int p_RuleId, int p_MinimalPeriod, int p_MaximalPeriod) const |
| Return the events of a rule for a period range. | |
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. | |
| FMTObject & | operator= (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 |
Additional Inherited Members | |
Static Public Member Functions inherited from Core::FMTObject | |
| static Logging::FMTLogger * | getLogger () |
| get a pointer to the actual logger. | |
| static Exception::FMTExceptionHandler * | getExceptionHandler () |
| 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. | |
Container of FMTEvent handling event comparison and distance calculation efficiently, allowing the user to get events by period, action id and coordinates.
One container can hold all the events of a model, sorted by period, centroid, action id and finally size; coordinates can be added and removed by period and action.
| typedef std::set<FMTEvent>::const_iterator Spatial::FMTEventContainer::const_iterator |
| typedef std::set<FMTEvent>::const_reverse_iterator Spatial::FMTEventContainer::const_reverse_iterator |
| typedef std::set<FMTEvent>::iterator Spatial::FMTEventContainer::iterator |
| typedef std::set<FMTEvent>::value_type Spatial::FMTEventContainer::value_type |
|
default |
Default constructor for FMTEventContainer.
|
default |
Default destructor for FMTEventContainer.
|
default |
Copy constructor for FMTEventContainer.
| [in] | rhs | the FMTEventContainer to copy. |
| void Spatial::FMTEventContainer::addAction | ( | const FMTCoordinate & | coord, |
| const int & | period, | ||
| const int & | actionid, | ||
| const FMTBindingSpatialAction & | binding, | ||
| size_t | p_GraphFamily | ||
| ) |
Add an action at a coordinate, adding to an existing event if possible or aggregating events based on the binding.
| [in] | coord | the coordinate. |
| [in] | period | the period. |
| [in] | actionid | the action id. |
| [in] | binding | the binding spatial action. |
| [in] | p_GraphFamily | the graph family. |
| void Spatial::FMTEventContainer::addActions | ( | const FMTCoordinate & | coord, |
| const int & | period, | ||
| const std::vector< int > & | actionids, | ||
| const std::vector< FMTBindingSpatialAction > & | bindings, | ||
| size_t | p_GraphFamily | ||
| ) |
Add actions at a coordinate, adding to an existing event if possible or aggregating events based on the bindings.
The bindings must be the size of the vector of actions in the model because the action ids are used to find the right ones.
| [in] | coord | the coordinate. |
| [in] | period | the period. |
| [in] | actionids | the action ids. |
| [in] | bindings | the binding spatial actions. |
| [in] | p_GraphFamily | the graph family. |
| FMTEventContainer Spatial::FMTEventContainer::addUpdate | ( | const FMTEventContainer & | newevents, |
| const FMTEventContainer & | eventstoremove | ||
| ) |
Update the container by adding the new events and removing the events to remove, used to compute the infeasibility.
| [in] | newevents | the new events. |
| [in] | eventstoremove | the events to remove. |
| const_iterator Spatial::FMTEventContainer::begin | ( | ) | const |
Return a const iterator to the first event.
| void Spatial::FMTEventContainer::clear | ( | ) |
Clear the content of the container.
| bool Spatial::FMTEventContainer::empty | ( | ) | const |
Test whether the container is empty.
| const_iterator Spatial::FMTEventContainer::end | ( | ) | const |
Return a const iterator past the last event.
| const_iterator Spatial::FMTEventContainer::erase | ( | const const_iterator | event | ) |
Erase an event from the container and return the next iterator.
| [in] | event | the iterator to the event to erase. |
| void Spatial::FMTEventContainer::erase | ( | const FMTEvent & | event | ) |
Erase an event from the container.
| [in] | event | the event to erase. |
| void Spatial::FMTEventContainer::eraseCoordinate | ( | const FMTCoordinate & | p_coord, |
| const int & | p_periodStart, | ||
| const std::vector< std::vector< bool > > & | p_actionstarget | ||
| ) |
Erase all the coordinates corresponding to a coordinate in the events from a period.
| [in] | p_coord | the coordinate. |
| [in] | p_periodStart | the first period. |
| [in] | p_actionstarget | the action targets. |
| double Spatial::FMTEventContainer::evaluateDistance | ( | const FMTEvent & | p_event, |
| const double & | p_lowerdistancetoevent, | ||
| const double & | p_upperdistancetoevent, | ||
| const int & | p_period, | ||
| const std::vector< bool > & | p_actionsused, | ||
| boost::unordered_set< FMTEventRelation > & | p_relations | ||
| ) | const |
Add up the distances of the events that are within (or not within) a distance range for a period.
| [in] | p_event | the event. |
| [in] | p_lowerdistancetoevent | the lower distance to the event. |
| [in] | p_upperdistancetoevent | the upper distance to the event. |
| [in] | p_period | the period. |
| [in] | p_actionsused | the used actions. |
| [in,out] | p_relations | the event relations. |
| double Spatial::FMTEventContainer::evaluateSize | ( | const std::vector< bool > & | p_actions, |
| int | p_period, | ||
| size_t | p_lowerBound, | ||
| size_t | p_upperBound, | ||
| bool | p_testLower | ||
| ) | const |
Evaluate the size infeasibility of the events for a period against a size range.
| [in] | p_actions | the actions. |
| [in] | p_period | the period. |
| [in] | p_lowerBound | the lower size bound. |
| [in] | p_upperBound | the upper size bound. |
| [in] | p_testLower | if true tests the lower bound. |
| const_iterator Spatial::FMTEventContainer::find | ( | const FMTEvent & | event | ) | const |
Return a const iterator to an event.
| [in] | event | the event. |
| const_iterator Spatial::FMTEventContainer::find | ( | const int & | period, |
| const FMTCoordinate & | coord | ||
| ) | const |
Return a const iterator to the first event found with a coordinate at a period.
| [in] | period | the period. |
| [in] | coord | the coordinate. |
| int Spatial::FMTEventContainer::firstPeriod | ( | ) | const |
Return the period of the first event in the container.
| std::pair< const_iterator, const_iterator > Spatial::FMTEventContainer::getBounds | ( | const int & | period | ) | const |
Return a pair of iterators pointing to the first and the last elements of a period.
| [in] | period | the period. |
| FMTEventContainer Spatial::FMTEventContainer::getContainer | ( | std::vector< FMTCoordinate > | coordinates, |
| const int & | minperiod, | ||
| const int & | maxperiod, | ||
| const size_t & | buffer | ||
| ) | const |
Return a subset of the container on the coordinates of interest.
| [in] | coordinates | the coordinates. |
| [in] | minperiod | the minimal period. |
| [in] | maxperiod | the maximal period. |
| [in] | buffer | the buffer. |
| double Spatial::FMTEventContainer::getDispersion | ( | const std::vector< bool > & | p_actions, |
| const FMTSpatialGraphs & | p_Graphs, | ||
| int | p_themeId, | ||
| int | p_FirstPeriod, | ||
| int | p_LastPeriod, | ||
| int | p_bound | ||
| ) | const |
Evaluate the dispersion infeasibility of the events for a theme and a period range.
| [in] | p_actions | the actions. |
| [in] | p_Graphs | the spatial graphs. |
| [in] | p_themeId | the theme id. |
| [in] | p_FirstPeriod | the first period. |
| [in] | p_LastPeriod | the last period. |
| [in] | p_bound | the bound. |
| double Spatial::FMTEventContainer::getDispersion | ( | int | p_RuleId, |
| const FMTSpatialGraphs & | p_Graphs, | ||
| int | p_themeId, | ||
| int | p_FirstPeriod, | ||
| int | p_LastPeriod, | ||
| int | p_bound | ||
| ) | const |
Evaluate the dispersion infeasibility of the events for a rule, a theme and a period range.
| [in] | p_RuleId | the rule id. |
| [in] | p_Graphs | the spatial graphs. |
| [in] | p_themeId | the theme id. |
| [in] | p_FirstPeriod | the first period. |
| [in] | p_LastPeriod | the last period. |
| [in] | p_bound | the bound. |
| std::vector< FMTEventContainer::const_iterator > Spatial::FMTEventContainer::getDispersionConflicts | ( | const std::vector< bool > & | p_actions, |
| const FMTSpatialGraphs & | p_Graphs, | ||
| int | p_themeId, | ||
| int | p_FirstPeriod, | ||
| int | p_LastPeriod, | ||
| int | p_bound | ||
| ) | const |
Return the events in dispersion conflict for a theme and a period range.
| [in] | p_actions | the actions. |
| [in] | p_Graphs | the spatial graphs. |
| [in] | p_themeId | the theme id. |
| [in] | p_FirstPeriod | the first period. |
| [in] | p_LastPeriod | the last period. |
| [in] | p_bound | the bound. |
| std::vector< FMTEventContainer::const_iterator > Spatial::FMTEventContainer::getDispersionConflicts | ( | int | p_RuleId, |
| const FMTSpatialGraphs & | p_Graphs, | ||
| int | p_themeId, | ||
| int | p_FirstPeriod, | ||
| int | p_LastPeriod, | ||
| int | p_bound | ||
| ) | const |
Return the events in dispersion conflict for a rule, a theme and a period range.
| [in] | p_RuleId | the rule id. |
| [in] | p_Graphs | the spatial graphs. |
| [in] | p_themeId | the theme id. |
| [in] | p_FirstPeriod | the first period. |
| [in] | p_LastPeriod | the last period. |
| [in] | p_bound | the bound. |
| std::vector< const_iterator > Spatial::FMTEventContainer::getEvents | ( | const int & | period, |
| const FMTCoordinate & | coord | ||
| ) | const |
Return the events at a period for a coordinate.
| [in] | period | the period. |
| [in] | coord | the coordinate. |
| std::vector< const_iterator > Spatial::FMTEventContainer::getEvents | ( | const int & | period, |
| const int & | action_id | ||
| ) | const |
Return the events at a period for an action.
| [in] | period | the period. |
| [in] | action_id | the action id. |
| std::vector< const_iterator > Spatial::FMTEventContainer::getEvents | ( | const int & | period, |
| const int & | action_id, | ||
| const FMTCoordinate & | minimalcoordinate, | ||
| const FMTCoordinate & | maximalcoordinate | ||
| ) | const |
Return the events at a period for an action between a minimal and a maximal coordinate.
| [in] | period | the period. |
| [in] | action_id | the action id. |
| [in] | minimalcoordinate | the minimal coordinate. |
| [in] | maximalcoordinate | the maximal coordinate. |
| std::vector< const_iterator > Spatial::FMTEventContainer::getEvents | ( | const int & | period, |
| const std::set< FMTCoordinate > & | territory | ||
| ) | const |
Return the events at a period for multiple coordinates.
| [in] | period | the period. |
| [in] | territory | the coordinates. |
| std::vector< const_iterator > Spatial::FMTEventContainer::getEvents | ( | const int & | period, |
| const std::vector< bool > & | actions_used | ||
| ) | const |
Return the events at a period for the used actions.
| [in] | period | the period. |
| [in] | actions_used | the used actions. |
| std::vector< const_iterator > Spatial::FMTEventContainer::getEvents | ( | const int & | period, |
| const std::vector< bool > & | actions_used, | ||
| const FMTCoordinate & | minimalcoordinate, | ||
| const FMTCoordinate & | maximalcoordinate | ||
| ) | const |
Return the events at a period for the used actions between a minimal and a maximal coordinate.
| [in] | period | the period. |
| [in] | actions_used | the used actions. |
| [in] | minimalcoordinate | the minimal coordinate. |
| [in] | maximalcoordinate | the maximal coordinate. |
| std::vector< const_iterator > Spatial::FMTEventContainer::getEvents | ( | const int & | period, |
| const std::vector< int > & | actions_id | ||
| ) | const |
Return the events at a period for multiple action ids.
| [in] | period | the period. |
| [in] | actions_id | the action ids. |
| std::vector< FMTEventContainer::const_iterator > Spatial::FMTEventContainer::getEventsOf | ( | int | p_RuleId, |
| int | p_MinimalPeriod, | ||
| int | p_MaximalPeriod | ||
| ) | const |
Return the events of a rule for a period range.
| [in] | p_RuleId | the rule id. |
| [in] | p_MinimalPeriod | the minimal period. |
| [in] | p_MaximalPeriod | the maximal period. |
| FMTEventContainer Spatial::FMTEventContainer::getEventsToAdd | ( | const FMTCoordinate & | coord, |
| const int & | period, | ||
| const int & | actionid, | ||
| const FMTBindingSpatialAction & | binding, | ||
| FMTEventContainer & | newevents, | ||
| size_t | p_GraphFamily | ||
| ) | const |
Add an action to a coordinate and return the modified events whose infeasibility needs to be recalculated, filling the new events.
| [in] | coord | the coordinate. |
| [in] | period | the period. |
| [in] | actionid | the action id. |
| [in] | binding | the binding spatial action. |
| [in,out] | newevents | the new events. |
| [in] | p_GraphFamily | the graph family. |
| FMTEventContainer Spatial::FMTEventContainer::getEventsToErase | ( | const int & | fromperiod, |
| const std::vector< std::vector< bool > > & | actionstarget, | ||
| const FMTCoordinate & | coord, | ||
| const size_t & | buffer, | ||
| FMTEventContainer & | newevents | ||
| ) | const |
Return the events to erase when removing a coordinate, starting from a period based on a buffer around the events, and fill the modified events.
| [in] | fromperiod | the first period. |
| [in] | actionstarget | the action targets. |
| [in] | coord | the coordinate. |
| [in] | buffer | the buffer. |
| [in,out] | newevents | the modified events resulting from erasing the coordinate. |
| std::vector< std::vector< const_iterator > > Spatial::FMTEventContainer::getMultipleEvents | ( | const int & | period, |
| const std::vector< int > & | action_ids, | ||
| const FMTCoordinate & | minimalcoordinate, | ||
| const FMTCoordinate & | maximalcoordinate | ||
| ) | const |
Return the events at a period for multiple actions between a minimal and a maximal coordinate.
| [in] | period | the period. |
| [in] | action_ids | the action ids. |
| [in] | minimalcoordinate | the minimal coordinate. |
| [in] | maximalcoordinate | the maximal coordinate. |
| void Spatial::FMTEventContainer::insert | ( | const FMTEvent & | event | ) |
Insert an event in the container.
| [in] | event | the event to insert. |
| int Spatial::FMTEventContainer::lastPeriod | ( | ) | const |
Return the period of the last event in the container.
| void Spatial::FMTEventContainer::merge | ( | const FMTEventContainer & | levents | ) |
Merge another FMTEventContainer into this one.
| [in] | levents | the container to merge. |
| double Spatial::FMTEventContainer::minimalDistance | ( | const FMTEvent & | p_event, |
| const unsigned int & | p_distancel, | ||
| const int & | p_period, | ||
| const std::vector< int > & | p_actionsid | ||
| ) | const |
Return the minimal distance between an event and the other events for a period, or the distance plus one if the event is not within the distance.
Mainly used to compute the penalty of simulated annealing models.
| [in] | p_event | the event. |
| [in] | p_distancel | the distance. |
| [in] | p_period | the period. |
| [in] | p_actionsid | the action ids. |
|
default |
Copy assignment operator for FMTEventContainer.
| [in] | rhs | the FMTEventContainer to copy. |
| bool Spatial::FMTEventContainer::operator== | ( | const FMTEventContainer & | rhs | ) | const |
Comparison operator for FMTEventContainer.
| [in] | rhs | the FMTEventContainer to compare to. |
| size_t Spatial::FMTEventContainer::size | ( | ) | const |
Return the number of events in the container.
| void Spatial::FMTEventContainer::swap | ( | FMTEventContainer & | rhs | ) |
Swap the events of this container with another one.
| [in,out] | rhs | the FMTEventContainer to swap with. |
|
friend |