public abstract class AbstractOperation extends java.lang.Object implements Operation
Operation.
 valueAt is abstract so must be overwritten.| Modifier and Type | Field and Description | 
|---|---|
protected int | 
algSize  | 
protected OperationSymbol | 
symbol  | 
protected int[] | 
valueTable  | 
| Constructor and Description | 
|---|
AbstractOperation(OperationSymbol symbol,
                 int algSize)  | 
AbstractOperation(java.lang.String name,
                 int arity,
                 int algSize)  | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
arity()
This gives the arity of this operation. 
 | 
int | 
compareTo(Operation op)  | 
int | 
getSetSize()
This gives the size of the set upon which the operation acts. 
 | 
int[] | 
getTable()
Get the table for this operation or null if it does not exist. 
 | 
int[] | 
getTable(boolean makeTable)
Get the table for this operation. 
 | 
int | 
intValueAt(int arg)
This (optional) operation is for fast access to the table,
 if it exits. 
 | 
int | 
intValueAt(int[] args)
This (optional) operation is the int version. 
 | 
boolean | 
isAssociative()
Test if this operation is binary and associative. 
 | 
boolean | 
isCommutative()
Test if this operation is binary and commutative. 
 | 
boolean | 
isIdempotent()
Is this operation idempotent in the sense f(x,x,..,x) = x. 
 | 
boolean | 
isMaltsev()
Check if a ternary operation is a Maltsev operation. 
 | 
boolean | 
isTableBased()  | 
boolean | 
isTotal()
Only OperationWithDefaultValue's can fail this. 
 | 
boolean | 
isTotallySymmetric()
Test if this operation is totally symmetric; that is, invariant
 under all permutation of the variables. 
 | 
void | 
makeTable()
This will make a table and so make the operation faster but
 requires more space. 
 | 
OperationSymbol | 
symbol()
The operation symbol for this operation. 
 | 
int[] | 
valueAt(int[][] args)
This operation is for fast product operation. 
 | 
abstract java.lang.Object | 
valueAt(java.util.List args)
This operation is the element version. 
 | 
protected OperationSymbol symbol
protected int algSize
protected int[] valueTable
public AbstractOperation(java.lang.String name,
                         int arity,
                         int algSize)
public AbstractOperation(OperationSymbol symbol, int algSize)
public int arity()
public int getSetSize()
getSetSize in interface Operationpublic OperationSymbol symbol()
Operationpublic abstract java.lang.Object valueAt(java.util.List args)
Operationpublic int[] valueAt(int[][] args)
Operationpublic int intValueAt(int[] args)
OperationintValueAt in interface Operationpublic int intValueAt(int arg)
OperationintValueAt in interface Operationarg - the Horner encoding of the actual args.public boolean isTableBased()
isTableBased in interface Operationpublic boolean isIdempotent()
isIdempotent in interface Operationpublic boolean isTotal()
Operationpublic boolean isTotallySymmetric()
isTotallySymmetric in interface Operationpublic boolean isAssociative()
isAssociative in interface Operationpublic boolean isCommutative()
isCommutative in interface Operationpublic boolean isMaltsev()
public void makeTable()
Operationpublic int[] getTable()
Operationpublic int[] getTable(boolean makeTable)
OperationCopyright 2003 Ralph Freese. All Rights Reserved.