#include <localization_anchor_placement.h>


Public Member Functions | |
construction / destruction | |
| SimulationTaskLocalizationAnchorPlacement () | |
| virtual | ~SimulationTaskLocalizationAnchorPlacement () |
basic methods inherited from SimulationTask | |
| virtual void | run (SimulationController &) throw ( std::runtime_error ) |
| virtual std::string | name (void) const throw () |
| virtual std::string | description (void) const throw () |
information about done placement | |
| virtual int | anchor_cnt (void) const throw () |
| virtual const std::string & | pl_type (void) const throw () |
Protected Member Functions | |
| virtual int | tag (SimulationController &sc) throw () |
placement methods | |
| virtual int | outer_grid (SimulationController &, int) throw () |
| virtual int | inner_grid (SimulationController &, int) throw () |
| virtual void | random_set (SimulationController &, int) throw () |
| virtual void | set_nearest_anchor (SimulationController &, const Vec &) throw () |
This task works on an already created topology. One can select between different figures and variable count of anchors. If there are some some anchors left, which don't fit in the figure anymore, they are placed randomly.
Every given point in the figure is passed and the nearest node, which is not already one, is set to an anchor. For this reason a processor, which wants to become an anchor, has to implement LocalizationAbstractProcessor.
| shawn::SimulationTaskLocalizationAnchorPlacement::SimulationTaskLocalizationAnchorPlacement | ( | ) |
| virtual shawn::SimulationTaskLocalizationAnchorPlacement::~SimulationTaskLocalizationAnchorPlacement | ( | ) | [virtual] |
| virtual void shawn::SimulationTaskLocalizationAnchorPlacement::run | ( | SimulationController & | ) | throw ( std::runtime_error ) [virtual] |
basic method which is called when task is started
Implements shawn::SimulationTask.
| virtual std::string shawn::SimulationTaskLocalizationAnchorPlacement::name | ( | void | ) | const throw () [virtual] |
Implements shawn::KeeperManaged.
| virtual std::string shawn::SimulationTaskLocalizationAnchorPlacement::description | ( | void | ) | const throw () [virtual] |
Implements shawn::KeeperManaged.
| virtual int shawn::SimulationTaskLocalizationAnchorPlacement::anchor_cnt | ( | void | ) | const throw () [virtual] |
| virtual const std::string& shawn::SimulationTaskLocalizationAnchorPlacement::pl_type | ( | void | ) | const throw () [virtual] |
| virtual int shawn::SimulationTaskLocalizationAnchorPlacement::outer_grid | ( | SimulationController & | , | |
| int | ||||
| ) | throw () [protected, virtual] |
Anchors placed on a n*n sized grid with maximal number n that satifies
.
Borders of the grid are the borders of topology, so that nodes are surrounded by anchors.
| SimulationController | allows access to nodes in topology | |
| int | wanted number of placed anchors |
| virtual int shawn::SimulationTaskLocalizationAnchorPlacement::inner_grid | ( | SimulationController & | , | |
| int | ||||
| ) | throw () [protected, virtual] |
Anchors placed on a grid just like in outer_grid(), but borders are not the same as ones of topology. Grid is set inside the topology, so that nodes near the borders are not surrounded by anchors.
| SimulationController | allows access to nodes in topology | |
| int | wanted number of placed anchors |
| virtual void shawn::SimulationTaskLocalizationAnchorPlacement::random_set | ( | SimulationController & | , | |
| int | ||||
| ) | throw () [protected, virtual] |
Nodes are set randomly to anchors. Random in this case relates to a randomly generated topology, because this method sets the first n nodes, that are not already one, to an anchor.
| SimulationController | allows access to nodes in topology | |
| int | number of placed anchors |
| virtual void shawn::SimulationTaskLocalizationAnchorPlacement::set_nearest_anchor | ( | SimulationController & | , | |
| const Vec & | ||||
| ) | throw () [protected, virtual] |
This method passes all nodes in the topology and sets the one, which is nearest to given position, to an anchor.
| SimulationController | allows access to nodes in topology | |
| Vec | position to which nearest node is set to an anchor |
| virtual int shawn::SimulationTaskLocalizationAnchorPlacement::tag | ( | SimulationController & | sc | ) | throw () [protected, virtual] |
1.5.6