protected class DijkstraPathFinder.Node
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<DijkstraPathFinder.Node> |
_blocked |
protected Point |
_p |
protected DijkstraPathFinder.Node |
_predecessor |
protected float |
_sourceDistance |
Modifier and Type | Method and Description |
---|---|
boolean |
atEndOfLine(Line theLine)
test if this Node is one of the ends of theLine
|
void |
block(DijkstraPathFinder.Node aNode)
add aNode to list of nodes not a neighbour of this Node
|
float |
getDistance(DijkstraPathFinder.Node aNode)
return the straight distance from this node to aNode
|
float |
getDistance(Point aPoint)
get the straight line distance from this node to aPoint
|
Point |
getLocation()
return the location of this node
|
DijkstraPathFinder.Node |
getPredecessor()
get the predecessor of this node in the shortest path from the start
|
float |
getSourceDistance()
return the shortest path length to this node from the start node
|
float |
getX()
get the X coordinate of this node
|
float |
getY()
get the Y coordinate of thes Node
|
void |
setPredecessor(DijkstraPathFinder.Node thePredecessor)
set the predecessor of this node in the shortest path from the start node
|
void |
setSourceDistance(float theDistance)
set the distance of this Node from the source
|
java.lang.String |
toString() |
protected Point _p
protected float _sourceDistance
protected DijkstraPathFinder.Node _predecessor
public java.util.ArrayList<DijkstraPathFinder.Node> _blocked
public Node(Point p)
public Node(float x, float y)
public boolean atEndOfLine(Line theLine)
theLine
- endpoints to checkpublic void setSourceDistance(float theDistance)
theDistance
- public float getSourceDistance()
public float getDistance(Point aPoint)
aPoint
- public float getDistance(DijkstraPathFinder.Node aNode)
aNode
- public Point getLocation()
public void block(DijkstraPathFinder.Node aNode)
aNode
- public void setPredecessor(DijkstraPathFinder.Node thePredecessor)
thePredecessor
- public DijkstraPathFinder.Node getPredecessor()
public float getX()
public float getY()
public java.lang.String toString()
toString
in class java.lang.Object