shawn::NodeDistanceEstimate Class Reference

#include <node_distance_estimate.h>

Inheritance diagram for shawn::NodeDistanceEstimate:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~NodeDistanceEstimate ()
 Does nothing, required because of the virtual methods.
virtual bool estimate_distance (const Node &source, const Node &target, double &result) const =0 throw ()


Detailed Description

Base class for all classes that estimated distances between two nodes. These are kept in the distance_estimate_keeper and applications may retrieve these distance estimate instances using the following example code: std::string dist_est_name = se.required_string_param("myapp_dist_est"); shawn::ConstNodeDistanceEstimateHandle dist_est_ = owner().world().simulation_controller().distance_estimate_keeper().find(dist_est_name);

Constructor & Destructor Documentation

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

Does nothing, required because of the virtual methods.


Member Function Documentation

virtual bool shawn::NodeDistanceEstimate::estimate_distance ( const Node source,
const Node target,
double &  result 
) const throw () [pure virtual]

Estimates the distance between two nodes source and target.

Parameters:
source The source node for the estimation
target The destination node for the estimation
result The result of the estimation will be placed here ONLY IF true is returned
Returns:
true if a distance could be estimated between the two nodes, false otherwise

Implemented in shawn::PerfectDistanceEstimate, and shawn::RandomizedDistanceEstimate.


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

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