org.uacalc.alg.op
Class TermOperationImp

java.lang.Object
  extended by org.uacalc.alg.op.AbstractOperation
      extended by org.uacalc.alg.op.TermOperationImp
All Implemented Interfaces:
Operation, TermOperation

public class TermOperationImp
extends AbstractOperation
implements TermOperation

This interface specifies a term operation, that is, the interpretation of a term in an algebra.


Field Summary
 
Fields inherited from class org.uacalc.alg.op.AbstractOperation
algSize, symbol, valueTable
 
Constructor Summary
TermOperationImp(java.lang.String name, Term term, java.util.List<Variable> variables, SmallAlgebra alg)
           
TermOperationImp(Term term, java.util.List<Variable> variables, SmallAlgebra alg)
           
 
Method Summary
 java.util.List getOrderedVariables()
          This gives a list of the variables in order without repeats.
 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.
 Term getTerm()
          This gives the term.
 int intValueAt(int[] args)
          This (optional) operation is the int version.
 java.lang.String toString()
           
 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, intValueAt, isAssociative, isCommutative, isIdempotent, isTableBased, isTotal, isTotallySymmetric, makeTable, symbol, valueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.uacalc.alg.op.Operation
arity, getSetSize, intValueAt, isAssociative, isCommutative, isIdempotent, isTableBased, isTotal, isTotallySymmetric, makeTable, symbol, valueAt
 

Constructor Detail

TermOperationImp

public TermOperationImp(Term term,
                        java.util.List<Variable> variables,
                        SmallAlgebra alg)

TermOperationImp

public TermOperationImp(java.lang.String name,
                        Term term,
                        java.util.List<Variable> variables,
                        SmallAlgebra alg)
Method Detail

valueAt

public java.lang.Object valueAt(java.util.List args)
Description copied from interface: Operation
This operation is the element version.

Specified by:
valueAt in interface Operation
Specified by:
valueAt in class AbstractOperation

intValueAt

public int intValueAt(int[] args)
Description copied from interface: Operation
This (optional) operation is the int version.

Specified by:
intValueAt in interface Operation
Overrides:
intValueAt in class AbstractOperation

getTable

public int[] getTable()
Description copied from interface: Operation
Get the table for this operation or null if it does not exist.

Specified by:
getTable in interface Operation
Overrides:
getTable in class AbstractOperation

getTable

public int[] getTable(boolean makeTable)
Description copied from interface: Operation
Get the table for this operation. If it does not exist make it if makeTable is true.

Specified by:
getTable in interface Operation
Overrides:
getTable in class AbstractOperation
Parameters:
makeTable - forces the table to be made if necessary
Returns:
the table

getTerm

public Term getTerm()
This gives the term.

Specified by:
getTerm in interface TermOperation

getOrderedVariables

public java.util.List getOrderedVariables()
This gives a list of the variables in order without repeats.

Specified by:
getOrderedVariables in interface TermOperation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 2003 Ralph Freese. All Rights Reserved.