19package denoptim.graph;
21import static org.junit.jupiter.api.Assertions.assertEquals;
22import static org.junit.jupiter.api.Assertions.assertFalse;
23import static org.junit.jupiter.api.Assertions.assertNull;
24import static org.junit.jupiter.api.Assertions.assertTrue;
26import org.junit.jupiter.api.BeforeEach;
27import org.junit.jupiter.api.Test;
29import denoptim.graph.Edge.BondType;
30import denoptim.graph.Vertex.BBType;
41 private StringBuilder
reason =
new StringBuilder();
100 "Inverse edges should be equal (A)");
102 "Inverse edges should be equal (B)");
179 "Different APs lead to different edge (A)");
181 "Different APs lead to different edge (B)");
217 "Different bond types lead to different edge (A)");
219 "Different bond types lead to different edge (B)");
233 "Src AP user hashcode");
235 "Trg AP user hashcode");
An attachment point (AP) is a possibility to attach a Vertex onto the vertex holding the AP (i....
Edge getEdgeUser()
Gets the edge that is using this AP, or null if no edge is using this AP.
Container for the list of vertices and the edges that connect them.
void addVertex(Vertex vertex)
Appends a vertex to this graph without creating any edge.
void removeEdge(Edge edge)
Removes an edge and update the free valences of the attachment points that were originally involved i...
void addEdge(Edge edge)
Adds the edge to the list of edges belonging to this graph.
This class represents the edge between two vertices.
boolean sameAs(Edge other, StringBuilder reason)
Compares this and another edge ignoring edge and vertex IDs.
int compareAsUndirected(Edge other)
Compares this and another edge ignoring the directionality of both, i.e., as if both edges were undir...
AttachmentPoint getTrgAP()
AttachmentPoint getSrcAP()
Unit test for DENOPTIMEdge.
void testSameAs_DiffBndTyp()
void testConnectionDeconnectionLoop()
AttachmentPoint dummyApA2
AttachmentPoint dummyApA1
void testUndirectedComparison()
An empty vertex has the behaviors of a vertex, but has no molecular structure.
void addAP()
Adds an attachment point with no APClass or other attribute.
void setBuildingBlockId(int buildingBlockId)
void setBuildingBlockType(Vertex.BBType buildingBlockType)
AttachmentPoint getAP(int i)
Get attachment point i on this vertex.
Possible chemical bond types an edge can represent.
The type of building block.