Class JGraphConstantCostFunction
java.lang.Object
com.jgraph.algebra.cost.JGraphConstantCostFunction
- All Implemented Interfaces:
JGraphCostFunction
This allows to recursively compose any number of abstract layouts into a compound
abstract layout. Note that this is more flexible than a decorator pattern,
because you can use different class hierarchies to implement the input (facade)
and the layout algorithms, while adhering to the rule that each layout
algorithm uses the output of the last layout as its input.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
cost
protected double cost
-
-
Constructor Details
-
JGraphConstantCostFunction
public JGraphConstantCostFunction(double cost)
-
-
Method Details
-
getCost
Description copied from interface:JGraphCostFunctionEvaluates the cost ofcell.- Specified by:
getCostin interfaceJGraphCostFunction- Parameters:
cell- the cell to be evaluated- Returns:
- Returns the cost to traverse
cell
-