org.uacalc.alg
Interface Algebra

All Known Subinterfaces:
Lattice, SmallAlgebra, SmallLattice
All Known Implementing Classes:
AlgebraFromMinimalSets, BasicAlgebra, BasicLattice, BigProductAlgebra, CongruenceLattice, FreeAlgebra, GeneralAlgebra, PolinLikeAlgebra, PowerAlgebra, ProductAlgebra, QuotientAlgebra, ReductAlgebra, Subalgebra, SubalgebraLattice, SubProductAlgebra, UnaryTermsMonoid

public interface Algebra


Field Summary
static int CARDINALITY_COUNTABLE
          This is used to indicate the carinality of the algebra is either finite or countably infinite.
static int CARDINALITY_COUNTABLY_INFINITE
          This is used to indicate the carinality of the algebra is countably infinite.
static int CARDINALITY_FINITE
          This is used to indicate the carinality of the algebra is finite but otherwise unknown.
static int CARDINALITY_INFINITE
          This is used to indicate the carinality of the algebra is infinite but otherwise unknown.
static int CARDINALITY_UNKNOWN
          This is used to indicate the carinality of the algebra is unknown.
 
Method Summary
 int cardinality()
           
 java.util.List<Operation> constantOperations()
          This gives a list of the operations of arity 0, which is a little different from the constants.
 java.lang.String getDescription()
           
 ProgressReport getMonitor()
           
 java.lang.String getName()
           
 Operation getOperation(OperationSymbol sym)
          Get the operation correspond to a symbol or null if the symbol is not part of the similarityType.
 java.util.Map<OperationSymbol,Operation> getOperationsMap()
           
 int inputSize()
          The sum of the cardinality of the algebra raised to the arity of the operations.
 boolean isIdempotent()
          Test if all of the operations are idempotent.
 boolean isSimilarTo(Algebra alg)
           
 boolean isTotal()
          This will fail only if there are some OperationWithDefaultValue's which are not total.
 boolean isUnary()
           
 java.util.Iterator iterator()
          returns the iterator of the universe.
 void makeOperationTables()
          Make operation tables to speed up the evaluation of operations at the cost using more space.
 boolean monitoring()
           
 java.util.List<Operation> operations()
           
 void setDescription(java.lang.String desc)
           
 void setMonitor(ProgressReport monitor)
           
 void setName(java.lang.String v)
           
 SimilarityType similarityType()
           
 java.util.Set universe()
          We use java.util.Set to hold the universe of the algebra.
 

Field Detail

CARDINALITY_UNKNOWN

static final int CARDINALITY_UNKNOWN
This is used to indicate the carinality of the algebra is unknown.

See Also:
Constant Field Values

CARDINALITY_FINITE

static final int CARDINALITY_FINITE
This is used to indicate the carinality of the algebra is finite but otherwise unknown.

See Also:
Constant Field Values

CARDINALITY_INFINITE

static final int CARDINALITY_INFINITE
This is used to indicate the carinality of the algebra is infinite but otherwise unknown.

See Also:
Constant Field Values

CARDINALITY_COUNTABLE

static final int CARDINALITY_COUNTABLE
This is used to indicate the carinality of the algebra is either finite or countably infinite.

See Also:
Constant Field Values

CARDINALITY_COUNTABLY_INFINITE

static final int CARDINALITY_COUNTABLY_INFINITE
This is used to indicate the carinality of the algebra is countably infinite.

See Also:
Constant Field Values
Method Detail

universe

java.util.Set universe()
We use java.util.Set to hold the universe of the algebra. In order to accomodate infinite algebras and algebras with unknown cardinality, we allow the following changes:


cardinality

int cardinality()
Returns:
the cardinality if possible, else a negative int

inputSize

int inputSize()
The sum of the cardinality of the algebra raised to the arity of the operations.

Returns:
the inputSize or -1 if it is not an int

isUnary

boolean isUnary()

iterator

java.util.Iterator iterator()
returns the iterator of the universe. Since we allow that to be optional, this may throw an UnsupportedOperationException.


operations

java.util.List<Operation> operations()

getOperation

Operation getOperation(OperationSymbol sym)
Get the operation correspond to a symbol or null if the symbol is not part of the similarityType.


getOperationsMap

java.util.Map<OperationSymbol,Operation> getOperationsMap()

getName

java.lang.String getName()

setName

void setName(java.lang.String v)

getDescription

java.lang.String getDescription()

setDescription

void setDescription(java.lang.String desc)

similarityType

SimilarityType similarityType()

isSimilarTo

boolean isSimilarTo(Algebra alg)

makeOperationTables

void makeOperationTables()
Make operation tables to speed up the evaluation of operations at the cost using more space.

See Also:
Operation.makeTable

constantOperations

java.util.List<Operation> constantOperations()
This gives a list of the operations of arity 0, which is a little different from the constants.


isIdempotent

boolean isIdempotent()
Test if all of the operations are idempotent.


isTotal

boolean isTotal()
This will fail only if there are some OperationWithDefaultValue's which are not total.

Returns:

monitoring

boolean monitoring()

getMonitor

ProgressReport getMonitor()

setMonitor

void setMonitor(ProgressReport monitor)


Copyright 2003 Ralph Freese. All Rights Reserved.