|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.molae.pipe.binop.AbstractBinaryFunction<S1,S2,T>
net.sf.molae.pipe.binop.PermutedFunction<S1,S2,T>
public class PermutedFunction<S1,S2,T>
A binary function, that performs the same calculation as the base operation after exchanging the two operands.
Constructor Summary | |
---|---|
PermutedFunction(AbstractBinaryFunction<S2,S1,T> base)
Constructs a new PermutedFunction object. |
|
PermutedFunction(AbstractBinaryFunction<S2,S1,T> base,
String name,
boolean hasRightIdentityElements,
boolean hasLeftSinks)
Constructs a new PermutedFunction object. |
Method Summary | |
---|---|
T |
compute(S1 arg1,
S2 arg2)
Performs a computation on the specified arguments and returns the result of that computation. |
protected boolean |
isAnIdentityElement(Object obj)
Tests if the specified object is an identity element in at least one function of the circle. |
protected boolean |
isASink(Object obj)
Tests if the specified object is a sink in at least one function of the circle. |
Methods inherited from class net.sf.molae.pipe.binop.AbstractBinaryFunction |
---|
getFirstInverse, getPermuted, isAssociative, isLeftSink, isRightIdentityElement, setFirstInverse, setPermuted, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PermutedFunction(AbstractBinaryFunction<S2,S1,T> base, String name, boolean hasRightIdentityElements, boolean hasLeftSinks)
base
- the base functionname
- the result of the AbstractBinaryFunction.toString()
methodhasRightIdentityElements
- specifies if this method has one or
more right identity elements.hasLeftSinks
- specifies if this method has one or more left
sinks.
NullPointerException
- base is null
public PermutedFunction(AbstractBinaryFunction<S2,S1,T> base)
base
- the base functionMethod Detail |
---|
public T compute(S1 arg1, S2 arg2)
BinaryFunction
compute
in interface BinaryFunction<S1,S2,T>
compute
in class AbstractBinaryFunction<S1,S2,T>
arg1
- the first argumentarg2
- the second argument
protected boolean isAnIdentityElement(Object obj)
AbstractBinaryFunction
isAnIdentityElement
in class AbstractBinaryFunction<S1,S2,T>
obj
- the candidate for an identity element
true
if the specified object is an
identity element in at least one function of the circle.protected boolean isASink(Object obj)
AbstractBinaryFunction
isASink
in class AbstractBinaryFunction<S1,S2,T>
obj
- the candidate for a sink
true
if the specified object is a
sink in at least one function of the circle.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |