public class BigProductAlgebra extends GeneralAlgebra implements Algebra
| Modifier and Type | Field and Description | 
|---|---|
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  | 
con, description, monitor, name, operationsMap, similarityType, size, sub, universeCARDINALITY_COUNTABLE, CARDINALITY_COUNTABLY_INFINITE, CARDINALITY_FINITE, CARDINALITY_INFINITE, CARDINALITY_UNKNOWN| Modifier | Constructor and Description | 
|---|---|
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. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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()
Most of the rest of this is out of date. 
 | 
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)
Closure of  
elems under the operations. | 
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()  | 
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, updateSimilarityTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconstantOperations, getDescription, getMonitor, getName, getOperation, getOperationsMap, inputSize, isIdempotent, isSimilarTo, isTotal, isUnary, iterator, monitoring, operations, setDescription, setMonitor, setName, similarityType, universe, updateSimilarityTypeprotected 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
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.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()
AlgebramakeOperationTables in interface AlgebramakeOperationTables in class GeneralAlgebraOperation.makeTablepublic java.util.List<IntArray> getConstants()
public OperationSymbol getConstantSymbol(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 under the operations.elems - a List of IntArray's to be closed under the fundamental operations.List of IntArray's.sgClose(List, Map)public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems, java.util.Map<IntArray,Term> termMap)
elems under the operations.elems - a List of IntArray's to be closed under the fundamental operations.termMap - a Map from the element to the corresponding term
                used to generate it. The generators should be 
                already in the Map. In other words the termMap
                should have the same number of entries as elems.
                Provide a null reference if the terms 
                are not of interest.List of IntArray's.sgClose(List, int,  Map)public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems, int closedMark, java.util.Map<IntArray,Term> termMap)
elems under the operations.elems - a List of IntArray's to be closed under the fundamental operations.closedMark - use a default of 0 if you do not know what this is good for.termMap - a Map from the element to the corresponding term
                used to generate it. The generators should be 
                already in the Map. In other words the termMap
                should have the same number of entries as elems.
                Provide a null reference if the terms 
                are not of interest.List of IntArray's.sgClose(List, int,  Map, IntArray, ProgressReport)public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems, java.util.Map<IntArray,Term> termMap, IntArray elt)
elems under the operations.elems - a List of IntArray's to be closed under the fundamental operations.termMap - a Map from the element to the corresponding term
                used to generate it. The generators should be 
                already in the Map. In other words the termMap
                should have the same number of entries as elems.
                Provide a null reference if the terms 
                are not of interest.elt - an element to search for; if found return the closure
                found so far.
            Use a null reference if there is no element to search for.List of IntArray's.sgClose(List, Map, IntArray, ProgressReport)public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems, java.util.Map<IntArray,Term> termMap, IntArray elt, ProgressReport report)
elems under the operations.elems - a List of IntArray's to be closed under the fundamental operations.termMap - a Map from the element to the corresponding term
                used to generate it. The generators should be 
                already in the Map. In other words the termMap
                should have the same number of entries as elems.
                Provide a null reference if the terms 
                are not of interest.elt - an element to search for; if found return the closure
            found so far.
            Use a null reference if there is no element to search for.report - a reference to a ProgressReport; used in the GUI to display the status of the closure.
               Use a null reference if you do not need it.List of IntArray's.sgClose(List, int,  Map, IntArray, ProgressReport)public java.util.List sgClose_old(java.util.List elems,
                                  int closedMark,
                                  java.util.Map termMap,
                                  java.lang.Object elt,
                                  ProgressReport report)
elems under the operations. (Worry about
 nullary ops later.)elems - a List of IntArray's to be closed under the fundamental operations.termMap - a Map from the element to the corresponding term
                used to generate it. The generators should be 
                already in the Map. In other words the termMap
                should have the same number of entries as elems.
                Provide a null reference if the terms 
                are not of interest.elt - an element to search for; if found return the closure
                found so far.
            Use a null reference if there is no element to search for.report - a reference to a ProgressReport; used in the GUI to display the status of the closure.
               Use a null reference if you do not need it.List of IntArray's.public java.util.List sgCloseXX(java.util.List elems,
                                int closedMark,
                                java.util.Map termMap,
                                java.lang.Object elt)
elems under the operations. (Worry about
 nullary ops later.)elems - a List of IntArray's to be closed under the fundamental operations.termMap - a Map from the element to the corresponding term
                used to generate it. The generators should be 
                already in the Map. In other words the termMap
                should have the same number of entries as elems.
                Provide a null reference if the terms 
                are not of interest.elt - an element to search for; if found return the closure
                found so far.
            Use a null reference if there is no element to search for.List of IntArray's.public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems, int closedMark, java.util.Map<IntArray,Term> termMap, IntArray elt, ProgressReport report)
elems under the operations.
 Computes the closure of the specified tuples (in the collection elems) under all
 fundamental operations including nullary operations.elems - a List of IntArray's to be closed under the operations.closedMark - use a default of 0 if you do not know what this is good for.termMap - a Map from the element to the corresponding term
                used to generate it. The generators should be 
                already in the Map. In other words the termMap
                should have the same number of entries as elems.
                Provide a null reference if the terms 
                are not of interest.elt - an element to search for; if found return the closure
                found so far.
            Use a null reference if there is no element to search for.report - a reference to a ProgressReport; used in the GUI to display the status of the closure.
               Use a null reference if you do not need it.List of IntArray's.public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        BadAlgebraFileException
java.io.IOExceptionBadAlgebraFileExceptionCopyright 2003 Ralph Freese. All Rights Reserved.