Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph X 1.4.0.9
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mxgraph.analysis
Interface mxICostFunction

All Known Implementing Classes:
  mxConstantCostFunction, mxDistanceCostFunction

    public interface mxICostFunction

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 mxDistanceCostFunction(graph)` or `new mxConstantCostFunction(1)`.

Method Summary
`double` | `getCost(mxCellState state)` Evaluates the cost of the given cell state.

Method Detail

### getCost

    double getCost(mxCellState state)

  Evaluates the cost of the given cell state.

  Parameters:
    `state` - The cell state to be evaluated
  Returns:
    Returns the cost to traverse the given cell state.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph X 1.4.0.9
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2010 Gaudenz Alder. All rights reserved.