commit | a43b248da095e6ad151f8e3f174acf52c2289e40 | [log] [tgz] |
---|---|---|
author | r3drock <38569066+r3drock@users.noreply.github.com> | Thu Jan 02 11:57:13 2020 +0000 |
committer | Anton Kochkov <xvilka@gmail.com> | Mon Mar 02 13:06:03 2020 +0800 |
tree | 166e060c03ed5f2a61166d273713bda858eb9d89 | |
parent | 712b5482e368814264461bc635eccd0759822626 [diff] |
add documentation for remove_node
diff --git a/src/graphmap.rs b/src/graphmap.rs index ecd0d26..3905ea2 100644 --- a/src/graphmap.rs +++ b/src/graphmap.rs
@@ -184,6 +184,8 @@ } /// Return `true` if node `n` was removed. + /// + /// Computes in **O(V)** time, due to the removal of edges with other nodes. pub fn remove_node(&mut self, n: N) -> bool { let links = match self.nodes.swap_remove(&n) { None => return false,