$darkmode
DENOPTIM
denoptim.graph.DGraphTest Class Reference

Unit test for DENOPTIMGraph. More...

Collaboration diagram for denoptim.graph.DGraphTest:
[legend]

Public Member Functions

void testRemoveUnusedRCVs () throws Exception
 
void testGetEmbeddingPath () throws Exception
 
void testGetEmbeddedGraphInClone () throws Exception
 
void testGetSourceVertex () throws Exception
 
void testGetLevel () throws Exception
 
void testReplaceVertex () throws Exception
 
void testReplaceVertex_inRing () throws Exception
 
void testReplaceSubGraph () throws Exception
 
void testReplaceSubGraph_inTemplate () throws Exception
 
void testRemoveVertex () throws Exception
 
void testSameAs_Equal () throws DENOPTIMException
 
void testSameAs_DiffVertex () throws DENOPTIMException
 
void testSameAs_SameSymmSet () throws Exception
 
void testSameAs_DiffSymmSet () throws Exception
 
void testSameAs_SameRings () throws DENOPTIMException
 
void testSameAs_DisorderRings () throws Exception
 
void testSameAs_DiffRings () throws DENOPTIMException
 
void testGetAvailableAPs_returnsListOfAvailableAPs () throws DENOPTIMException
 
void testClone () throws DENOPTIMException
 
void testGetMutationSites () throws DENOPTIMException
 
void testRemoveCapping () throws Exception
 
void testFromToJSON () throws Exception
 
void testGraphIsomorphism () throws Exception
 
void testExtractSubgraph () throws Exception
 
void testExtractSubgraphFromCollection () throws Exception
 
void testFindVertex () throws Exception
 
void testSymmetricSetLabels () throws Exception
 
void testConvertSymmetricLabelsToSymmetricSets () throws Exception
 
void testGetSymmetricSubGraphs () throws Exception
 
void testGetChildrenTree () throws Exception
 
void testGetChildrenTreeWithBranchIdentifier () throws Exception
 
void testGetInterfaceAPs () throws Exception
 
void testGetSubgraphAPs () throws Exception
 
DGraph[] makeIsostructuralGraphs () throws Exception
 
void testIsIsostructuralTo () throws Exception
 
void testGetEdgesWithSrcOrTrg () throws Exception
 
void testEmbedPatternsInTemplates () throws Exception
 
void testDetectSymVertexSets () throws Exception
 

Static Public Member Functions

static FragmentSpace prepare () throws DENOPTIMException
 
static DGraph makeDeeplyEmbeddedGraph () throws DENOPTIMException
 Returns a graph that contains a 10-layered recursive structure. More...
 
static DGraph makeTestGraphA ()
 Build a graph meant to be used in unit tests. More...
 
static DGraph makeTestGraphA2 ()
 Build a graph meant to be used in unit tests. More...
 
static DGraph makeTestGraphM () throws DENOPTIMException
 Returns a graph with definition of symmetric vertexes and symmetric APs meant for testing purposes. More...
 
static DGraph makeTestGraphN () throws DENOPTIMException
 Returns a graph with peculiar definition of symmetric vertexes and symmetric APs meant for testing purposes. More...
 

Private Member Functions

DGraph makeTestGraphB (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphC (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphD (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphDSub1 (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphDSub2 (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphE (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphF (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphG (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphH (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphI (FragmentSpace fs) throws Exception
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphJ (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphK (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeTestGraphL (FragmentSpace fs) throws DENOPTIMException
 Creates a test graph that looks like this: More...
 
DGraph makeDisorderedGraph (FragmentSpace fs) throws DENOPTIMException
 Makes a graph with disordered list of vertexes, i.e., the first vertex is not the source. More...
 
void buildVertexAndConnectToGraph (EmptyVertex v, int apCount, DGraph graph) throws DENOPTIMException
 

Static Private Member Functions

static DGraph makeTestGraph0 (FragmentSpace fs) throws Exception
 Build a graph meant to be used in unit tests. More...
 
static DGraph makeTestGraph1 (FragmentSpace fs) throws Exception
 Build a graph meant to be used in unit tests. More...
 

Static Private Attributes

static APClass APCA
 
static APClass APCB
 
static APClass APCC
 
static APClass APCD
 
static APClass CAPP
 
static String a ="A"
 
static String b ="B"
 
static String c ="C"
 
static String d ="D"
 
static String cap ="cap"
 

Detailed Description

Unit test for DENOPTIMGraph.

Author
Marco Foscato

Definition at line 72 of file DGraphTest.java.

Member Function Documentation

◆ buildVertexAndConnectToGraph()

◆ makeDeeplyEmbeddedGraph()

static DGraph denoptim.graph.DGraphTest.makeDeeplyEmbeddedGraph ( ) throws DENOPTIMException
static

Returns a graph that contains a 10-layered recursive structure.

Before running this you must run DGraphTest#prepare()

Definition at line 1282 of file DGraphTest.java.

References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraphTest.APCA, denoptim.graph.DGraphTest.APCB, denoptim.graph.DGraphTest.APCC, denoptim.graph.DGraphTest.APCD, denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.getAP(), denoptim.graph.Template.setInnerGraph(), and denoptim.graph.Vertex.BBType.UNDEFINED.

Referenced by denoptim.graph.DGraphTest.testGetEmbeddedGraphInClone(), denoptim.graph.DGraphTest.testGetEmbeddingPath(), and denoptim.ga.XoverSiteTest.testProjectToClonedGraphs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeDisorderedGraph()

DGraph denoptim.graph.DGraphTest.makeDisorderedGraph ( FragmentSpace  fs) throws DENOPTIMException
private

Makes a graph with disordered list of vertexes, i.e., the first vertex is not the source.


v5-0-->0-v3-1-->1-v4-0-->0-v1-1-->0-v2

Returns
a disordered graph
Exceptions
DENOPTIMException

Definition at line 1248 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), and denoptim.graph.Vertex.newVertexFromLibrary().

Referenced by denoptim.graph.DGraphTest.testGetLevel(), and denoptim.graph.DGraphTest.testGetSourceVertex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeIsostructuralGraphs()

DGraph[] denoptim.graph.DGraphTest.makeIsostructuralGraphs ( ) throws Exception

Definition at line 3644 of file DGraphTest.java.

References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraphTest.APCA, denoptim.graph.DGraphTest.APCB, denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.setAsRCV(), denoptim.graph.Vertex.setProperty(), and denoptim.graph.Vertex.setUniquefyingProperty().

Referenced by denoptim.graph.DGraphTest.testIsIsostructuralTo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraph0()

static DGraph denoptim.graph.DGraphTest.makeTestGraph0 ( FragmentSpace  fs) throws Exception
staticprivate

Build a graph meant to be used in unit tests.

The returned graph has only the scaffold.

Returns
a new instance of the test graph.

Definition at line 2528 of file DGraphTest.java.

References denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.newVertexFromLibrary(), and denoptim.graph.Vertex.BBType.SCAFFOLD.

Referenced by denoptim.graph.DGraphTest.testGraphIsomorphism(), and denoptim.graph.DGraphTest.testIsIsostructuralTo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraph1()

static DGraph denoptim.graph.DGraphTest.makeTestGraph1 ( FragmentSpace  fs) throws Exception
staticprivate

Build a graph meant to be used in unit tests.

The returned graph has only the scaffold and one vertex, plus the edge

Returns
a new instance of the test graph.

Definition at line 2545 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), and denoptim.graph.Vertex.BBType.SCAFFOLD.

Referenced by denoptim.graph.DGraphTest.testGraphIsomorphism(), and denoptim.graph.DGraphTest.testIsIsostructuralTo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphA()

static DGraph denoptim.graph.DGraphTest.makeTestGraphA ( )
static

Build a graph meant to be used in unit tests.

The returned graph has the following structure:

       (free)
       ap2
      /
[C1-C0-ap0]-[ap0-O-ap1]-[ap0-H]
 |    \
 ap3   ap1
 |       \
(free)    [ap0-H]
Returns
a new instance of the test graph.

Definition at line 2578 of file DGraphTest.java.

References denoptim.graph.Fragment.addAP(), denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.CAP, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), and denoptim.graph.Vertex.BBType.SCAFFOLD.

Referenced by denoptim.ga.EAUtilsTest.testCrowdingProbability().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphA2()

static DGraph denoptim.graph.DGraphTest.makeTestGraphA2 ( )
static

Build a graph meant to be used in unit tests.

The structure of the graph is the following:

         [ap1-EV1-ap0]-[ap0-EV2]
        /
       ap2
      /
[C1-C0-ap0]-[ap0-O-ap1]-[ap0-H]
 |    \
 ap3   ap1
 |       \
 |        [ap0-H]
 [ap0-EV3] 

Contrary to test graph A, this graph contains:

  • mixture of vertex types
  • APClasses
Returns
a new instance of the test graph.

Definition at line 2667 of file DGraphTest.java.

References denoptim.graph.DGraphTest.a, denoptim.graph.EmptyVertex.addAP(), denoptim.graph.Fragment.addAP(), denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraphTest.b, denoptim.graph.DGraphTest.c, denoptim.graph.Vertex.BBType.CAP, denoptim.graph.DGraphTest.d, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.APClass.make(), denoptim.graph.Edge.BondType.NONE, denoptim.graph.Vertex.BBType.SCAFFOLD, denoptim.graph.Vertex.setBuildingBlockId(), denoptim.graph.Edge.BondType.SINGLE, and denoptim.graph.Edge.BondType.TRIPLE.

Referenced by denoptim.graph.DGraphTest.testFindVertex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphB()

DGraph denoptim.graph.DGraphTest.makeTestGraphB ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:

       (C)-(C)-v3
      /
     | (B)-(B)-v2
     |/
 (A)-v1-(B)-(B)-v2
      |
     (A)
      |
     (A)
   scaffold
     (A)
      |
     0(A)
      |
2(A)-v1-1(B)-(B)-v2
     |\
     | 3(B)-(B)-v2
     \
      4(C)-(C)-v3
  

Definition at line 233 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), denoptim.graph.DGraph.renumberGraphVertices(), and denoptim.graph.Vertex.BBType.SCAFFOLD.

Referenced by denoptim.graph.DGraphTest.testGraphIsomorphism(), denoptim.graph.DGraphTest.testIsIsostructuralTo(), denoptim.graph.DGraphTest.testReplaceVertex(), and denoptim.graph.DGraphTest.testSymmetricSetLabels().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphC()

DGraph denoptim.graph.DGraphTest.makeTestGraphC ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:

    v1-(B)-(B)-v1-(B)-(B)-v1-(B)-(B)-v1
     |           \
    (A)           (A)-(A)-v0
     |
    (A)
  scaffold
    (A)
     |
    0(A)
     |
     v1-1(B)-(B)-v1-(B)-(B)-v1-(B)-(B)-v1
 

Definition at line 309 of file DGraphTest.java.

References denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), denoptim.graph.DGraph.renumberGraphVertices(), and denoptim.graph.Vertex.BBType.SCAFFOLD.

Referenced by denoptim.graph.DGraphTest.testGetLevel(), and denoptim.graph.DGraphTest.testGetSourceVertex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphD()

DGraph denoptim.graph.DGraphTest.makeTestGraphD ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:

       (C)-(C)-v6-(D)--(B)-v7
       /                    |
      /                   chord
     |                      |
     | (B)-(C)-v6-(D)--(B)-v7
     |/
 (A)-v1-(B)-(C)-v6-(D)--(B)-v7
      |                     |
     (A)                    |
      |                   chord
     (A)                    |
   scaffold(D)----------(B)-v7
     (A)
      |
     0(A)
      |
     v1
      |
     2(A)
      |
     0(A)
      |
2(A)-v1-1(B)-(B)-v2
     |\
     | 3(B)-(B)-v2
     \
      4(C)-(C)-v3
  

Definition at line 405 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), denoptim.graph.DGraph.renumberGraphVertices(), and denoptim.graph.Vertex.BBType.SCAFFOLD.

Referenced by denoptim.graph.DGraphTest.testExtractSubgraph(), denoptim.graph.DGraphTest.testExtractSubgraphFromCollection(), denoptim.graph.DGraphTest.testGetChildrenTree(), denoptim.graph.DGraphTest.testGetChildrenTreeWithBranchIdentifier(), denoptim.graph.DGraphTest.testGraphIsomorphism(), denoptim.graph.DGraphTest.testIsIsostructuralTo(), denoptim.graph.DGraphTest.testReplaceSubGraph(), and denoptim.graph.DGraphTest.testReplaceVertex_inRing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphDSub1()

DGraph denoptim.graph.DGraphTest.makeTestGraphDSub1 ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:

      (C)-(C)-v6-(D)--(B)-v7
      /                    |
     /                   chord
    |                      |
    | (B)-(C)-v6-(D)--(B)-v7
    |/
(A)-v1-(B)-(C)-v6-(D)--(B)-v7
 

Definition at line 501 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), and denoptim.graph.DGraph.renumberGraphVertices().

Referenced by denoptim.graph.DGraphTest.testExtractSubgraph(), and denoptim.graph.DGraphTest.testIsIsostructuralTo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphDSub2()

DGraph denoptim.graph.DGraphTest.makeTestGraphDSub2 ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:

       0(A)
      /
2(A)-v1-1(B)-(B)-v2
     |\
     | 3(B)-(B)-v2
     \
      4(C)-(C)-v3
  

Definition at line 556 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), and denoptim.graph.DGraph.renumberGraphVertices().

Referenced by denoptim.graph.DGraphTest.testExtractSubgraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphE()

DGraph denoptim.graph.DGraphTest.makeTestGraphE ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:


2(A)-v1-1(B)-2(A)-v1(*)-1(B)-2(A)-v1(**)
     | \           |\
     |  |          | 3(B)-2(A)-v1(**)
     |  |
     |  3(B)-2(A)-v1(*)-1(B)-2(A)-v1
     |             |\
     |             | 3(B)-2(A)-v1
     \
      4(C)-2(A)-v1
  

where only those marked with a star are included in the symmetric sets.

Definition at line 605 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), and denoptim.graph.DGraph.renumberGraphVertices().

Referenced by denoptim.graph.DGraphTest.testConvertSymmetricLabelsToSymmetricSets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphF()

DGraph denoptim.graph.DGraphTest.makeTestGraphF ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:

      (C)-(C)-v6-(D)--(D)-v7
      /                    |
     /                   chord
    |                      |
    | (B)-(C)-v6-(D)--(D)-v7  
    |  |
    | /     (B)  (A)           (B) 
    |/         \/              /
(A)-v1-(B)-(B)-v1-(A)--(A)-v1--(B)
     |          |          |\
    (A)         |          | (C)
                |         (A)  
                |
                (C)--(C)-v6-(D)



 

Definition at line 683 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), and denoptim.graph.DGraph.renumberGraphVertices().

Referenced by denoptim.graph.DGraphTest.testGetEdgesWithSrcOrTrg(), denoptim.graph.DGraphTest.testGetSymmetricSubGraphs(), and denoptim.graph.DGraphTest.testReplaceSubGraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphG()

DGraph denoptim.graph.DGraphTest.makeTestGraphG ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:


       (C)-(C)-v6-(D)--(B)-v7
       /                    |
      /                   chord
     |                      |
     | (B)-(C)-v6-(D)--(B)-v7  
     |  |            --------------(C)-v6-(D)--(B)-v7  
     |  /           /                              |
     | /     (A)  (B)           (B)                |
     |/         \/              /                chord
 (A)-v1-(B)-(B)-v1-(A)--(A)-v1--(B)                | 
      |          |          |\                     |
     (A)         |          | (C)--(C)-v6-(D)--(B)-v7 
      |          |          |
      |          |         (A)--(C)-v6-(D)--(B)-v7  
      |          |                              |
      |          |                            chord
      |          |                              |
      |          ---------(C)--(C)-v6-(D)--(B)--v7                
      |                    
     0(A)
      |
     v1
      |
     2(A)
      |
     0(A)
      |
2(A)-v1-1(B)-(B)-v2
     |\
     | 3(B)-(B)-v2
     \
      4(C)-(C)-v3

  

This is the result of replacing two vertexes in graph D with Graph F and welding connections.

Definition at line 780 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), and denoptim.graph.Vertex.newVertexFromLibrary().

Referenced by denoptim.graph.DGraphTest.testReplaceSubGraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphH()

DGraph denoptim.graph.DGraphTest.makeTestGraphH ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:

      (C)-(C)-v6-(D)--(B)-v7
      /                    |
     /                   chord
    |                      |
    | (B)-(C)-v6-(D)--(B)-v7
    |/
(A)-v1-(B)
     \
      (A)
 

Definition at line 913 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), and denoptim.graph.DGraph.renumberGraphVertices().

Referenced by denoptim.graph.DGraphTest.makeTestGraphI().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphI()

DGraph denoptim.graph.DGraphTest.makeTestGraphI ( FragmentSpace  fs) throws Exception
private

Creates a test graph that looks like this:

      (A)-(C)-v6-(D)--(B)-v7
      /                    |
     /                   chord
    |                      |
    | (B)-(C)-v6-(D)--(B)-v7
    |/
template-(A)
 

Definition at line 960 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.DGraphTest.makeTestGraphH(), denoptim.graph.Vertex.newVertexFromLibrary(), denoptim.graph.DGraph.renumberGraphVertices(), and denoptim.graph.Template.setInnerGraph().

Referenced by denoptim.graph.DGraphTest.testGetInterfaceAPs(), denoptim.graph.DGraphTest.testGetSubgraphAPs(), and denoptim.graph.DGraphTest.testReplaceSubGraph_inTemplate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphJ()

DGraph denoptim.graph.DGraphTest.makeTestGraphJ ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:

              
                    0(A)
                   /
       0(A)--2(A)-v1-1(B)
      /           | \
2(A)-v1-1(B)       \  3(B)
     |\             4(C)
     | 3(B)
     \
      4(C)
  


Definition at line 1011 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), and denoptim.graph.DGraph.renumberGraphVertices().

Referenced by denoptim.graph.DGraphTest.testReplaceSubGraph_inTemplate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphK()

DGraph denoptim.graph.DGraphTest.makeTestGraphK ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:

      (C)-(C)-v6-(D)--(C)-v1-(capped)
     /
    | (B)-(C)-v6*-(D)--(C)-v1**-(capped)
    |/
(A)-v1-(B)-(C)-v6*-(D)--(C)-v1**-(capped)

 

where vertexes marked with either * or ** are in symmetric sets, and "capped" means all APs have been used by capping groups.

Definition at line 1042 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.BBType.CAP, denoptim.graph.DGraphTest.cap, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), and denoptim.graph.DGraph.renumberGraphVertices().

Referenced by denoptim.graph.DGraphTest.testGetSymmetricSubGraphs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphL()

DGraph denoptim.graph.DGraphTest.makeTestGraphL ( FragmentSpace  fs) throws DENOPTIMException
private

Creates a test graph that looks like this:

       (C)-(C)-v6-(D)--(B)-v7
       /                    |
      /                   chord
     |                      |
     | (B)-(C)-v6-(D)--(B)-v7
     |/
 (A)-v1-(B)
      |
     0(A)
      |
     2(A)
      |
  (B)-v1-(C)-v6-(D)--(B)-v7
      |                  |
     0(A)                 |
      |                chord
     (A)                 |
   v1_scaffold(D)-------(B)-v7
     (A)
      |
     0(A)
      |
     v1
      |
     2(A)
      |
     0(A)
      |
2(A)-v1-1(B)-(B)-v2
     |\
     | 3(B)-(B)-v2
     \
      4(C)-(C)-v3
  

Definition at line 1150 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.newVertexFromLibrary(), denoptim.graph.DGraph.renumberGraphVertices(), and denoptim.graph.Vertex.BBType.SCAFFOLD.

Referenced by denoptim.graph.DGraphTest.testEmbedPatternsInTemplates().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphM()

static DGraph denoptim.graph.DGraphTest.makeTestGraphM ( ) throws DENOPTIMException
static

Returns a graph with definition of symmetric vertexes and symmetric APs meant for testing purposes.

Before running this you must run DGraphTest#prepare()

This is the graph we return (symmetric APs are marked by s and s'):

              s(B)-(B)-v3
             / 
       (A)-v1-s(B)-(B)-v4
       /     \
      /       s(B)-(B)-v5
     /
  s(A)  s'(B)-v9  
 /     /
v0==== 
 \     \
  s(A)   s'(B)-v10
    |
     \        s(B)-(B)-v6
      \      / 
       (A)-v2-s(B)-(B)-v7
             \
              s(B)-(B)-v8

Definition at line 3890 of file DGraphTest.java.

References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.EmptyVertex.addSymmetricAPSet(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraphTest.APCA, denoptim.graph.DGraphTest.APCB, denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.EmptyVertex.clone(), denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.BBType.SCAFFOLD, denoptim.graph.Vertex.setBuildingBlockType(), and denoptim.graph.Vertex.setVertexId().

Referenced by denoptim.graph.DGraphTest.testDetectSymVertexSets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeTestGraphN()

static DGraph denoptim.graph.DGraphTest.makeTestGraphN ( ) throws DENOPTIMException
static

Returns a graph with peculiar definition of symmetric vertexes and symmetric APs meant for testing purposes.

Before running this you must run DGraphTest#prepare()

This is the graph we return (symmetric APs are marked by s and s'):

              s(B)-(B)-v3
             / 
       (B)s-v1-s(B)-(B)-v4
       /     \
      /       s(B)-(B)-v5                     s(B)     
     /                                       /
  s(B)  s(B)---------------------------(B)s-v9-s(B)  
 /     /                                     \
v0====        (v0 is SCAFFOLD!)               s(B)  
 \     \
  s(B)  s(B)
    |
     \        s(B)-(B)-v6
      \      / 
       (B)s-v2-s(B)-(B)-v7
             \
              s(B)

Definition at line 3978 of file DGraphTest.java.

References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.EmptyVertex.addSymmetricAPSet(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraphTest.APCB, denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.EmptyVertex.clone(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.BBType.SCAFFOLD, denoptim.graph.Vertex.setBuildingBlockType(), and denoptim.graph.Vertex.setVertexId().

Here is the call graph for this function:

◆ prepare()

static FragmentSpace denoptim.graph.DGraphTest.prepare ( ) throws DENOPTIMException
static

Definition at line 81 of file DGraphTest.java.

References denoptim.graph.DGraphTest.a, denoptim.graph.EmptyVertex.addAP(), denoptim.graph.Edge.BondType.ANY, denoptim.graph.DGraphTest.APCA, denoptim.graph.DGraphTest.APCB, denoptim.graph.DGraphTest.APCC, denoptim.graph.DGraphTest.APCD, denoptim.fragspace.FragmentSpace.appendVertexToLibrary(), denoptim.graph.DGraphTest.b, denoptim.graph.DGraphTest.c, denoptim.graph.Vertex.BBType.CAP, denoptim.graph.DGraphTest.cap, denoptim.graph.DGraphTest.CAPP, denoptim.graph.DGraphTest.d, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.fragspace.FragmentSpace.getCappingLibrary(), denoptim.fragspace.FragmentSpace.getFragmentLibrary(), denoptim.fragspace.FragmentSpace.getScaffoldLibrary(), denoptim.graph.APClass.make(), denoptim.graph.Vertex.BBType.SCAFFOLD, denoptim.fragspace.FragmentSpace.setAPclassBasedApproach(), denoptim.graph.Vertex.setAsRCV(), and denoptim.graph.Vertex.setBuildingBlockType().

Referenced by denoptim.graph.DGraphTest.testConvertSymmetricLabelsToSymmetricSets(), denoptim.graph.DGraphTest.testDetectSymVertexSets(), denoptim.graph.DGraphTest.testEmbedPatternsInTemplates(), denoptim.graph.DGraphTest.testExtractSubgraph(), denoptim.graph.DGraphTest.testExtractSubgraphFromCollection(), denoptim.graph.DGraphTest.testGetChildrenTree(), denoptim.graph.DGraphTest.testGetChildrenTreeWithBranchIdentifier(), denoptim.graph.DGraphTest.testGetEdgesWithSrcOrTrg(), denoptim.graph.DGraphTest.testGetEmbeddedGraphInClone(), denoptim.graph.DGraphTest.testGetEmbeddingPath(), denoptim.graph.DGraphTest.testGetInterfaceAPs(), denoptim.graph.DGraphTest.testGetLevel(), denoptim.graph.DGraphTest.testGetSourceVertex(), denoptim.graph.DGraphTest.testGetSubgraphAPs(), denoptim.graph.DGraphTest.testGetSymmetricSubGraphs(), denoptim.graph.DGraphTest.testGraphIsomorphism(), denoptim.graph.DGraphTest.testIsIsostructuralTo(), denoptim.ga.XoverSiteTest.testProjectToClonedGraphs(), denoptim.graph.DGraphTest.testReplaceSubGraph(), denoptim.graph.DGraphTest.testReplaceSubGraph_inTemplate(), denoptim.graph.DGraphTest.testReplaceVertex(), denoptim.graph.DGraphTest.testReplaceVertex_inRing(), and denoptim.graph.DGraphTest.testSymmetricSetLabels().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testClone()

◆ testConvertSymmetricLabelsToSymmetricSets()

void denoptim.graph.DGraphTest.testConvertSymmetricLabelsToSymmetricSets ( ) throws Exception

◆ testDetectSymVertexSets()

void denoptim.graph.DGraphTest.testDetectSymVertexSets ( ) throws Exception

Definition at line 4030 of file DGraphTest.java.

References denoptim.graph.DGraph.detectSymVertexSets(), denoptim.graph.DGraph.getSymmetricSetCount(), denoptim.graph.DGraph.getSymSetForVertex(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraphTest.makeTestGraphM(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testEmbedPatternsInTemplates()

void denoptim.graph.DGraphTest.testEmbedPatternsInTemplates ( ) throws Exception

◆ testExtractSubgraph()

void denoptim.graph.DGraphTest.testExtractSubgraph ( ) throws Exception

◆ testExtractSubgraphFromCollection()

void denoptim.graph.DGraphTest.testExtractSubgraphFromCollection ( ) throws Exception

Definition at line 3038 of file DGraphTest.java.

References denoptim.graph.DGraph.extractSubgraph(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.getVertexCount(), denoptim.graph.DGraph.getVertexWithId(), denoptim.graph.DGraphTest.makeTestGraphD(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testFindVertex()

◆ testFromToJSON()

void denoptim.graph.DGraphTest.testFromToJSON ( ) throws Exception

◆ testGetAvailableAPs_returnsListOfAvailableAPs()

void denoptim.graph.DGraphTest.testGetAvailableAPs_returnsListOfAvailableAPs ( ) throws DENOPTIMException

Definition at line 2381 of file DGraphTest.java.

References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.getAP(), denoptim.graph.DGraph.getAvailableAPs(), and denoptim.graph.Vertex.getVertexId().

Here is the call graph for this function:

◆ testGetChildrenTree()

void denoptim.graph.DGraphTest.testGetChildrenTree ( ) throws Exception

Definition at line 3494 of file DGraphTest.java.

References denoptim.graph.DGraph.getChildrenTree(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraphTest.makeTestGraphD(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testGetChildrenTreeWithBranchIdentifier()

void denoptim.graph.DGraphTest.testGetChildrenTreeWithBranchIdentifier ( ) throws Exception

Definition at line 3534 of file DGraphTest.java.

References denoptim.graph.DGraph.directedPathExists(), denoptim.graph.DGraph.getBranchIdOfVertexAtPosition(), denoptim.graph.DGraph.getChildrenTree(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraphTest.makeTestGraphD(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testGetEdgesWithSrcOrTrg()

void denoptim.graph.DGraphTest.testGetEdgesWithSrcOrTrg ( ) throws Exception

Definition at line 3814 of file DGraphTest.java.

References denoptim.graph.DGraph.getEdgesWithSrc(), denoptim.graph.DGraph.getEdgesWithTrg(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraphTest.makeTestGraphF(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testGetEmbeddedGraphInClone()

void denoptim.graph.DGraphTest.testGetEmbeddedGraphInClone ( ) throws Exception

Definition at line 1473 of file DGraphTest.java.

References denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.getEmbeddedGraphInClone(), denoptim.graph.DGraph.getEmbeddingPath(), denoptim.graph.Template.getInnerGraph(), denoptim.graph.DGraphTest.makeDeeplyEmbeddedGraph(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testGetEmbeddingPath()

void denoptim.graph.DGraphTest.testGetEmbeddingPath ( ) throws Exception

Definition at line 1445 of file DGraphTest.java.

References denoptim.graph.DGraph.getEmbeddingPath(), denoptim.graph.Template.getInnerGraph(), denoptim.graph.DGraphTest.makeDeeplyEmbeddedGraph(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testGetInterfaceAPs()

void denoptim.graph.DGraphTest.testGetInterfaceAPs ( ) throws Exception

Definition at line 3579 of file DGraphTest.java.

References denoptim.graph.Vertex.getAP(), denoptim.graph.DGraph.getInterfaceAPs(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraphTest.makeTestGraphI(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testGetLevel()

void denoptim.graph.DGraphTest.testGetLevel ( ) throws Exception

Definition at line 1545 of file DGraphTest.java.

References denoptim.graph.DGraph.getLevel(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.getVertexCount(), denoptim.graph.DGraphTest.makeDisorderedGraph(), denoptim.graph.DGraphTest.makeTestGraphC(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testGetMutationSites()

void denoptim.graph.DGraphTest.testGetMutationSites ( ) throws DENOPTIMException

Definition at line 2499 of file DGraphTest.java.

References denoptim.graph.DGraph.addVertex(), denoptim.graph.Template.ContractLevel.FIXED, denoptim.graph.Template.ContractLevel.FREE, denoptim.graph.DGraph.getMutableSites(), and denoptim.graph.Template.getTestTemplate().

Here is the call graph for this function:

◆ testGetSourceVertex()

void denoptim.graph.DGraphTest.testGetSourceVertex ( ) throws Exception

Definition at line 1528 of file DGraphTest.java.

References denoptim.graph.DGraph.getSourceVertex(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraphTest.makeDisorderedGraph(), denoptim.graph.DGraphTest.makeTestGraphC(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testGetSubgraphAPs()

void denoptim.graph.DGraphTest.testGetSubgraphAPs ( ) throws Exception

Definition at line 3617 of file DGraphTest.java.

References denoptim.graph.Vertex.getAP(), denoptim.graph.DGraph.getSubgraphAPs(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraphTest.makeTestGraphI(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testGetSymmetricSubGraphs()

void denoptim.graph.DGraphTest.testGetSymmetricSubGraphs ( ) throws Exception

Definition at line 3438 of file DGraphTest.java.

References denoptim.graph.DGraph.getSymmetricSubGraphs(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.Vertex.getVertexId(), denoptim.graph.DGraphTest.makeTestGraphF(), denoptim.graph.DGraphTest.makeTestGraphK(), and denoptim.graph.DGraphTest.prepare().

Here is the call graph for this function:

◆ testGraphIsomorphism()

◆ testIsIsostructuralTo()

◆ testRemoveCapping()

◆ testRemoveUnusedRCVs()

◆ testRemoveVertex()

◆ testReplaceSubGraph()

◆ testReplaceSubGraph_inTemplate()

◆ testReplaceVertex()

◆ testReplaceVertex_inRing()

void denoptim.graph.DGraphTest.testReplaceVertex_inRing ( ) throws Exception

Definition at line 1702 of file DGraphTest.java.

References denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.isIsomorphicTo(), denoptim.graph.DGraphTest.makeTestGraphD(), denoptim.graph.DGraphTest.prepare(), and denoptim.graph.DGraph.replaceVertex().

Here is the call graph for this function:

◆ testSameAs_DiffRings()

void denoptim.graph.DGraphTest.testSameAs_DiffRings ( ) throws DENOPTIMException

Definition at line 2305 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraphTest.buildVertexAndConnectToGraph(), denoptim.graph.Vertex.getAP(), and denoptim.graph.DGraph.sameAs().

Here is the call graph for this function:

◆ testSameAs_DiffSymmSet()

void denoptim.graph.DGraphTest.testSameAs_DiffSymmSet ( ) throws Exception

Definition at line 2081 of file DGraphTest.java.

References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraphTest.buildVertexAndConnectToGraph(), denoptim.graph.Vertex.getAP(), and denoptim.graph.DGraph.sameAs().

Here is the call graph for this function:

◆ testSameAs_DiffVertex()

void denoptim.graph.DGraphTest.testSameAs_DiffVertex ( ) throws DENOPTIMException

Definition at line 1972 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraphTest.buildVertexAndConnectToGraph(), denoptim.graph.Vertex.getAP(), and denoptim.graph.DGraph.sameAs().

Here is the call graph for this function:

◆ testSameAs_DisorderRings()

void denoptim.graph.DGraphTest.testSameAs_DisorderRings ( ) throws Exception

Definition at line 2227 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraphTest.buildVertexAndConnectToGraph(), denoptim.graph.Vertex.getAP(), and denoptim.graph.DGraph.sameAs().

Here is the call graph for this function:

◆ testSameAs_Equal()

void denoptim.graph.DGraphTest.testSameAs_Equal ( ) throws DENOPTIMException

Definition at line 1937 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraphTest.buildVertexAndConnectToGraph(), denoptim.graph.Vertex.getAP(), and denoptim.graph.DGraph.sameAs().

Here is the call graph for this function:

◆ testSameAs_SameRings()

void denoptim.graph.DGraphTest.testSameAs_SameRings ( ) throws DENOPTIMException

Definition at line 2149 of file DGraphTest.java.

References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraphTest.buildVertexAndConnectToGraph(), denoptim.graph.Vertex.getAP(), and denoptim.graph.DGraph.sameAs().

Here is the call graph for this function:

◆ testSameAs_SameSymmSet()

void denoptim.graph.DGraphTest.testSameAs_SameSymmSet ( ) throws Exception

Definition at line 2007 of file DGraphTest.java.

References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraphTest.buildVertexAndConnectToGraph(), denoptim.graph.Vertex.getAP(), and denoptim.graph.DGraph.sameAs().

Here is the call graph for this function:

◆ testSymmetricSetLabels()

void denoptim.graph.DGraphTest.testSymmetricSetLabels ( ) throws Exception

Member Data Documentation

◆ a

String denoptim.graph.DGraphTest.a ="A"
staticprivate

◆ APCA

◆ APCB

◆ APCC

◆ APCD

◆ b

String denoptim.graph.DGraphTest.b ="B"
staticprivate

◆ c

String denoptim.graph.DGraphTest.c ="C"
staticprivate

◆ cap

String denoptim.graph.DGraphTest.cap ="cap"
staticprivate

◆ CAPP

APClass denoptim.graph.DGraphTest.CAPP
staticprivate

Definition at line 75 of file DGraphTest.java.

Referenced by denoptim.graph.DGraphTest.prepare().

◆ d

String denoptim.graph.DGraphTest.d ="D"
staticprivate

The documentation for this class was generated from the following file: