dk.deepthought.sidious.planner.graph
Class AStarEdge

java.lang.Object
  extended by dk.deepthought.sidious.planner.graph.AStarEdge
All Implemented Interfaces:
Edge

public final class AStarEdge
extends java.lang.Object
implements Edge

This class represent an edge in an A*-graph.

Author:
Deepthought

Field Summary
private  double cost
          The cost of this edge.
private  Vertex endVertex
          The end vertex.
private  Vertex startVertex
          The start vertex.
private  Step step
          The step of to this edge.
 
Constructor Summary
AStarEdge(Vertex startVertex, Vertex endVertex, Step step, double cost)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 double getCost()
          Gets the weight of this Edge
 Vertex getEndVertex()
          Gets the endpoint of this Edge
 Vertex getStartVertex()
          Gets the startpoint of this Edge
 Step getStep()
          Gets the Step this Edge represents
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

startVertex

private final Vertex startVertex
The start vertex.


endVertex

private final Vertex endVertex
The end vertex.


cost

private final double cost
The cost of this edge.


step

private final Step step
The step of to this edge.

Constructor Detail

AStarEdge

public AStarEdge(Vertex startVertex,
                 Vertex endVertex,
                 Step step,
                 double cost)
Parameters:
startVertex - a vertex defining the startpoint of this edge
endVertex - a vertex defining the endpoint of this edge
step - the origin of this edge
cost - the weight of this edge
Method Detail

getCost

public double getCost()
Description copied from interface: Edge
Gets the weight of this Edge

Specified by:
getCost in interface Edge
Returns:
the cost

getEndVertex

public Vertex getEndVertex()
Description copied from interface: Edge
Gets the endpoint of this Edge

Specified by:
getEndVertex in interface Edge
Returns:
the endVertex

getStartVertex

public Vertex getStartVertex()
Description copied from interface: Edge
Gets the startpoint of this Edge

Specified by:
getStartVertex in interface Edge
Returns:
the startVertex

getStep

public Step getStep()
Description copied from interface: Edge
Gets the Step this Edge represents

Specified by:
getStep in interface Edge
Returns:
the step

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © Deepthought Development - All Rights Reserved.