19package denoptim.graph;
21import static org.junit.jupiter.api.Assertions.assertEquals;
22import static org.junit.jupiter.api.Assertions.assertTrue;
24import org.junit.jupiter.api.Test;
26import denoptim.graph.Edge.BondType;
27import denoptim.graph.Vertex.BBType;
28import denoptim.graph.simplified.UndirectedEdge;
74 assertEquals(0,ue1.
compare(ue1),
"Self-comparison");
75 assertEquals(0,ue1.
compare(ue2),
"Inverse edges should be equal (A)");
76 assertEquals(0,ue2.
compare(ue1),
"Inverse edges should be equal (B)");
81 assertEquals(1,ue1.
compare(ues),
"Ranking (A)");
82 assertEquals(-1,ues.
compare(ue1),
"Ranking (Arev)");
83 assertEquals(-1,ue1.
compare(uec),
"Ranking (B)");
84 assertEquals(1,uec.
compare(ue1),
"Ranking (Brev)");
85 assertEquals(1,uec.
compare(ues),
"Ranking (C)");
86 assertEquals(-1,ues.
compare(uec),
"Ranking (Crev)");
91 assertEquals(-1,ue41.
compare(ue42),
92 "Different APs lead to different edge (A)");
93 assertEquals(1,ue42.
compare(ue41),
94 "Different APs lead to different edge (B)");
99 assertTrue(0 < ue51.
compare(ue52),
100 "Different bond types lead to different edge (A)");
101 assertTrue(0 > ue52.
compare(ue51),
102 "Different bond types lead to different edge (B)");
An attachment point (AP) is a possibility to attach a Vertex onto the vertex holding the AP (i....
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.
Unit test for UndirectedEdge.
void testUndirectedComparison()
void setBuildingBlockId(int buildingBlockId)
void setBuildingBlockType(Vertex.BBType buildingBlockType)
AttachmentPoint getAP(int i)
Get attachment point i on this vertex.
This class represents an undirected version of the edge between two vertices.
int compare(UndirectedEdge other)
Possible chemical bond types an edge can represent.
The type of building block.