@@ -6,6 +6,41 @@ you spot any mistakes.
66
77## 0.7.0 (2013-xx-xx)
88
9+ * Feature: Add new ` Set\Vertices ` and ` Set\Edges ` classes that handle common
10+ operations on a Set of multiple ` Vertex ` and ` Edge ` instances respectively.
11+ ([ #48 ] ( https://github.com/clue/graph/issues/48 ) )
12+
13+ * BC break: Move operations and their corresponding constants concerning Sets
14+ to their corresponding Sets:
15+
16+ | Old name | New name |
17+ | ---| ---|
18+ | ` Edge\Base::getFirst() ` | ` Set\Edges::getEdgeOrder() ` |
19+ | ` Edge\Base::getAll() ` | ` Set\Edges::getEdgesOrder() ` |
20+ | ` Edge\Base::ORDER_* ` | `Set\Edges::ORDER_ * |
21+ | ---| ---|
22+ | ` Vertex::getFirst() ` | ` Set\Vertices::getVertexOrder() ` |
23+ | ` Vertex::getAll() ` | ` Set\Vertices::getVerticesOrder() ` |
24+ | ` Vertex::ORDER_ ` | ` Set\Vertices::ORDER_* ` |
25+
26+ * BC break: Each ` getVertices*() ` and ` getEdges*() ` method now returns a ` Set `
27+ instead of a primitive array of instances. * Most* of the time this should
28+ work without changing your code, because each ` Set ` implements an ` Iterator `
29+ interface and can easily be iterated using ` foreach ` . However, using a ` Set `
30+ instead of a plain array differs when checking its boolean value or
31+ comparing two Sets. I.e. if you happen to want to check if an ` Set ` is empty,
32+ you now have to use the more explicit syntax ` $set->isEmpty() ` .
33+
34+ * BC break: ` Vertex::getVertices() ` , ` Vertex::getVerticesEdgeTo() ` and
35+ ` Vertex::getVerticesEdgeFrom() ` now return a ` Set\Vertices ` instance that
36+ may contain duplicate vertices if parallel (multiple) edges exist. Previously
37+ there was no easy way to detect this situation - this is now the default. If
38+ you also want to get unique / distinct ` Vertex ` instances, use
39+ ` Vertex::getVertices()->getVerticesDistinct() ` where applicable.
40+
41+ * BC break: Remove all occurances of ` getVerticesId() ` , use
42+ ` getVertices()->getIds() ` instead.
43+
944* BC break: Merge ` Cycle ` into ` Walk ` ([ #61 ] ( https://github.com/clue/graph/issues/61 ) ).
1045As such, its static factory methods had to be renamed. Update your references if applicable:
1146
@@ -15,6 +50,12 @@ As such, its static factory methods had to be renamed. Update your references if
1550| ` Cycle::factoryFromVertices() ` | ` Walk::factoryCycleFromVertices() ` |
1651| ` Cycle::factoryFromEdges() ` | ` Walk::factoryCycleFromEdges() ` |
1752
53+ * BC break: Remove ` Graph::isEmpty() ` because it's not well-defined and might
54+ be confusing. Most literature suggests it should check for existing edges,
55+ whereas the old behavior was to check for existing vertices instead. Use either
56+ of the more transparent methods
57+ ` Algorithm\Property\GraphProperty::isNull() ` (old behavior) or (where applicable)
58+ ` Algorithm\Property\GraphProperty::isEmpty() ` ([ #59 ] ( https://github.com/clue/graph/issues/59 ) ).
1859* BC break: Each of the above methods (` Walk::factoryCycleFromPredecessorMap() ` ,
1960` Walk::factoryCycleFromVertices() ` , ` Walk::factoryCycleFromEdges() ` ) now
2061actually makes sure the returned ` Walk ` instance is actually a valid Cycle,
@@ -28,6 +69,7 @@ Vertex ([#62](https://github.com/clue/graph/issues/62))
2869* Feature: Add ` Algorithm\ShortestPath::hasVertex(Vertex $vertex) ` to check whether
2970a path to the given Vertex exists ([ #62 ] ( https://github.com/clue/graph/issues/62 ) ).
3071* Feature: Support opening GraphViz images on Mac OS X in default image viewer ([ #67 ] ( https://github.com/clue/graph/issues/67 ) @onigoetz )
72+ * Feature: Add ` Walk::factoryFromVertices() ` ([ #64 ] ( https://github.com/clue/graph/issues/64 ) ).
3173* Fix: Checking ` Walk::isValid() ` ([ #61 ] ( https://github.com/clue/graph/issues/61 ) )
3274* Fix: Missing import prevented
3375` Algorithm\ShortestPath\MooreBellmanFord::getCycleNegative() ` from actually
0 commit comments