shawn::SimulationTaskLocalizationAnchorPlacement Class Reference

Anchor placement on the basis of geometric figures. More...

#include <localization_anchor_placement.h>

Inheritance diagram for shawn::SimulationTaskLocalizationAnchorPlacement:

Inheritance graph
[legend]
Collaboration diagram for shawn::SimulationTaskLocalizationAnchorPlacement:

Collaboration graph
[legend]

List of all members.

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 ()


Detailed Description

Anchor placement on the basis of geometric figures.

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.


Constructor & Destructor Documentation

shawn::SimulationTaskLocalizationAnchorPlacement::SimulationTaskLocalizationAnchorPlacement (  ) 

virtual shawn::SimulationTaskLocalizationAnchorPlacement::~SimulationTaskLocalizationAnchorPlacement (  )  [virtual]


Member Function Documentation

virtual void shawn::SimulationTaskLocalizationAnchorPlacement::run ( SimulationController  )  throw ( std::runtime_error ) [virtual]

basic method which is called when task is started

See also:
SimulationTask::run()

Implements shawn::SimulationTask.

virtual std::string shawn::SimulationTaskLocalizationAnchorPlacement::name ( void   )  const throw () [virtual]

Returns:
used name to be indentified by SimulationTaskKeeper
See also:
SimulationTask::name()

Implements shawn::KeeperManaged.

virtual std::string shawn::SimulationTaskLocalizationAnchorPlacement::description ( void   )  const throw () [virtual]

Returns:
short description about functionality
See also:
SimulationTask::description()

Implements shawn::KeeperManaged.

virtual int shawn::SimulationTaskLocalizationAnchorPlacement::anchor_cnt ( void   )  const throw () [virtual]

Returns:
number of placed anchors

virtual const std::string& shawn::SimulationTaskLocalizationAnchorPlacement::pl_type ( void   )  const throw () [virtual]

Returns:
used placement method

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 $ n*n \le \#anchors $.

Borders of the grid are the borders of topology, so that nodes are surrounded by anchors.

Parameters:
SimulationController allows access to nodes in topology
int wanted number of placed anchors
Returns:
number of unplaced 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.

Parameters:
SimulationController allows access to nodes in topology
int wanted number of placed anchors
Returns:
number of unplaced anchors
See also:
outer_grid()

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.

Parameters:
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.

Parameters:
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]


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

Generated on Tue Feb 7 00:00:59 2012 for Shawn by  doxygen 1.5.6