$darkmode
DENOPTIM
|
Unit test. More...
Classes | |
class | ExtractPatternCase |
Public Member Functions | |
void | testExtractPattern_singleRingSystem () throws Throwable |
void | testExtractPattern_returnsEmptyListIfNoRings () throws Throwable |
void | testExtractPattern_fusedRings () throws Throwable |
void | testLocateCompatibleXOverPoints () throws Exception |
void | testAddRing () throws Exception |
void | testExtendGraph () throws Exception |
Static Package Functions | |
static void | setUpClass () |
Package Attributes | |
IChemObjectBuilder | chemBuilder = DefaultChemObjectBuilder.getInstance() |
Private Member Functions | |
ExtractPatternCase | getFusedRings () throws Throwable |
Returns a molecule consisting of two pairs of fused rings connected by an oxygen atom. More... | |
DGraph | buildGraph (List< Vertex > vertices, List< List< Integer > > edges) throws DENOPTIMException |
void | addRings (List< Vertex > vertices, DGraph g) |
Set< DGraph > | getExpectedSubgraphs (DGraph graph) |
Vertex | buildFragment (String elementSymbol, int apCount, boolean isRCV) |
Point3d | getRandomVector () |
DGraph | getThreeCycle () throws DENOPTIMException |
Returns a 3-cycle. More... | |
DGraph[] | getPairOfTestGraphs () throws Exception |
Generates a pair of graphs that include templates with free content. More... | |
FragmentSpace | prepare () throws Exception |
Sets the compatibility matrix (src -> trg);. More... | |
Private Attributes | |
final Random | rng = new Random() |
Static Private Attributes | |
static APClass | APCA |
static APClass | APCB |
static APClass | APCC |
static APClass | APCD |
static APClass | DEFAULT_APCLASS |
Unit test.
Definition at line 84 of file GraphOperationsTest.java.
Definition at line 276 of file GraphOperationsTest.java.
References denoptim.graph.DGraph.addRing(), and denoptim.graph.Ring.addVertex().
Referenced by denoptim.ga.GraphOperationsTest.getFusedRings().
|
private |
Definition at line 329 of file GraphOperationsTest.java.
References denoptim.graph.Fragment.addAP(), denoptim.ga.GraphOperationsTest.chemBuilder, denoptim.ga.GraphOperationsTest.DEFAULT_APCLASS, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.ga.GraphOperationsTest.getRandomVector(), and denoptim.utils.GraphUtils.getUniqueVertexIndex().
Referenced by denoptim.ga.GraphOperationsTest.getFusedRings().
|
private |
Definition at line 240 of file GraphOperationsTest.java.
References denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), and denoptim.graph.Vertex.getAttachmentPoints().
Referenced by denoptim.ga.GraphOperationsTest.getFusedRings().
Definition at line 301 of file GraphOperationsTest.java.
References denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.getVertexList(), and denoptim.graph.DGraph.removeVertex().
Referenced by denoptim.ga.GraphOperationsTest.getFusedRings().
|
private |
Returns a molecule consisting of two pairs of fused rings connected by an oxygen atom.
The dots represents chords. The molecule looks as follows: Cl | ↑ O - C - C → ← N - | . | . ↑ . | . N - C - O - C - C - C → . | . | . ↓ . . N . . O . .
The atoms are labelled in order of the leftmost then topmost. 2 | ↑ 0 - 1 - 4 → ← 12 - | . | . ↑ . | . 3 - 6 - 7 - 8 - 10 - 11 → . | . | . ↓ . . 5 . . 9 . .
Definition at line 172 of file GraphOperationsTest.java.
References denoptim.ga.GraphOperationsTest.addRings(), denoptim.ga.GraphOperationsTest.buildFragment(), denoptim.ga.GraphOperationsTest.buildGraph(), denoptim.ga.GraphOperationsTest.getExpectedSubgraphs(), denoptim.graph.DGraph.renumberGraphVertices(), and denoptim.graph.DGraph.setScaffold().
Referenced by denoptim.ga.GraphOperationsTest.testExtractPattern_fusedRings().
|
private |
Generates a pair of graphs that include templates with free content.
The first graph is
(A)--(A)-m5 / m1-(A)--(A)-T1-(A)--(A)-m2-(B)--(B)-m3 \ (C)--(C)-m4
where template 'T1' is:
(A) (C) / / tv0-(A)--(A)-tv1-(B)--(C)-tv2-(A)--(A)-tv3-(A)- \ (A)--(A)-tv4-(A)--(A)-tv5-(A)-
And the second graph is
f1-(A)--(A)-T1-(A)--(A)-f2-(B)--(B)-f3-(C)--(C)-f4 \ (C)--(C)-f5
where template 'T2' is:
(C) / -(A)-tw1-(B)--(C)-tw2-(B)--(B)-tw3-(A)-(A)-tw4-(A)
Definition at line 644 of file GraphOperationsTest.java.
References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.DGraph.addVertex(), denoptim.ga.GraphOperationsTest.APCA, denoptim.ga.GraphOperationsTest.APCB, denoptim.ga.GraphOperationsTest.APCC, denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Template.ContractLevel.FREE, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.BBType.NONE, denoptim.ga.GraphOperationsTest.prepare(), denoptim.graph.Template.setContractLevel(), denoptim.graph.DGraph.setGraphId(), denoptim.graph.Template.setInnerGraph(), and denoptim.graph.Vertex.setProperty().
Referenced by denoptim.ga.GraphOperationsTest.testLocateCompatibleXOverPoints().
|
private |
Definition at line 355 of file GraphOperationsTest.java.
References denoptim.ga.GraphOperationsTest.rng.
Referenced by denoptim.ga.GraphOperationsTest.buildFragment().
|
private |
Returns a 3-cycle.
The S marks the scaffold vertex: /— S —\ / \ RCV -(chord)- RCV
Definition at line 373 of file GraphOperationsTest.java.
References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), and denoptim.graph.DGraph.renumberGraphVertices().
Referenced by denoptim.ga.GraphOperationsTest.testExtractPattern_returnsEmptyListIfNoRings(), and denoptim.ga.GraphOperationsTest.testExtractPattern_singleRingSystem().
|
private |
Sets the compatibility matrix (src -> trg);.
| A | B | C | D | --------------------------- A | T | | | | --------------------------- B | | T | T | | --------------------------- C | | | T | | --------------------------- D | | | | T |
Definition at line 819 of file GraphOperationsTest.java.
References denoptim.ga.GraphOperationsTest.APCA, denoptim.ga.GraphOperationsTest.APCB, denoptim.ga.GraphOperationsTest.APCC, denoptim.ga.GraphOperationsTest.APCD, denoptim.graph.APClass.make(), and denoptim.fragspace.FragmentSpace.setAPclassBasedApproach().
Referenced by denoptim.ga.GraphOperationsTest.getPairOfTestGraphs(), and denoptim.ga.GraphOperationsTest.testLocateCompatibleXOverPoints().
|
staticpackage |
Definition at line 95 of file GraphOperationsTest.java.
References denoptim.ga.GraphOperationsTest.DEFAULT_APCLASS, and denoptim.graph.APClass.make().
void denoptim.ga.GraphOperationsTest.testAddRing | ( | ) | throws Exception |
Definition at line 860 of file GraphOperationsTest.java.
References denoptim.graph.Fragment.addAP(), denoptim.ga.GraphOperations.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.ga.GraphOperationsTest.chemBuilder, denoptim.graph.Fragment.clone(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.rings.RingClosureParameters.getMaxRingSize(), denoptim.graph.DGraph.getRingCount(), denoptim.graph.APClass.make(), denoptim.graph.APClass.RCACLASSMINUS, denoptim.graph.APClass.RCACLASSPLUS, denoptim.graph.rings.RingClosingAttractor.RCALABELPERAPCLASS, denoptim.fragspace.FragmentSpace.setAPclassBasedApproach(), denoptim.graph.Vertex.setAsRCV(), denoptim.programs.RunTimeParameters.setParameters(), denoptim.graph.rings.RingClosureParameters.setRingSizeBias(), and denoptim.graph.Vertex.setVertexId().
void denoptim.ga.GraphOperationsTest.testExtendGraph | ( | ) | throws Exception |
Definition at line 995 of file GraphOperationsTest.java.
References denoptim.graph.Fragment.addAP(), denoptim.graph.Fragment.addAtom(), denoptim.graph.Fragment.addBond(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.ga.GraphOperationsTest.APCA, denoptim.ga.GraphOperationsTest.APCB, denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Fragment.clone(), denoptim.ga.GraphOperations.extendGraph(), denoptim.graph.Vertex.getAP(), denoptim.graph.DGraph.getSymmetricSetCount(), denoptim.graph.DGraph.getSymVerticesForVertex(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.getVertexCount(), denoptim.graph.APClass.make(), denoptim.fragspace.FragmentSpace.setAPclassBasedApproach(), denoptim.programs.RunTimeParameters.setParameters(), and denoptim.graph.Vertex.setVertexId().
void denoptim.ga.GraphOperationsTest.testExtractPattern_fusedRings | ( | ) | throws Throwable |
Definition at line 140 of file GraphOperationsTest.java.
References denoptim.graph.DGraph.extractPattern(), denoptim.ga.GraphOperationsTest.ExtractPatternCase.g, denoptim.ga.GraphOperationsTest.getFusedRings(), denoptim.ga.GraphOperationsTest.ExtractPatternCase.matchesExpected(), and denoptim.graph.GraphPattern.RING.
void denoptim.ga.GraphOperationsTest.testExtractPattern_returnsEmptyListIfNoRings | ( | ) | throws Throwable |
Definition at line 127 of file GraphOperationsTest.java.
References denoptim.graph.DGraph.extractPattern(), denoptim.graph.DGraph.getRings(), denoptim.ga.GraphOperationsTest.getThreeCycle(), denoptim.graph.DGraph.removeRing(), and denoptim.graph.GraphPattern.RING.
void denoptim.ga.GraphOperationsTest.testExtractPattern_singleRingSystem | ( | ) | throws Throwable |
Definition at line 106 of file GraphOperationsTest.java.
References denoptim.graph.DGraph.compareGraphNodes(), denoptim.graph.DGraph.extractPattern(), denoptim.graph.DGraph.getEdgeCount(), denoptim.graph.DGraph.getRingCount(), denoptim.graph.DGraph.getSourceVertex(), denoptim.ga.GraphOperationsTest.getThreeCycle(), denoptim.graph.DGraph.getVertexCount(), and denoptim.graph.GraphPattern.RING.
void denoptim.ga.GraphOperationsTest.testLocateCompatibleXOverPoints | ( | ) | throws Exception |
Definition at line 448 of file GraphOperationsTest.java.
References denoptim.graph.Template.ContractLevel.FIXED, denoptim.graph.Template.ContractLevel.FIXED_STRUCT, denoptim.graph.Template.ContractLevel.FREE, denoptim.graph.Template.getInnerGraph(), denoptim.utils.GraphUtils.getLabel(), denoptim.ga.GraphOperationsTest.getPairOfTestGraphs(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.indexOf(), denoptim.ga.GraphOperations.locateCompatibleXOverPoints(), denoptim.ga.GraphOperationsTest.prepare(), denoptim.graph.Template.setContractLevel(), denoptim.graph.Vertex.setProperty(), and denoptim.graph.Vertex.setUniquefyingProperty().
|
staticprivate |
Definition at line 86 of file GraphOperationsTest.java.
Referenced by denoptim.ga.GraphOperationsTest.getPairOfTestGraphs(), denoptim.ga.GraphOperationsTest.prepare(), and denoptim.ga.GraphOperationsTest.testExtendGraph().
|
staticprivate |
Definition at line 86 of file GraphOperationsTest.java.
Referenced by denoptim.ga.GraphOperationsTest.getPairOfTestGraphs(), denoptim.ga.GraphOperationsTest.prepare(), and denoptim.ga.GraphOperationsTest.testExtendGraph().
|
staticprivate |
Definition at line 86 of file GraphOperationsTest.java.
Referenced by denoptim.ga.GraphOperationsTest.getPairOfTestGraphs(), and denoptim.ga.GraphOperationsTest.prepare().
|
staticprivate |
Definition at line 86 of file GraphOperationsTest.java.
Referenced by denoptim.ga.GraphOperationsTest.prepare().
|
package |
Definition at line 88 of file GraphOperationsTest.java.
Referenced by denoptim.ga.GraphOperationsTest.buildFragment(), and denoptim.ga.GraphOperationsTest.testAddRing().
|
staticprivate |
Definition at line 90 of file GraphOperationsTest.java.
Referenced by denoptim.ga.GraphOperationsTest.buildFragment(), and denoptim.ga.GraphOperationsTest.setUpClass().
|
private |
Definition at line 89 of file GraphOperationsTest.java.
Referenced by denoptim.ga.GraphOperationsTest.getRandomVector().