public class GeneralAlgebra extends java.lang.Object implements Algebra
Modifier and Type | Field and Description |
---|---|
protected CongruenceLattice |
con |
protected java.lang.String |
description |
static ProgressReport |
monitor |
protected java.lang.String |
name |
protected java.util.Map<OperationSymbol,Operation> |
operationsMap |
protected SimilarityType |
similarityType |
protected int |
size |
protected SubalgebraLattice |
sub |
protected java.util.Set |
universe |
CARDINALITY_COUNTABLE, CARDINALITY_COUNTABLY_INFINITE, CARDINALITY_FINITE, CARDINALITY_INFINITE, CARDINALITY_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
GeneralAlgebra(java.lang.String name) |
|
GeneralAlgebra(java.lang.String name,
java.util.Set univ) |
|
GeneralAlgebra(java.lang.String name,
java.util.Set univ,
java.util.List<Operation> operations) |
Modifier and Type | Method and Description |
---|---|
int |
cardinality() |
CongruenceLattice |
con() |
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 alg2) |
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() |
SmallAlgebra |
parent() |
java.util.List<SmallAlgebra> |
parents() |
void |
resetConAndSub()
This does nothing but is overwritten for BasicAlgebra's.
|
void |
setDescription(java.lang.String desc) |
void |
setMonitor(ProgressReport m) |
void |
setName(java.lang.String v) |
protected void |
setOperations(java.util.List<Operation> ops)
This sorts the list of operations.
|
protected void |
setUniverse(java.util.Set univ) |
SimilarityType |
similarityType() |
SubalgebraLattice |
sub() |
java.util.Set |
universe()
We use java.util.Set to hold the universe of the algebra.
|
void |
updateSimilarityType()
Use the operations list to update the SimilarityType.
|
protected java.util.Map<OperationSymbol,Operation> operationsMap
protected SimilarityType similarityType
protected java.util.Set universe
protected CongruenceLattice con
protected SubalgebraLattice sub
protected java.lang.String name
protected java.lang.String description
protected int size
public static ProgressReport monitor
protected GeneralAlgebra(java.lang.String name)
public GeneralAlgebra(java.lang.String name, java.util.Set univ)
public GeneralAlgebra(java.lang.String name, java.util.Set univ, java.util.List<Operation> operations)
public final void setMonitor(ProgressReport m)
setMonitor
in interface Algebra
public final ProgressReport getMonitor()
getMonitor
in interface Algebra
public final boolean monitoring()
monitoring
in interface Algebra
public boolean isTotal()
Algebra
protected void setUniverse(java.util.Set univ)
protected void setOperations(java.util.List<Operation> ops)
ops
- public java.util.Map<OperationSymbol,Operation> getOperationsMap()
getOperationsMap
in interface Algebra
public java.util.List<Operation> operations()
operations
in interface Algebra
public Operation getOperation(OperationSymbol sym)
Algebra
getOperation
in interface Algebra
public java.util.List<Operation> constantOperations()
constantOperations
in interface Algebra
public SimilarityType similarityType()
similarityType
in interface Algebra
public void updateSimilarityType()
Algebra
updateSimilarityType
in interface Algebra
public java.lang.String getDescription()
getDescription
in interface Algebra
public void setDescription(java.lang.String desc)
setDescription
in interface Algebra
public boolean isSimilarTo(Algebra alg2)
isSimilarTo
in interface Algebra
public java.util.Iterator iterator()
Algebra
public int cardinality()
cardinality
in interface Algebra
public int inputSize()
Algebra
public java.util.Set universe()
Algebra
public CongruenceLattice con()
public SubalgebraLattice sub()
public void resetConAndSub()
public void makeOperationTables()
Algebra
makeOperationTables
in interface Algebra
Operation.makeTable
public SmallAlgebra parent()
public java.util.List<SmallAlgebra> parents()
public boolean isIdempotent()
Algebra
isIdempotent
in interface Algebra
Copyright 2003 Ralph Freese. All Rights Reserved.