0.3.0
diff --git a/Cargo.toml b/Cargo.toml
index 8078ef4..9df4892 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "petgraph"
-version = "0.3.0-alpha.3"
+version = "0.3.0"
license = "MIT/Apache-2.0"
authors = [
"bluss",
@@ -34,12 +34,13 @@
odds = { version = "0.2.19" }
[features]
+default = ["graphmap", "stable_graph"]
+graphmap = ["ordermap"]
+stable_graph = []
+
# For unstable features
generate = []
unstable = ["generate"]
-default = ["graphmap", "stable_graph"]
-stable_graph = []
-graphmap = ["ordermap"]
# feature flags for testing use only
test = []
diff --git a/README.rst b/README.rst
index c349c79..93dc14a 100644
--- a/README.rst
+++ b/README.rst
@@ -2,11 +2,11 @@
petgraph
========
-Graph data structure library. Requires Rust 1.6.
+Graph data structure library. Requires Rust 1.12.
Please read the `API documentation here`__
-__ https://bluss.github.io/petgraph/
+__ https://docs.rs/petgraph/
|build_status|_ |crates|_
@@ -16,47 +16,46 @@
.. |crates| image:: http://meritbadge.herokuapp.com/petgraph
.. _crates: https://crates.io/crates/petgraph
+Crate feature flags:
+
+- ``graphmap`` (default) enable ``GraphMap``.
+- ``stable_graph`` (default) enable ``StableGraph``.
+
Recent Changes
--------------
-- 0.3.0-alpha.3
+- 0.3.0
- - Prerelease
- - ``GraphMap`` is based on the ordermap crate. Deterministic iteration
- order, faster iteration, no side tables needed to convert to ``Graph``.
- - Add another visitor ``DfsPostOrder``, by extracting some code from ``scc``.
- - Improve pretty ``Debug`` output for ``Graph``.
- - ``Dfs`` gained new methods ``from_parts`` and ``reset``.
+ - Overhaul all graph visitor traits so that they use the ``IntoIterator``
+ style. This makes them composable.
-- 0.3.0-alpha.2
+ - Multiple graph algorithms use new visitor traits.
+ - **Help is welcome to port more algorithms (and create new graph traits in
+ the process)!**
- - Prerelease
- ``GraphMap`` can now have directed edges. ``GraphMap::new`` is now generic
in the edge type. ``DiGraphMap`` and ``UnGraphMap`` are new type aliases.
- - Document the scc order in ``tarjan_scc`` (reverse topological).
- - More visitor traits for ``GraphMap`` and ``Reversed``
+ - Add type aliases ``DiGraph, UnGraph, StableDiGraph, StableUnGraph``
+ - ``GraphMap`` is based on the ordermap crate. Deterministic iteration
+ order, faster iteration, no side tables needed to convert to ``Graph``.
+ - Improved docs for a lot of types and functions.
+ - Add graph visitor ``DfsPostOrder``
+ - ``Dfs`` gained new methods ``from_parts`` and ``reset``.
+ - New algo ``has_path_connecting``.
+ - New algo ``tarjan_scc``, a second scc implementation.
+ - Document traversal order in ``Dfs, DfsPostOrder, scc, tarjan_scc``.
+ - Optional graph visitor workspace reuse in ``has_path_connecting``,
+ ``is_cyclic_directed, toposort``.
+ - Improved ``Debug`` formatting for ``Graph, StableGraph``.
+ - Add a prelude module
- ``GraphMap`` now has a method ``.into_graph()`` that makes a ``Graph``.
- - ``dijkstra`` changed its graph argument from ``&G`` to ``G where G: GraphRef``.
-
-- 0.3.0-alpha.1
-
- - Prerelease
- - Add ``petgraph::algo::tarjan_scc``, a second scc implementation
- - Better docs
-
-- 0.3.0-alpha.0
-
- - Prerelease
- - Overhaul all graph visitor traits so that they use the ``IntoIterator``
- style. This makes them composable easier to use.
- - Add new graph traits, like ``NodeIndexable`` and ``EdgeReferences``.
- - Port multiple graph algorithms to the new visitor traits.
- - Help is welcome to port more algorithms (and add new graph traits in the
- process)!
- ``Graph::retain_nodes, retain_edges`` now expose the self graph only
as wrapped in ``Frozen``, so that weights can be mutated but the
graph structure not.
- Enable ``StableGraph`` by default
+ - Add method ``Graph::contains_edge``.
+ - Renamed ``EdgeDirection`` → ``Direction``.
+ - Remove ``SubTopo``.
- Require Rust 1.12 or later
- 0.2.9
diff --git a/src/graphmap.rs b/src/graphmap.rs
index f0e2e87..b422c58 100644
--- a/src/graphmap.rs
+++ b/src/graphmap.rs
@@ -62,6 +62,8 @@
/// You can use the type aliases `UnGraphMap` and `DiGraphMap` for convenience.
///
/// `GraphMap` does not allow parallel edges, but self loops are allowed.
+///
+/// Depends on crate feature `graphmap` (default).
#[derive(Clone)]
pub struct GraphMap<N, E, Ty> {
nodes: OrderMap<N, Vec<(N, Direction)>>,
diff --git a/src/stable_graph.rs b/src/stable_graph.rs
index 5f285c5..ba02342 100644
--- a/src/stable_graph.rs
+++ b/src/stable_graph.rs
@@ -41,9 +41,6 @@
/// `StableGraph<N, E, Ty, Ix>` is a graph datastructure using an adjacency
/// list representation.
///
-/// Depends on crate feature `stable_graph`. *This is a new feature in petgraph.
-/// You can contribute to help it achieve parity with Graph.*
-///
/// The graph **does not invalidate** any unrelated node or edge indices when
/// items are removed.
///
@@ -74,7 +71,8 @@
///
/// - Indices don't allow as much compile time checking as references.
///
-///
+/// Depends on crate feature `stable_graph` (default). *This is a new feature in
+/// petgraph. You can contribute to help it achieve parity with Graph.*
pub struct StableGraph<N, E, Ty = Directed, Ix = DefaultIx>
where Ix: IndexType
{