Releases: moaxcp/graphs
Releases · moaxcp/graphs
0.17.1
0.17.0
0.16.0
0.15.0
0.14.0
0.13.0
0.12.0
0.11.0
Updating to jdk 17. Updating gradle and all dependencies.
Found issue when getting and edge with different ordered endpoints in an UndirectedGraph. This test now passes:
var edge1 = graph.getEdge("A", "B");
var edge2 = graph.getEdge("B", "A");
assertThat(edge1).isEqualTo(edge2);
This all came down to how the Objects.hash(...)
method is ordered but undirected edges need an unordered hash. The
solution is to simply add the hashcodes of the two ids together. This is similar to how HashSet calculates its
hashCode()
.
Adding boolean connected(ID from, ID to)
to Graph
and boolean connected(ID id) to
Vertex`. This can be used to check if two vertices are connected. It can
be used to enforce that the graph is always a DAG when adding edges.