com.kuka.graph.cost
Class CostFunctions

java.lang.Object
  extended by com.kuka.graph.cost.CostFunctions

public final class CostFunctions
extends Object

A collection of predefined cost filter implementations.


Method Summary
static
<N,E extends Edge<N>>
CostFunction<N,E>
constant(double cost)
          Cost function unconditionally returning the specified weight.
static
<N,E extends Edge<N>>
CostFunction<N,E>
one()
          Cost function unconditionally returning the weight 1.
static
<N,E extends Edge<N>>
CostFunction<N,E>
zero()
          Cost function unconditionally returning the weight 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

zero

public static <N,E extends Edge<N>> CostFunction<N,E> zero()
Cost function unconditionally returning the weight 0.

Type Parameters:
N - the node type
E - the edge type
Returns:
the cost function

one

public static <N,E extends Edge<N>> CostFunction<N,E> one()
Cost function unconditionally returning the weight 1.

Type Parameters:
N - the node type
E - the edge type
Returns:
the cost function

constant

public static <N,E extends Edge<N>> CostFunction<N,E> constant(double cost)
Cost function unconditionally returning the specified weight.

Type Parameters:
N - the node type
E - the edge type
Parameters:
cost - the constant cost to return for each edge
Returns:
the cost function


Copyright © 2019. All rights reserved.