auc.algo
Interface CostEvaluator

All Known Implementing Classes:
DistanceEvaluator, GridEvaluator

public interface CostEvaluator

The general interface for CostEvaluator objects. This interface should be provided to RouteAlgorithm to evaluate travelling from one point to another in the field.


Method Summary
 double getCost(Field field, Vector2D source, Vector2D destination)
          The alternative way of travel cost calculation for segment.
 Segment getSegment(Field field, Vector2D source, Vector2D destination)
          The function calculates the cost of travelling from one point to another.
 

Method Detail

getSegment

public Segment getSegment(Field field,
                          Vector2D source,
                          Vector2D destination)
The function calculates the cost of travelling from one point to another. The cost is a distance betwean points.
Parameters:
field - The field structure
source - The point where the route segment starts
destination - The point where the route segment ends
Returns:
The route is a segment route avoiding exclusion zones.

getCost

public double getCost(Field field,
                      Vector2D source,
                      Vector2D destination)
The alternative way of travel cost calculation for segment. The intermediate points are not gathered into list.
Parameters:
field - The field structure
source - The point where the route segment starts
destination - The point where the route segment ends
Returns:
The cost of the segment.