JGraph
v5.13.0.4


com.jgraph.algebra.cost
Interface JGraphCostFunction

All Known Implementing Classes:
JGraphConstantCostFunction, JGraphDistanceCostFunction

public interface JGraphCostFunction

The cost function takes a cell and returns it's cost as a double. Two typical examples of cost functions are the euclidian length of edges or a constant number for each edge. To use one of the built-in cost functions, use either new JGraphDistanceCostFunction(graph.getGraphLayoutCache()) or new JGraphConstantCostFunction(1).


Method Summary
 double getCost(java.lang.Object cell)
          Evaluates the cost of cell.
 

Method Detail

getCost

double getCost(java.lang.Object cell)
Evaluates the cost of cell.

Parameters:
cell - the cell to be evaluated
Returns:
Returns the cost to traverse cell

JGraph
v5.13.0.4


Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.