java.lang.Object |
↳ |
es.usc.citius.hipster.model.function.impl.BinaryOperation<E extends java.lang.Comparable<E>> |
Class Overview
A implementation of BinaryFunction
used to define
a custom cost algebra that also has the following definitions:
- identity element (A*I = A)
- maximum element (A*M = M)
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
es.usc.citius.hipster.model.function.BinaryFunction
abstract
T
|
apply(T a, T b)
Combination of two elements of the same type,
returning an element of the same type.
|
|
Public Constructors
public
BinaryOperation
(BinaryFunction<E> operation, E identityElem, E maxElem)
Public Methods
public
E
apply
(E a, E b)
public
static
BinaryOperation<Double>
doubleAdditionOp
()
Returns
- a default addition implementation which works with doubles.
For example, BinaryOperation.doubleAdditionOp().apply(2.5d, 1.0d) returns 3.5d.
public
static
BinaryOperation<Double>
doubleMultiplicationOp
()
Returns
- a multiplication implementation which works with doubles.
For example, BinaryOperation.doubleMultiplicationOp.apply(2.5d, 2.0d) returns 5.0d.
public
E
getIdentityElem
()