$darkmode
DENOPTIM
denoptim.graph.APMapping Class Reference

Class representing a mapping between attachment points (APs). More...

Inheritance diagram for denoptim.graph.APMapping:
[legend]
Collaboration diagram for denoptim.graph.APMapping:
[legend]

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...
 

Detailed Description

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).

Author
Marco Foscato

Definition at line 40 of file APMapping.java.

Constructor & Destructor Documentation

◆ APMapping()

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().

Here is the caller graph for this function:

Member Function Documentation

◆ 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().

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

◆ containsAllKeys()

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.

Parameters
keysthe list of key APs.
Returns
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.

◆ containsAllValues()

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.

Parameters
keysthe list of APs.
Returns
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.

◆ toIntMappig()

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.

Returns
an index-based analog of this mapping.
Exceptions
DENOPTIMExceptionif 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().

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

◆ toString()

String denoptim.graph.APMapping.toString ( )

Produces a human readable string based on the AP IDs.

Definition at line 156 of file APMapping.java.

Member Data Documentation

◆ serialVersionUID

final long denoptim.graph.APMapping.serialVersionUID = 1L
staticprivate

Version UID.

Definition at line 46 of file APMapping.java.


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