$darkmode
DENOPTIM
|
Class representing a mapping between attachment points (APs). More...
Public Member Functions | |
APMapping () | |
Creates a mapping that links no pair of APs. More... | |
LinkedHashMap< Integer, Integer > | toIntMappig () throws DENOPTIMException |
Produces an index-based version of this mapping where each index represents the attachment point as its index in the owner vertex (i.e., the integer is the result of Vertex#getIndexInOwner() . More... | |
boolean | containsAllKeys (List< AttachmentPoint > keys) |
Check if this mapping contains all the given attachment points (APs) in the 1st positions of the AP pairs. More... | |
boolean | containsAllValues (List< AttachmentPoint > keys) |
Check if this mapping contains all the given attachment points (APs) in the 2nd positions of the AP pairs. More... | |
APMapping | clone () |
Shallow cloning. More... | |
String | toString () |
Produces a human readable string based on the AP IDs. More... | |
Static Private Attributes | |
static final long | serialVersionUID = 1L |
Version UID. More... | |
Class representing a mapping between attachment points (APs).
The relations have a given order, which is that with which they are put in this map (i.e., this class extends LinkedHashMap
). The mapping can contain any number of one-to-one relations between APs, and each such relation is sorted: all APs present as keys are assumed to be related by the same context (e.g., they belong to the same vertex), and all APs in the value position are related by the same context (e.g., they belong to the same vertex).
Definition at line 40 of file APMapping.java.
denoptim.graph.APMapping.APMapping | ( | ) |
Creates a mapping that links no pair of APs.
Definition at line 53 of file APMapping.java.
Referenced by denoptim.graph.APMapping.clone().
APMapping denoptim.graph.APMapping.clone | ( | ) |
Shallow cloning.
Definition at line 140 of file APMapping.java.
References denoptim.graph.APMapping.APMapping().
Referenced by denoptim.fragspace.APMapFinder.findAllMappings(), and denoptim.fragspace.FragmentSpaceUtils.recursiveCombiner().
boolean denoptim.graph.APMapping.containsAllKeys | ( | List< AttachmentPoint > | keys | ) |
Check if this mapping contains all the given attachment points (APs) in the 1st positions of the AP pairs.
keys | the list of key APs. |
true
if this mapping contains all the APs and they are all in the 1st position of their pair. Definition at line 115 of file APMapping.java.
boolean denoptim.graph.APMapping.containsAllValues | ( | List< AttachmentPoint > | keys | ) |
Check if this mapping contains all the given attachment points (APs) in the 2nd positions of the AP pairs.
keys | the list of APs. |
true
if this mapping contains all the APs and they are all in the 2nd position of their pair. Definition at line 129 of file APMapping.java.
LinkedHashMap< Integer, Integer > denoptim.graph.APMapping.toIntMappig | ( | ) | throws DENOPTIMException |
Produces an index-based version of this mapping where each index represents the attachment point as its index in the owner vertex (i.e., the integer is the result of Vertex#getIndexInOwner()
.
For the indexes to work properly, all the 1st/2nd APs in the mapping pairs, must consistently belong to the same vertex.
DENOPTIMException | if APs belong to different owners so the int-based mapping cannot be produced. |
Definition at line 71 of file APMapping.java.
References denoptim.graph.AttachmentPoint.getID(), denoptim.graph.AttachmentPoint.getIndexInOwner(), denoptim.graph.AttachmentPoint.getOwner(), and denoptim.graph.Vertex.getVertexId().
Referenced by denoptim.ga.GraphOperations.substituteLink().
String denoptim.graph.APMapping.toString | ( | ) |
Produces a human readable string based on the AP IDs.
Definition at line 156 of file APMapping.java.
|
staticprivate |
Version UID.
Definition at line 46 of file APMapping.java.