com.kuka.graph.cost
Class AbstractBaseCostFunction<N,E extends Edge<N>>

java.lang.Object
  extended by com.kuka.graph.cost.AbstractBaseCostFunction<N,E>
Type Parameters:
N - the node type
E - the edge type
All Implemented Interfaces:
CostFunction<N,E>

public abstract class AbstractBaseCostFunction<N,E extends Edge<N>>
extends Object
implements CostFunction<N,E>

Base implementation for cost functions.


Constructor Summary
AbstractBaseCostFunction()
           
 
Method Summary
 double estimate(N source, N target)
          Estimate the cost of going from source to target.
 double evaluate(E edge)
          Evaluate the cost of an edge.
 double evaluate(Path<N,E> path)
          Evaluate the cost of a path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.kuka.graph.cost.CostFunction
evaluate
 

Constructor Detail

AbstractBaseCostFunction

public AbstractBaseCostFunction()
Method Detail

evaluate

public double evaluate(E edge)
Description copied from interface: CostFunction
Evaluate the cost of an edge.

Specified by:
evaluate in interface CostFunction<N,E extends Edge<N>>
Parameters:
edge - the edge.
Returns:
the evaluated cost.

evaluate

public double evaluate(Path<N,E> path)
Description copied from interface: CostFunction
Evaluate the cost of a path.

Specified by:
evaluate in interface CostFunction<N,E extends Edge<N>>
Parameters:
path - the path
Returns:
the evaluated cost.

estimate

public double estimate(N source,
                       N target)
Description copied from interface: CostFunction
Estimate the cost of going from source to target.

Specified by:
estimate in interface CostFunction<N,E extends Edge<N>>
Parameters:
source - the source.
target - the target.
Returns:
the estimated cost.


Copyright © 2019. All rights reserved.