$darkmode
DENOPTIM
|
This class collects the data identifying the subgraphs that would be swapped by a crossover event. More...
Public Member Functions | |
XoverSite () | |
Initiate an empty data structure. More... | |
XoverSite (List< Vertex > subGraphA, List< Vertex > subGraphB, CrossoverType xoverType) | |
Create a site by listing the vertexes that belong to each of the subgraphs that should be swapped by a crossover operation. More... | |
XoverSite (List< Vertex > subGraphA, List< AttachmentPoint > needyAPsOnA, List< Vertex > subGraphB, List< AttachmentPoint > needyAPsOnB, CrossoverType xoverType) | |
Create a site by listing the vertexes that belong to each of the subgraphs that should be swapped by a crossover operation. More... | |
XoverSite | createMirror () |
Creates a new XoverSite that considers the opposite order of candidates of this one. More... | |
XoverSite | clone () |
Creates a new XoverSite that contains the same information of this one, i.e., a shallow copy. More... | |
List< Vertex > | getA () |
Returns the collection of vertexes belonging to the first subgraph. More... | |
List< Vertex > | getB () |
Returns the collection of vertexes belonging to the second subgraph. More... | |
List< AttachmentPoint > | getAPsNeedingMappingA () |
Returns the collection of attachment points that need to be mapped in order to achieve a valid crossover that swaps the subgraphs and respects the requirements of each side. More... | |
List< AttachmentPoint > | getAPsNeedingMappingB () |
Returns the collection of attachment points that need to be mapped in order to achieve a valid crossover that swaps the subgraphs and respects the requirements of each side. More... | |
CrossoverType | getType () |
Returns the type of crossover. More... | |
boolean | equals (Object o) |
Compares this and another instance. More... | |
XoverSite | projectToClonedGraphs () throws DENOPTIMException |
Creates a new instance of this class that contains the list of vertexes that correspond to those contained in this XoverSite but with references to the vertexes of an entirely new pair of graphs made as clones of the original graphs. More... | |
String | toString () |
Produced a string for showing what this object is. More... | |
Private Attributes | |
List< Vertex > | subGraphA = null |
One of the two subgraphs. More... | |
List< AttachmentPoint > | needyAPsOnA = null |
List of attachment points on subgraph B and that need to be replaced by a corresponding attachment point in case of crossover. More... | |
List< Vertex > | subGraphB = null |
The other of the two subgraphs. More... | |
List< AttachmentPoint > | needyAPsOnB = null |
List of attachment points on subgraph A and that need to be replaced by a corresponding attachment point in case of crossover. More... | |
CrossoverType | xoverType = null |
Type of crossover. More... | |
This class collects the data identifying the subgraphs that would be swapped by a crossover event.
Definition at line 35 of file XoverSite.java.
denoptim.ga.XoverSite.XoverSite | ( | ) |
Initiate an empty data structure.
Definition at line 77 of file XoverSite.java.
References denoptim.ga.XoverSite.needyAPsOnA, denoptim.ga.XoverSite.needyAPsOnB, denoptim.ga.XoverSite.subGraphA, and denoptim.ga.XoverSite.subGraphB.
Referenced by denoptim.ga.XoverSite.clone(), denoptim.ga.XoverSite.createMirror(), denoptim.ga.XoverSite.equals(), and denoptim.ga.XoverSite.projectToClonedGraphs().
denoptim.ga.XoverSite.XoverSite | ( | List< Vertex > | subGraphA, |
List< Vertex > | subGraphB, | ||
CrossoverType | xoverType | ||
) |
Create a site by listing the vertexes that belong to each of the subgraphs that should be swapped by a crossover operation.
subGraphA | the vertexes defining a subgraph to be swapped. The first vertex must be the deepest one, i.e., the source of a directed spanning tree. |
subGraphB | the vertexes defining another subgraph to be swapped. The first vertex must be the deepest one, i.e., the source of a directed spanning tree. |
xoverType | the type of crossover. |
Definition at line 99 of file XoverSite.java.
References denoptim.graph.DGraph.getInterfaceAPs(), denoptim.ga.XoverSite.subGraphA, denoptim.ga.XoverSite.subGraphB, and denoptim.ga.XoverSite.xoverType.
denoptim.ga.XoverSite.XoverSite | ( | List< Vertex > | subGraphA, |
List< AttachmentPoint > | needyAPsOnA, | ||
List< Vertex > | subGraphB, | ||
List< AttachmentPoint > | needyAPsOnB, | ||
CrossoverType | xoverType | ||
) |
Create a site by listing the vertexes that belong to each of the subgraphs that should be swapped by a crossover operation.
subGraphA | the vertexes defining a subgraph to be swapped. The first vertex must be the deepest one, i.e., the source of a directed spanning tree. |
needyAPsOnA | a subset of the attachment points in the first subgraph that are required to have a mapping in the second subgraph. |
subGraphB | the vertexes defining another subgraph to be swapped. The first vertex must be the deepest one, i.e., the source of a directed spanning tree. |
needyAPsOnB | a subset of the attachment points in the second subgraph that are required to have an AP mapping in the first subgraph. |
xoverType | the type of crossover. |
Definition at line 130 of file XoverSite.java.
References denoptim.ga.XoverSite.needyAPsOnA, denoptim.ga.XoverSite.needyAPsOnB, denoptim.ga.XoverSite.subGraphA, denoptim.ga.XoverSite.subGraphB, and denoptim.ga.XoverSite.xoverType.
XoverSite denoptim.ga.XoverSite.clone | ( | ) |
Creates a new XoverSite
that contains the same information of this one, i.e., a shallow copy.
Definition at line 168 of file XoverSite.java.
References denoptim.ga.XoverSite.clone(), denoptim.ga.XoverSite.XoverSite(), and denoptim.ga.XoverSite.xoverType.
Referenced by denoptim.ga.XoverSite.clone().
XoverSite denoptim.ga.XoverSite.createMirror | ( | ) |
Creates a new XoverSite
that considers the opposite order of candidates of this one.
Definition at line 149 of file XoverSite.java.
References denoptim.ga.XoverSite.XoverSite(), and denoptim.ga.XoverSite.xoverType.
Referenced by denoptim.ga.Population.XoverSitesAmongCandidates.put().
boolean denoptim.ga.XoverSite.equals | ( | Object | o | ) |
Compares this and another instance.
other |
true
is the two include lists of vertexes that have the same vertex in the same order (i.e., List#equals
are true for each collections individually). Definition at line 252 of file XoverSite.java.
References denoptim.ga.XoverSite.needyAPsOnA, denoptim.ga.XoverSite.needyAPsOnB, denoptim.ga.XoverSite.subGraphA, denoptim.ga.XoverSite.subGraphB, and denoptim.ga.XoverSite.XoverSite().
List< Vertex > denoptim.ga.XoverSite.getA | ( | ) |
Returns the collection of vertexes belonging to the first subgraph.
Definition at line 187 of file XoverSite.java.
References denoptim.ga.XoverSite.subGraphA.
Referenced by denoptim.ga.EAUtils.buildCandidatesByXOver(), and denoptim.ga.XoverSiteTest.testProjectToClonedGraphs().
List< AttachmentPoint > denoptim.ga.XoverSite.getAPsNeedingMappingA | ( | ) |
Returns the collection of attachment points that need to be mapped in order to achieve a valid crossover that swaps the subgraphs and respects the requirements of each side.
Definition at line 212 of file XoverSite.java.
References denoptim.ga.XoverSite.needyAPsOnA.
Referenced by denoptim.ga.XoverSiteTest.testProjectToClonedGraphs().
List< AttachmentPoint > denoptim.ga.XoverSite.getAPsNeedingMappingB | ( | ) |
Returns the collection of attachment points that need to be mapped in order to achieve a valid crossover that swaps the subgraphs and respects the requirements of each side.
Definition at line 226 of file XoverSite.java.
References denoptim.ga.XoverSite.needyAPsOnB.
Referenced by denoptim.ga.XoverSiteTest.testProjectToClonedGraphs().
List< Vertex > denoptim.ga.XoverSite.getB | ( | ) |
Returns the collection of vertexes belonging to the second subgraph.
Definition at line 198 of file XoverSite.java.
References denoptim.ga.XoverSite.subGraphB.
Referenced by denoptim.ga.EAUtils.buildCandidatesByXOver(), and denoptim.ga.XoverSiteTest.testProjectToClonedGraphs().
CrossoverType denoptim.ga.XoverSite.getType | ( | ) |
Returns the type of crossover.
Definition at line 237 of file XoverSite.java.
References denoptim.ga.XoverSite.xoverType.
XoverSite denoptim.ga.XoverSite.projectToClonedGraphs | ( | ) | throws DENOPTIMException |
Creates a new instance of this class that contains the list of vertexes that correspond to those contained in this XoverSite
but with references to the vertexes of an entirely new pair of graphs made as clones of the original graphs.
Note that since the graphs can be embedded in templates, the entire embedding structure is cloned as well.
DENOPTIMException |
Definition at line 275 of file XoverSite.java.
References denoptim.graph.DGraph.clone(), denoptim.graph.Vertex.getAP(), denoptim.graph.DGraph.getEmbeddedGraphInClone(), denoptim.graph.DGraph.getEmbeddingPath(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.ga.XoverSite.needyAPsOnA, denoptim.ga.XoverSite.needyAPsOnB, denoptim.graph.DGraph.renumberGraphVertices(), denoptim.ga.XoverSite.subGraphA, denoptim.ga.XoverSite.subGraphB, denoptim.ga.XoverSite.XoverSite(), and denoptim.ga.XoverSite.xoverType.
Referenced by denoptim.ga.EAUtils.buildCandidatesByXOver(), and denoptim.ga.XoverSiteTest.testProjectToClonedGraphs().
String denoptim.ga.XoverSite.toString | ( | ) |
Produced a string for showing what this object is.
Definition at line 349 of file XoverSite.java.
References denoptim.ga.XoverSite.subGraphA, denoptim.ga.XoverSite.subGraphB, and denoptim.ga.XoverSite.xoverType.
Referenced by denoptim.ga.EAUtils.buildCandidatesByXOver().
|
private |
List of attachment points on subgraph B and that need to be replaced by a corresponding attachment point in case of crossover.
These APs might be used or free, which essentially means they are either required somehow, or are used in an outer level, i.e., projected onto an embedding template and used from there.
Definition at line 50 of file XoverSite.java.
Referenced by denoptim.ga.XoverSite.equals(), denoptim.ga.XoverSite.getAPsNeedingMappingA(), denoptim.ga.XoverSite.projectToClonedGraphs(), and denoptim.ga.XoverSite.XoverSite().
|
private |
List of attachment points on subgraph A and that need to be replaced by a corresponding attachment point in case of crossover.
These APs might be used or free, which essentially means they are either required somehow, or are used in an outer level, i.e., projected onto an embedding template and used from there.
Definition at line 65 of file XoverSite.java.
Referenced by denoptim.ga.XoverSite.equals(), denoptim.ga.XoverSite.getAPsNeedingMappingB(), denoptim.ga.XoverSite.projectToClonedGraphs(), and denoptim.ga.XoverSite.XoverSite().
|
private |
One of the two subgraphs.
Definition at line 40 of file XoverSite.java.
Referenced by denoptim.ga.XoverSite.equals(), denoptim.ga.XoverSite.getA(), denoptim.ga.XoverSite.projectToClonedGraphs(), denoptim.ga.XoverSite.toString(), and denoptim.ga.XoverSite.XoverSite().
|
private |
The other of the two subgraphs.
Definition at line 55 of file XoverSite.java.
Referenced by denoptim.ga.XoverSite.equals(), denoptim.ga.XoverSite.getB(), denoptim.ga.XoverSite.projectToClonedGraphs(), denoptim.ga.XoverSite.toString(), and denoptim.ga.XoverSite.XoverSite().
|
private |
Type of crossover.
Definition at line 70 of file XoverSite.java.
Referenced by denoptim.ga.XoverSite.clone(), denoptim.ga.XoverSite.createMirror(), denoptim.ga.XoverSite.getType(), denoptim.ga.XoverSite.projectToClonedGraphs(), denoptim.ga.XoverSite.toString(), and denoptim.ga.XoverSite.XoverSite().