|
Oracle® Spatial Java API Reference 11g Release 1 (11.1) B28401-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.spatial.network.lod.EuclideanCostFunction
public class EuclideanCostFunction
This class implements the A* heuristic cost function as the 2D euclidean distance between the current node and the goal node.
| Constructor Summary | |
|---|---|
EuclideanCostFunction(java.lang.String geometryUserDataName, java.lang.String xCoordUserDataName, java.lang.String yCoordUserDataName)Creates a EuclideanCostFunction instance. |
|
| Method Summary | |
|---|---|
double |
getHeuristicCost(double x1, double y1, double x2, double y2)The implementataion of this abstract method should return the heuristic cost between point (x1, y1) and (x2, y2). |
double |
getHeuristicCost(LogicalNode currentNode, LogicalNode goalNode)Returns the heuristic cost between the current node and the goal node. |
boolean |
requiresUserData() |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface oracle.spatial.network.lod.HeuristicCostFunction |
|---|
getHeuristicCost, requiresUserData |
| Constructor Detail |
|---|
public EuclideanCostFunction(java.lang.String geometryUserDataName,
java.lang.String xCoordUserDataName,
java.lang.String yCoordUserDataName)
geometryUserDataName - user date name registered for geometries of the nodesxCoordUserDataName - user data name registered for x coordinates of the nodesyCoordUserDataName - user data name registered for y coordinates of the nodes| Method Detail |
|---|
public double getHeuristicCost(double x1,
double y1,
double x2,
double y2)
x1 - x coordinate of the current pointy1 - y coordinate of the current pointx2 - x coordinate of the goal pointy2 - y coordinate of the goal point
public double getHeuristicCost(LogicalNode currentNode,
LogicalNode goalNode)
currentNode - current nodegoalNode - goal nodepublic boolean requiresUserData()
|
Oracle® Spatial Java API Reference 11g Release 1 (11.1) B28401-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||