public class Closer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
doParallel
Closure of elems under the operations.
|
Constructor and Description |
---|
Closer(BigProductAlgebra alg,
java.util.List<IntArray> gens) |
Closer(BigProductAlgebra alg,
java.util.List<IntArray> gens,
boolean makeTermMap) |
Closer(BigProductAlgebra alg,
java.util.List<IntArray> gens,
java.util.Map<IntArray,Term> termMap) |
Modifier and Type | Method and Description |
---|---|
boolean |
allElementsFound() |
java.util.List<IntArray> |
close() |
long |
countFuncApplications(int size0,
int size1) |
void |
doOneStagePartialClosure(java.util.concurrent.ConcurrentHashMap<IntArray,Term> map,
int indexInCPUs,
int numOfOps,
int closedMark,
int currentMark,
boolean reportNotNull,
java.util.List<int[]> rawList,
CloserTiming timing)
Note this assumes termMap is not null !!!!!!!!
|
java.util.List<IntArray> |
getAnswer() |
int[][] |
getBlocks()
blocks, values and setConstraints are specified in IntArray
and are used to restrict the element we are looking for.
|
int |
getCongruenceConstraintElemIndex() |
Partition |
getCongruenceForCongruenceConstraint() |
java.util.List<IntArray> |
getElementsToFind() |
IntArray |
getElementToFind() |
Equation |
getFailingEquation() |
java.util.List<IntArray> |
getGenerators()
Returns a shallow copy of the list of generators used by
this Closer
to generate a subuniverse. |
java.util.Map<IntArray,java.lang.Integer> |
getHomomorphism() |
SmallAlgebra |
getImageAlgebra() |
int |
getIndexForCongruenceConstraint() |
int |
getIndexForConstraintSet()
Get the index for the SetConstraint.
|
int |
getmaxSize() |
java.util.Set<java.lang.Integer> |
getSetConstraint()
blocks, values and setConstraints are specified in IntArray
and are used to restrict the element we are looking for.
|
java.util.Map<IntArray,Term> |
getTermMap()
Returns a
Map assigning to each tuple in the generated subuniverse a
term over the signature of the underlying algebra whose term operation can be
applied to the generators to obtain the tuple. |
java.util.Map<Operation,Term> |
getTermMapForOperations() |
int[][] |
getValues()
blocks, values and setConstraints are specified in IntArray
and are used to restrict the element we are looking for.
|
boolean |
isSuppressOutput() |
void |
setBlocks(int[][] blocks)
blocks, values and setConstraints are specified in IntArray
and are used to restrict the element we are looking for.
|
void |
setCongruenceConstraintElemIndex(int congruenceConstraintElemIndex) |
void |
setCongruenceForCongruenceConstraint(Partition alpha) |
void |
setConstraintSet(java.util.Set<java.lang.Integer> set)
blocks, values and setConstraints are specified in IntArray
and are used to restrict the element we are looking for.
|
void |
setElementsToFind(java.util.List<IntArray> e,
java.util.List<IntArray> gens)
This takes
e and deletes duplicates, maintaining the order,
before setting eltsToFind . |
void |
setElementToFind(IntArray e) |
void |
setGenerators(java.util.List<IntArray> gens)
This sets
generators to gens without any duplicates. |
void |
setHomomorphism(int[] algGens) |
void |
setHomomorphism(java.util.Map<IntArray,java.lang.Integer> homomorphism) |
void |
setImageAlgebra(SmallAlgebra alg) |
void |
setIndexForCongruenceConstraint(int indexForCongruenceConstraint) |
void |
setIndexForConstraintSet(int k)
Set the index for the SetConstraint.
|
void |
setMaxSize(int k) |
void |
setOperations(java.util.List<Operation> opers) |
void |
setProgressReport(ProgressReport report) |
void |
setRootAlgebra(SmallAlgebra alg)
Sets the root of a power algebra, if the closing computes a subpower.
|
void |
setSuppressOutput(boolean suppressOutput)
Setting this to true will suppress the output about
the pass.
|
void |
setTermMap(java.util.Map<IntArray,Term> termMap)
Initialises the
Map that will be used to assign to each tuple in the
generated subuniverse a term over the signature of the underlying algebra whose
term operation can be applied to the generators to obtain the tuple. |
void |
setupCongruenceConstraint(Partition alpha,
int index,
int elemIndex) |
void |
setValues(int[][] values)
blocks, values and setConstraints are specified in IntArray
and are used to restrict the element we are looking for.
|
java.util.List<IntArray> |
sgClose() |
java.util.List<IntArray> |
sgClose(java.util.List<IntArray> elems,
int closedMark,
java.util.Map<IntArray,Term> termMap) |
java.util.List<IntArray> |
sgCloseParallel_Old(java.util.List<IntArray> elems,
int closedMark,
java.util.Map<IntArray,Term> termMap)
Closure of elems under the operations.
|
java.util.List<IntArray> |
sgCloseParallel(java.util.List<IntArray> elems,
int closedMark,
java.util.concurrent.ConcurrentMap<IntArray,Term> termMap) |
java.util.List<IntArray> |
sgClosePower() |
public static boolean doParallel
public Closer(BigProductAlgebra alg, java.util.List<IntArray> gens)
public Closer(BigProductAlgebra alg, java.util.List<IntArray> gens, java.util.Map<IntArray,Term> termMap)
public Closer(BigProductAlgebra alg, java.util.List<IntArray> gens, boolean makeTermMap)
public java.util.List<IntArray> getAnswer()
public Equation getFailingEquation()
public void setRootAlgebra(SmallAlgebra alg)
BigProductAlgebra
is a power, then this method
can be used to set the field of the closer referencing the root underlying
the power.alg
- a SmallAlgebra
such that its power is the BigProductAlgebra
determining the closure to be generated by the Closer
.public void setOperations(java.util.List<Operation> opers)
public java.util.List<IntArray> getGenerators()
this Closer
to generate a subuniverse.
The returned list is part of the Closer
object, so any modification
applied to it modifies the Closer
.List
of IntArray
s representing the generating
set whose closure is to be computedpublic void setGenerators(java.util.List<IntArray> gens)
generators
to gens
without any duplicates.
Initializes the internal field of the Closer
to contain the generators
from gens
in the order they occur there, ignoring possible repetitions
of tuples in gens
.gens
- a List
of tuples (IntArray
s) from which
a subuniverse should be generatedpublic java.util.Map<IntArray,Term> getTermMap()
Map
assigning to each tuple in the generated subuniverse a
term over the signature of the underlying algebra whose term operation can be
applied to the generators to obtain the tuple.
Initially this is only a map, mapping generators to variables. After the closing
it is a map between the elements of the generated subuniverse and the generating
terms.
Only a shallow copy is returned, that is, the returned Map
is part of the
Closer
.
Map
mapping IntArray
s to Term
spublic void setTermMap(java.util.Map<IntArray,Term> termMap)
Map
that will be used to assign to each tuple in the
generated subuniverse a term over the signature of the underlying algebra whose
term operation can be applied to the generators to obtain the tuple.
Only a shallow copy of the external Map
is made, that is the Map
becomes part of the Closer
.termMap
- a Map
mapping IntArray
s to Term
s,
it should map the generators to variables, to be reasonable, or it should
be null
.public SmallAlgebra getImageAlgebra()
public void setImageAlgebra(SmallAlgebra alg)
public java.util.Map<IntArray,java.lang.Integer> getHomomorphism()
public void setHomomorphism(java.util.Map<IntArray,java.lang.Integer> homomorphism)
public void setHomomorphism(int[] algGens)
public IntArray getElementToFind()
public void setElementToFind(IntArray e)
public java.util.List<IntArray> getElementsToFind()
public void setElementsToFind(java.util.List<IntArray> e, java.util.List<IntArray> gens)
e
and deletes duplicates, maintaining the order,
before setting eltsToFind
.e
- gens
- public boolean allElementsFound()
public int[][] getBlocks()
public void setBlocks(int[][] blocks)
public int[][] getValues()
public void setValues(int[][] values)
public java.util.Set<java.lang.Integer> getSetConstraint()
public void setConstraintSet(java.util.Set<java.lang.Integer> set)
public int getIndexForConstraintSet()
public void setIndexForConstraintSet(int k)
public int getIndexForCongruenceConstraint()
public void setIndexForCongruenceConstraint(int indexForCongruenceConstraint)
indexForCongruenceConstraint
- the indexForCongruenceConstraint to setpublic int getCongruenceConstraintElemIndex()
public void setCongruenceConstraintElemIndex(int congruenceConstraintElemIndex)
congruenceConstraintElemIndex
- the congruenceConstraintElemIndex to setpublic Partition getCongruenceForCongruenceConstraint()
public void setCongruenceForCongruenceConstraint(Partition alpha)
alpha
- the congruenceConstraintAlpha to setpublic void setupCongruenceConstraint(Partition alpha, int index, int elemIndex)
public int getmaxSize()
public void setMaxSize(int k)
public void setProgressReport(ProgressReport report)
public java.util.List<IntArray> close()
public java.util.List<IntArray> sgClose()
public java.util.List<IntArray> sgClose(java.util.List<IntArray> elems, int closedMark, java.util.Map<IntArray,Term> termMap)
public java.util.List<IntArray> sgCloseParallel(java.util.List<IntArray> elems, int closedMark, java.util.concurrent.ConcurrentMap<IntArray,Term> termMap)
public java.util.List<IntArray> sgCloseParallel_Old(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<IntArray> sgClosePower()
public long countFuncApplications(int size0, int size1)
public void doOneStagePartialClosure(java.util.concurrent.ConcurrentHashMap<IntArray,Term> map, int indexInCPUs, int numOfOps, int closedMark, int currentMark, boolean reportNotNull, java.util.List<int[]> rawList, CloserTiming timing)
map
- indexInCPUs
- numOfOps
- closedMark
- currentMark
- reportNotNull
- rawList
- timing
- public boolean isSuppressOutput()
public void setSuppressOutput(boolean suppressOutput)
suppressOutput
- Copyright 2003 Ralph Freese. All Rights Reserved.