$darkmode
DENOPTIM
denoptim.graph.rings.ClosableChain Class Reference

ClosableChain represents a chain of fragments (chain links) that is closable (or candidate closable). More...

Inheritance diagram for denoptim.graph.rings.ClosableChain:
[legend]
Collaboration diagram for denoptim.graph.rings.ClosableChain:
[legend]

Public Member Functions

 ClosableChain ()
 Constructs an empty ClosableChain. More...
 
 ClosableChain (String str)
 Constructs a ClosableChain from the string representation. More...
 
void appendLink (ChainLink l)
 Append a link to this chain. More...
 
void setTurningPoint (int tp)
 Defined the turning point in the list of links. More...
 
ArrayList< ChainLinkgetLinks ()
 Get the list of ChainLinks. More...
 
ChainLink getLink (int i)
 Get a specific ChainLink More...
 
int getSize ()
 Get length of chain. More...
 
int getTurningPointIdx ()
 Get the vertex ID of the turning point.Note that since the chain is a path in a graph the relative direction of the edges spanned can display an inversion point (i.e., the turning point). More...
 
int involvesVertex (Vertex vert)
 Check whether a given vertex is involved in this chain. More...
 
int involvesVertexAndAP (Vertex vert, int apIDA, int apIDB)
 Check whether a combination of vertex and attachment points ID is involved in this chain. More...
 
ClosableChain clone ()
 Returns a deep-copy. More...
 
String toString ()
 

Private Attributes

ArrayList< ChainLinklinks
 List of ChainLinks in this chain. More...
 
int tuningPoint
 The position of the scaffold vertex: turning point for the direction of the chain. More...
 

Detailed Description

ClosableChain represents a chain of fragments (chain links) that is closable (or candidate closable).

Author
Marco Foscato

Definition at line 34 of file ClosableChain.java.

Constructor & Destructor Documentation

◆ ClosableChain() [1/2]

denoptim.graph.rings.ClosableChain.ClosableChain ( )

Constructs an empty ClosableChain.

Definition at line 53 of file ClosableChain.java.

Referenced by denoptim.graph.rings.ClosableChain.clone().

Here is the caller graph for this function:

◆ ClosableChain() [2/2]

denoptim.graph.rings.ClosableChain.ClosableChain ( String  str)

Constructs a ClosableChain from the string representation.

Definition at line 64 of file ClosableChain.java.

References denoptim.graph.rings.ClosableChain.links, denoptim.graph.Vertex.BBType.parseInt(), and denoptim.graph.rings.ClosableChain.tuningPoint.

Here is the call graph for this function:

Member Function Documentation

◆ appendLink()

void denoptim.graph.rings.ClosableChain.appendLink ( ChainLink  l)

Append a link to this chain.

Parameters
linkthe link to be appended

Definition at line 92 of file ClosableChain.java.

References denoptim.graph.rings.ClosableChain.links.

Referenced by denoptim.graph.rings.ClosableChain.clone().

Here is the caller graph for this function:

◆ clone()

ClosableChain denoptim.graph.rings.ClosableChain.clone ( )

Returns a deep-copy.

Returns
a deep copy

Definition at line 232 of file ClosableChain.java.

References denoptim.graph.rings.ClosableChain.appendLink(), denoptim.graph.rings.ClosableChain.ClosableChain(), denoptim.graph.rings.ClosableChain.links, denoptim.graph.rings.ClosableChain.setTurningPoint(), and denoptim.graph.rings.ClosableChain.tuningPoint.

Here is the call graph for this function:

◆ getLink()

ChainLink denoptim.graph.rings.ClosableChain.getLink ( int  i)

Get a specific ChainLink

Parameters
ithe index of the ChainLink in the list
Returns
the ChainLink in the given position of the chain

Definition at line 127 of file ClosableChain.java.

References denoptim.graph.rings.ClosableChain.links.

Referenced by denoptim.graph.rings.ClosableChain.getTurningPointIdx().

Here is the caller graph for this function:

◆ getLinks()

ArrayList< ChainLink > denoptim.graph.rings.ClosableChain.getLinks ( )

Get the list of ChainLinks.

Definition at line 114 of file ClosableChain.java.

References denoptim.graph.rings.ClosableChain.links.

◆ getSize()

int denoptim.graph.rings.ClosableChain.getSize ( )

Get length of chain.

Returns
the size of the list if ChainLinks

Definition at line 139 of file ClosableChain.java.

References denoptim.graph.rings.ClosableChain.links.

◆ getTurningPointIdx()

int denoptim.graph.rings.ClosableChain.getTurningPointIdx ( )

Get the vertex ID of the turning point.Note that since the chain is a path in a graph the relative direction of the edges spanned can display an inversion point (i.e., the turning point).

Returns
the ID of the DENOPTIMVertex corresponding to the turning point.

Definition at line 154 of file ClosableChain.java.

References denoptim.graph.rings.ChainLink.getIdx(), denoptim.graph.rings.ClosableChain.getLink(), and denoptim.graph.rings.ClosableChain.tuningPoint.

Referenced by denoptim.graph.rings.RingClosuresArchive.addRecord().

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

◆ involvesVertex()

int denoptim.graph.rings.ClosableChain.involvesVertex ( Vertex  vert)

Check whether a given vertex is involved in this chain.

Parameters
vertthe candidate vertex
Returns
the poisiton of the related chain link or -1 if the vertex is not part of this chain.

Definition at line 168 of file ClosableChain.java.

References denoptim.graph.rings.ChainLink.getFragType(), denoptim.graph.rings.ChainLink.getIdx(), and denoptim.graph.rings.ClosableChain.links.

Here is the call graph for this function:

◆ involvesVertexAndAP()

int denoptim.graph.rings.ClosableChain.involvesVertexAndAP ( Vertex  vert,
int  apIDA,
int  apIDB 
)

Check whether a combination of vertex and attachment points ID is involved in this chain.

Parameters
vertthe candidate vertex
apIDAthe index of the DENOPTIMAttachmentPoint on the left/rigth hand side of the vertex
apIDBthe index of the DENOPTIMAttachmentPoint on the right/left hand side of the vertex
Returns
the poisiton of the related chain link or -1 if the vertex is not part of this chain.

Definition at line 203 of file ClosableChain.java.

References denoptim.graph.rings.ChainLink.getApIdToLeft(), denoptim.graph.rings.ChainLink.getApIdToRight(), denoptim.graph.rings.ChainLink.getFragType(), denoptim.graph.rings.ChainLink.getIdx(), and denoptim.graph.rings.ClosableChain.links.

Here is the call graph for this function:

◆ setTurningPoint()

void denoptim.graph.rings.ClosableChain.setTurningPoint ( int  tp)

Defined the turning point in the list of links.

Parameters
tpthe index of the turning point

Definition at line 103 of file ClosableChain.java.

Referenced by denoptim.graph.rings.ClosableChain.clone().

Here is the caller graph for this function:

◆ toString()

String denoptim.graph.rings.ClosableChain.toString ( )
Returns
the string representation of this ClosableChain

Definition at line 249 of file ClosableChain.java.

References denoptim.graph.rings.ClosableChain.links.

Member Data Documentation

◆ links

◆ tuningPoint

int denoptim.graph.rings.ClosableChain.tuningPoint
private

The position of the scaffold vertex: turning point for the direction of the chain.

Definition at line 45 of file ClosableChain.java.

Referenced by denoptim.graph.rings.ClosableChain.clone(), denoptim.graph.rings.ClosableChain.ClosableChain(), and denoptim.graph.rings.ClosableChain.getTurningPointIdx().


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