@TestClass(value="org.openscience.cdk.group.AbstractDiscretePartitionRefinerTest") public abstract class AbstractDiscretePartitionRefiner extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractDiscretePartitionRefiner.Result
The result of a comparison between the current partition
and the best permutation found so far.
|
Constructor and Description |
---|
AbstractDiscretePartitionRefiner()
A refiner - it is necessary to call
setup(org.openscience.cdk.group.PermutationGroup, org.openscience.cdk.group.IEquitablePartitionRefiner) before use. |
Modifier and Type | Method and Description |
---|---|
boolean |
firstIsIdentity()
Check that the first refined partition is the identity.
|
PermutationGroup |
getAutomorphismGroup()
Get the automorphism group used to prune the search.
|
Partition |
getAutomorphismPartition()
The automorphism partition is a partition of the elements of the group.
|
Permutation |
getBest()
Get the best permutation found.
|
String |
getBestHalfMatrixString()
Get the half-matrix string under the best permutation.
|
abstract int |
getConnectivity(int vertexI,
int vertexJ)
Get the connectivity between two vertices as an integer, to allow
for multigraphs : so a single edge is 1, a double edge 2, etc.
|
Permutation |
getFirst()
Get the first permutation reached by the search.
|
String |
getFirstHalfMatrixString()
Get the half-matrix string under the first permutation.
|
String |
getHalfMatrixString()
Get the initial (unpermuted) half-matrix string.
|
String |
getHalfMatrixString(Permutation permutation)
Get the upper-half of the adjacency matrix under the permutation.
|
abstract int |
getVertexCount()
Get the number of vertices in the graph to be refined.
|
boolean |
isCanonical()
Check for a canonical graph, without generating the whole
automorphism group.
|
void |
refine(Partition partition)
Refine the partition.
|
void |
setup(PermutationGroup group,
IEquitablePartitionRefiner refiner)
Setup the group and refiner; it is important to call this method before
calling
refine(org.openscience.cdk.group.Partition) otherwise the refinement process will fail. |
@TestMethod(value="emptyConstructor") public AbstractDiscretePartitionRefiner()
setup(org.openscience.cdk.group.PermutationGroup, org.openscience.cdk.group.IEquitablePartitionRefiner)
before use.public abstract int getVertexCount()
public abstract int getConnectivity(int vertexI, int vertexJ)
vertexI
- a vertex of the graphvertexJ
- a vertex of the graph@TestMethod(value="setupTest") public void setup(PermutationGroup group, IEquitablePartitionRefiner refiner)
refine(org.openscience.cdk.group.Partition)
otherwise the refinement process will fail.group
- a group (possibly empty) of automorphismsrefiner
- the equitable refiner@TestMethod(value="firstIsIdentityTest") public boolean firstIsIdentity()
@TestMethod(value="getAutomorphismPartitionTest") public Partition getAutomorphismPartition()
@TestMethod(value="getHalfMatrixStringTest") public String getHalfMatrixString(Permutation permutation)
permutation
- a permutation of the adjacency matrix@TestMethod(value="getHalfMatrixStringTest") public String getBestHalfMatrixString()
@TestMethod(value="getFirstMatrixStringTest") public String getFirstHalfMatrixString()
@TestMethod(value="getHalfMatrixStringTest") public String getHalfMatrixString()
@TestMethod(value="getGroupTest") public PermutationGroup getAutomorphismGroup()
@TestMethod(value="getBestTest") public Permutation getBest()
@TestMethod(value="getFirstTest") public Permutation getFirst()
@TestMethod(value="isCanonical_TrueTest,isCanonical_FalseTest") public boolean isCanonical()
@TestMethod(value="refineTest") public void refine(Partition partition)
partition
- the initial partition of the verticesCopyright © 2014. All Rights Reserved.