$darkmode
DENOPTIM
ChainLink.java
Go to the documentation of this file.
1/*
2 * DENOPTIM
3 * Copyright (C) 2019 Marco Foscato <marco.foscato@uib.no>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19package denoptim.graph.rings;
20
21import denoptim.graph.Vertex;
22
32public class ChainLink implements Cloneable
33{
37 private int idx;
38
42 private Vertex.BBType ftype;
43
47 private int apLeft;
48
52 private int apRight;
53
54
55//-----------------------------------------------------------------------------
56
61 public ChainLink()
62 {
63 }
64
65//-----------------------------------------------------------------------------
66
71 public ChainLink(int molID, Vertex.BBType ftype, int apLeft, int apRight)
72 {
73 this.idx = molID;
74 this.ftype = ftype;
75 this.apLeft = apLeft;
76 this.apRight = apRight;
77 }
78
79//-----------------------------------------------------------------------------
80
85 public int getIdx()
86 {
87 return idx;
88 }
89
90//-----------------------------------------------------------------------------
91
96 public Vertex.BBType getFragType()
97 {
98 return ftype;
99 }
100
101//-----------------------------------------------------------------------------
102
108 public int getApIdToLeft()
109 {
110 return apLeft;
111 }
112
113//-----------------------------------------------------------------------------
114
120 public int getApIdToRight()
121 {
122 return apRight;
123 }
124
125//-----------------------------------------------------------------------------
126
132 {
134 return c;
135 }
136
137//-----------------------------------------------------------------------------
138
143 public String toString()
144 {
145 String str = " ChainLink[molID: " + idx + ", ftype: " + ftype
146 + ", apLeft: " + apLeft + ", apRight: " + apRight + "]";
147 return str;
148 }
149
150//-----------------------------------------------------------------------------
151}
152
A vertex is a data structure that has an identity and holds a list of AttachmentPoints.
Definition: Vertex.java:61
The type of building block.
Definition: Vertex.java:86