gov.nist.antd.merlin.algorithm.route.util
Class Path

java.lang.Object
  |
  +--gov.nist.antd.merlin.algorithm.route.util.Path
All Implemented Interfaces:
java.lang.Comparable

public class Path
extends java.lang.Object
implements java.lang.Comparable

Represents an entry in the priority queue for algorithm.

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
 NIST assumes no responsibility whatsoever for its use by other parties,
 and makes no guarantees, expressed or implied, about its quality,
 reliability, or any other characteristic.
 
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Version:
1.1

 VERSION CONTROL
-------------------------------------------------------------------------
Name - YYYY/MM/DD - VERSION - ACTION
rouil - 2001/07/11 - 1.0 - Source created
rouil - 2002/01/29 - 1.1 - Changed package


Author:
borchert
, rouil

Field Summary
 double cost
          The cost of the path
 Vertex dest
          The destination of the path
 
Constructor Summary
Path(Vertex dest, double cost)
          Default constructor
 
Method Summary
 int compareTo(java.lang.Object other)
          compare the cost of this path with an other one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dest

public Vertex dest
The destination of the path


cost

public double cost
The cost of the path

Constructor Detail

Path

public Path(Vertex dest,
            double cost)
Default constructor

Parameters:
dest - The destination
cost - The cost
Method Detail

compareTo

public int compareTo(java.lang.Object other)
compare the cost of this path with an other one

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
other - An other path
Returns:
0 if egal,1 if other is lower and -1 if higher