|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.uacalc.alg.op.AbstractOperation
public abstract class AbstractOperation
This class implements the basic methods of Operation.
valueAt is abstract so must be overwritten.
| Field Summary | |
|---|---|
protected int |
algSize
|
protected OperationSymbol |
symbol
|
protected int[] |
valueTable
|
| Constructor Summary | |
|---|---|
AbstractOperation(OperationSymbol symbol,
int algSize)
|
|
AbstractOperation(java.lang.String name,
int arity,
int algSize)
|
|
| Method Summary | |
|---|---|
int |
arity()
This gives the arity of this operation. |
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 |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected OperationSymbol symbol
protected int algSize
protected int[] valueTable
| Constructor Detail |
|---|
public AbstractOperation(java.lang.String name,
int arity,
int algSize)
public AbstractOperation(OperationSymbol symbol,
int algSize)
| Method Detail |
|---|
public int arity()
arity in interface Operationpublic int getSetSize()
getSetSize in interface Operationpublic OperationSymbol symbol()
Operation
symbol in interface Operationpublic abstract java.lang.Object valueAt(java.util.List args)
Operation
valueAt in interface Operationpublic int[] valueAt(int[][] args)
Operation
valueAt in interface Operationargs - an array of arity int arrays from the product algebra.public int intValueAt(int[] args)
Operation
intValueAt in interface Operationpublic int intValueAt(int arg)
Operation
intValueAt 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()
Operation
isTotal in interface Operationpublic boolean isTotallySymmetric()
isTotallySymmetric in interface Operationpublic boolean isAssociative()
isAssociative in interface Operationpublic boolean isCommutative()
isCommutative in interface Operationpublic void makeTable()
Operation
makeTable in interface Operationpublic int[] getTable()
Operation
getTable in interface Operationpublic int[] getTable(boolean makeTable)
Operation
getTable in interface OperationmakeTable - forces the table to be made if necessary
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||