|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.robotics.pathfinding.DijkstraPathFinder.Node
protected class DijkstraPathFinder.Node
Field Summary | |
---|---|
java.util.ArrayList<DijkstraPathFinder.Node> |
_blocked
|
protected Point |
_p
|
protected DijkstraPathFinder.Node |
_predecessor
|
protected float |
_sourceDistance
|
Constructor Summary | |
---|---|
DijkstraPathFinder.Node(float x,
float y)
|
|
DijkstraPathFinder.Node(Point p)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Point _p
protected float _sourceDistance
protected DijkstraPathFinder.Node _predecessor
public java.util.ArrayList<DijkstraPathFinder.Node> _blocked
Constructor Detail |
---|
public DijkstraPathFinder.Node(Point p)
public DijkstraPathFinder.Node(float x, float y)
Method Detail |
---|
public boolean atEndOfLine(Line theLine)
theLine
- endpoints to check
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |