com.jgraph.algebra.cost
Class JGraphDistanceCostFunction
java.lang.Object
com.jgraph.algebra.cost.JGraphDistanceCostFunction
- All Implemented Interfaces:
- JGraphCostFunction
public class JGraphDistanceCostFunction
- extends Object
- implements JGraphCostFunction
This class implements a priority queue.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mapper
protected CellMapper mapper
JGraphDistanceCostFunction
public JGraphDistanceCostFunction(CellMapper mapper)
getCost
public double getCost(Object cell)
- Description copied from interface:
JGraphCostFunction
- Evaluates the cost of
cell
.
- Specified by:
getCost
in interface JGraphCostFunction
- Parameters:
cell
- the cell to be evaluated
- Returns:
- Returns the cost to traverse
cell
getLength
public static double getLength(CellView view)
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.