|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.uacalc.alg.GeneralAlgebra
org.uacalc.alg.BigProductAlgebra
public class BigProductAlgebra
This class represents the direct product of SmallAlgebras which is too big to be a SmallAlgebra. We use IntArray for the elements of the unverse. After we have a real element scheme, we'll use that.
| Field Summary | |
|---|---|
protected java.util.List<SmallAlgebra> |
algebras
|
protected int |
cardinality
-2 indicates the value has not been calculated; -1 that it is too big to be an int. |
protected java.util.List<IntArray> |
constants
|
protected java.util.Map<IntArray,OperationSymbol> |
constantToSymbol
|
protected int |
numberOfFactors
|
protected int[] |
powers
|
protected java.util.List<SmallAlgebra> |
rootAlgebras
|
protected int[] |
sizes
|
| Fields inherited from class org.uacalc.alg.GeneralAlgebra |
|---|
con, description, monitor, name, operations, operationsMap, similarityType, size, sub, universe |
| Fields inherited from interface org.uacalc.alg.Algebra |
|---|
CARDINALITY_COUNTABLE, CARDINALITY_COUNTABLY_INFINITE, CARDINALITY_FINITE, CARDINALITY_INFINITE, CARDINALITY_UNKNOWN |
| Constructor Summary | |
|---|---|
protected |
BigProductAlgebra()
|
|
BigProductAlgebra(java.util.List<SmallAlgebra> algs)
Construct the direct product of a List of SmallAlgebra's. |
|
BigProductAlgebra(java.util.List<SmallAlgebra> algs,
int[] powers)
Construct the direct product of a List of SmallAlgebra's raised to various powers. |
|
BigProductAlgebra(SmallAlgebra alg,
int power)
Construct the direct power of a SmallAlgebra. |
protected |
BigProductAlgebra(java.lang.String name)
|
|
BigProductAlgebra(java.lang.String name,
java.util.List<SmallAlgebra> algs)
Construct the direct product of a List of SmallAlgebra's. |
|
BigProductAlgebra(java.lang.String name,
java.util.List<SmallAlgebra> algs,
int[] powers)
Construct the direct product of a List of SmallAlgebra's raised to various powers. |
|
BigProductAlgebra(java.lang.String name,
SmallAlgebra alg,
int power)
Construct the direct power of a SmallAlgebra. |
| Method Summary | |
|---|---|
int |
cardinality()
If this is larger than an int, return -1. |
java.util.List<SmallAlgebra> |
factors()
|
java.util.List<IntArray> |
getConstants()
|
OperationSymbol |
getConstantSymbol(IntArray constant)
|
Term |
getConstantTerm(IntArray constant)
|
int |
getNumberOfFactors()
|
int[] |
getPowers()
|
boolean |
isPower()
Test if this is a power of a single algebra. |
static void |
main(java.lang.String[] args)
|
protected void |
makeOperations()
For speed we have make all operations on the coordinates into int operations with a lookup table. |
void |
makeOperationTables()
Make operation tables to speed up the evaluation of operations at the cost using more space. |
SmallAlgebra |
projection(int k)
|
BasicPartition |
projectionKernel(int k)
Don't use this yet; it is not implemented. |
java.util.List<SmallAlgebra> |
rootFactors()
|
java.util.List |
sgClose_old(java.util.List elems,
int closedMark,
java.util.Map termMap,
java.lang.Object elt,
ProgressReport report)
Closure of elems under the operations. |
java.util.List<IntArray> |
sgClose(java.util.List<IntArray> elems)
Closure of elems under the operations. |
java.util.List<IntArray> |
sgClose(java.util.List<IntArray> elems,
int closedMark,
java.util.Map<IntArray,Term> termMap)
Closure of elems under the operations. |
java.util.List<IntArray> |
sgClose(java.util.List<IntArray> elems,
int closedMark,
java.util.Map<IntArray,Term> termMap,
IntArray elt,
ProgressReport report)
Closure of elems under the operations. |
java.util.List<IntArray> |
sgClose(java.util.List<IntArray> elems,
java.util.Map<IntArray,Term> termMap)
Closure of elems under the operations. |
java.util.List<IntArray> |
sgClose(java.util.List<IntArray> elems,
java.util.Map<IntArray,Term> termMap,
IntArray elt)
Closure of elems under the operations. |
java.util.List<IntArray> |
sgClose(java.util.List<IntArray> elems,
java.util.Map<IntArray,Term> termMap,
IntArray elt,
ProgressReport report)
|
java.util.List |
sgCloseXX(java.util.List elems,
int closedMark,
java.util.Map termMap,
java.lang.Object elt)
Closure of elems under the operations. |
java.util.SortedMap<java.lang.Integer,java.lang.Integer> |
sizeMultiplicities()
|
| Methods inherited from class org.uacalc.alg.GeneralAlgebra |
|---|
con, constantOperations, getDescription, getMonitor, getName, getOperation, getOperationsMap, inputSize, isIdempotent, isSimilarTo, isTotal, isUnary, iterator, monitoring, operations, parent, parents, resetConAndSub, setDescription, setMonitor, setName, setOperations, setUniverse, similarityType, sub, universe |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.uacalc.alg.Algebra |
|---|
constantOperations, getDescription, getMonitor, getName, getOperation, getOperationsMap, inputSize, isIdempotent, isSimilarTo, isTotal, isUnary, iterator, monitoring, operations, setDescription, setMonitor, setName, similarityType, universe |
| Field Detail |
|---|
protected java.util.List<SmallAlgebra> algebras
protected int[] sizes
protected int numberOfFactors
protected java.util.List<IntArray> constants
protected java.util.Map<IntArray,OperationSymbol> constantToSymbol
protected int cardinality
protected java.util.List<SmallAlgebra> rootAlgebras
protected int[] powers
| Constructor Detail |
|---|
protected BigProductAlgebra()
protected BigProductAlgebra(java.lang.String name)
public BigProductAlgebra(java.util.List<SmallAlgebra> algs)
public BigProductAlgebra(java.lang.String name,
java.util.List<SmallAlgebra> algs)
public BigProductAlgebra(SmallAlgebra alg,
int power)
public BigProductAlgebra(java.lang.String name,
SmallAlgebra alg,
int power)
public BigProductAlgebra(java.util.List<SmallAlgebra> algs,
int[] powers)
algs - a list of SmallAlgebras.powers - an array of powers, one for each algebra in algs.
public BigProductAlgebra(java.lang.String name,
java.util.List<SmallAlgebra> algs,
int[] powers)
algs - a list of SmallAlgebras.powers - an array of powers, one for each algebra in algs.| Method Detail |
|---|
protected void makeOperations()
If space becomes an issue, we could make sure if the valueTables for an operation on different coordinates happen to be equal, they are identical.
public void makeOperationTables()
Algebra
makeOperationTables in interface AlgebramakeOperationTables in class GeneralAlgebraOperation.makeTablepublic java.util.List<IntArray> getConstants()
public OperationSymbol getConstantSymbol(IntArray constant)
public Term getConstantTerm(IntArray constant)
public int cardinality()
cardinality in interface Algebracardinality in class GeneralAlgebrapublic java.util.List<SmallAlgebra> factors()
public int[] getPowers()
public boolean isPower()
public java.util.List<SmallAlgebra> rootFactors()
public int getNumberOfFactors()
public SmallAlgebra projection(int k)
public java.util.SortedMap<java.lang.Integer,java.lang.Integer> sizeMultiplicities()
public BasicPartition projectionKernel(int k)
public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems)
elems - a List of IntArray's
public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems,
java.util.Map<IntArray,Term> termMap)
elems - a List of IntArray'stermMap - a Map from the element to the corresponding term
used to generated it. The generators should be
already in the Map. In other words the termMap
should have the same number of entries as elems.
public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems,
java.util.Map<IntArray,Term> termMap,
IntArray elt)
elems - a List of IntArray'stermMap - a Map from the element to the corresponding term
used to generated it. The generators should be
already in the Map. In other words the termMap
should have the same number of entries as elems.elt - an element to search for; if found return the closure
found so far.
public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems,
java.util.Map<IntArray,Term> termMap,
IntArray elt,
ProgressReport report)
public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems,
int closedMark,
java.util.Map<IntArray,Term> termMap)
elems - a List of IntArray'stermMap - a Map from the element to the corresponding term
used to generated it. The generators should be
already in the Map. In other words the termMap
should have the same number of entries as elems.
public java.util.List sgClose_old(java.util.List elems,
int closedMark,
java.util.Map termMap,
java.lang.Object elt,
ProgressReport report)
elems - a List of IntArray'stermMap - a Map from the element to the corresponding term
used to generated it. The generators should be
already in the Map. In other words the termMap
should have the same number of entries as elems.elt - an element to search for; if found return the closure
found so far.
public java.util.List sgCloseXX(java.util.List elems,
int closedMark,
java.util.Map termMap,
java.lang.Object elt)
elems - a List of IntArray'stermMap - a Map from the element to the corresponding term
used to generated it. The generators should be
already in the Map. In other words the termMap
should have the same number of entries as elems.elt - an element to search for; if found return the closure
found so far.
public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems,
int closedMark,
java.util.Map<IntArray,Term> termMap,
IntArray elt,
ProgressReport report)
elems - a List of IntArray'stermMap - a Map from the element to the corresponding term
used to generated it. The generators should be
already in the Map. In other words the termMap
should have the same number of entries as elems.elt - an element to search for; if found return the closure
found so far.
public static void main(java.lang.String[] args)
throws java.io.IOException,
BadAlgebraFileException
java.io.IOException
BadAlgebraFileException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||