|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.uacalc.alg.op.AbstractOperation
org.uacalc.alg.op.OperationWithDefaultValue
public class OperationWithDefaultValue
A convenience class for the UI.
| Field Summary |
|---|
| Fields inherited from class org.uacalc.alg.op.AbstractOperation |
|---|
algSize, symbol, valueTable |
| Constructor Summary | |
|---|---|
OperationWithDefaultValue(Operation op)
|
|
OperationWithDefaultValue(Operation op,
int algSize)
|
|
OperationWithDefaultValue(OperationSymbol sym,
int algSize)
|
|
OperationWithDefaultValue(OperationSymbol sym,
int algSize,
int defaultValue)
|
|
OperationWithDefaultValue(OperationSymbol sym,
int algSize,
int[] valueTable,
int defaultValue)
|
|
OperationWithDefaultValue(java.lang.String name,
int arity,
int algSize,
int defaultValue)
|
|
OperationWithDefaultValue(java.lang.String name,
int arity,
int algSize,
int[] valueTable,
int defaultValue)
|
|
| Method Summary | |
|---|---|
int |
getDefaultValue()
|
int[] |
getRandomValueTable()
|
int[] |
getTotalTable()
Get the table with the default and random values filled in. |
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 |
isDiagonal(int row,
int col)
|
boolean |
isIdempotentSet()
|
boolean |
isTotal()
Only OperationWithDefaultValue's can fail this. |
void |
makeIdempotent()
|
static java.util.List<Operation> |
makeOrdinary(java.util.List<Operation> ops)
|
Operation |
makeOrdinaryOperation()
Make an operation with the default value filled in. |
void |
makeTable()
Note this effectively kills the default value part of this. |
void |
setDefaultValue(int v)
|
void |
setIdempotent(boolean v)
|
void |
updateRandomValueTable()
|
java.lang.Object |
valueAt(java.util.List args)
This operation is the element version. |
| Methods inherited from class org.uacalc.alg.op.AbstractOperation |
|---|
arity, getSetSize, getTable, getTable, isAssociative, isCommutative, isIdempotent, isTableBased, isTotallySymmetric, symbol, valueAt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperationWithDefaultValue(Operation op)
public OperationWithDefaultValue(java.lang.String name,
int arity,
int algSize,
int defaultValue)
public OperationWithDefaultValue(OperationSymbol sym,
int algSize)
public OperationWithDefaultValue(OperationSymbol sym,
int algSize,
int defaultValue)
public OperationWithDefaultValue(Operation op,
int algSize)
public OperationWithDefaultValue(OperationSymbol sym,
int algSize,
int[] valueTable,
int defaultValue)
public OperationWithDefaultValue(java.lang.String name,
int arity,
int algSize,
int[] valueTable,
int defaultValue)
| Method Detail |
|---|
public void updateRandomValueTable()
public int[] getRandomValueTable()
public boolean isTotal()
Operation
isTotal in interface OperationisTotal in class AbstractOperationpublic int getDefaultValue()
public void setDefaultValue(int v)
public boolean isIdempotentSet()
public void setIdempotent(boolean v)
public void makeIdempotent()
public boolean isDiagonal(int row,
int col)
public java.lang.Object valueAt(java.util.List args)
Operation
valueAt in interface OperationvalueAt in class AbstractOperationpublic int intValueAt(int[] args)
Operation
intValueAt in interface OperationintValueAt in class AbstractOperationpublic int intValueAt(int arg)
Operation
intValueAt in interface OperationintValueAt in class AbstractOperationarg - the Horner encoding of the actual args.
public void makeTable()
makeTable in interface OperationmakeTable in class AbstractOperationpublic int[] getTotalTable()
public Operation makeOrdinaryOperation()
public static java.util.List<Operation> makeOrdinary(java.util.List<Operation> ops)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||