diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index ed1c3fa..e464950 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,16 +2,4 @@ ## Summary - - -## Upgrading - - - -## New Features - - - -## Bug Fixes - - +This is the first release of the Frequenz Component Graph. In this version, it supports validating component graphs, provides formula generators for various metrics and methods for manual traversal of the graph, when necessary. diff --git a/src/graph/retrieval.rs b/src/graph/retrieval.rs index 18abfd6..0916b34 100644 --- a/src/graph/retrieval.rs +++ b/src/graph/retrieval.rs @@ -24,14 +24,14 @@ where } /// Returns an iterator over the components in the graph. - pub fn components(&self) -> Components { + pub fn components(&self) -> Components<'_, N> { Components { iter: self.graph.raw_nodes().iter(), } } /// Returns an iterator over the connections in the graph. - pub fn connections(&self) -> Connections { + pub fn connections(&self) -> Connections<'_, N, E> { Connections { cg: self, iter: self.graph.raw_edges().iter(), @@ -42,7 +42,7 @@ where /// given `component_id`. /// /// Returns an error if the given `component_id` does not exist. - pub fn predecessors(&self, component_id: u64) -> Result, Error> { + pub fn predecessors(&self, component_id: u64) -> Result, Error> { self.node_indices .get(&component_id) .map(|&index| Neighbors { @@ -60,7 +60,7 @@ where /// given `component_id`. /// /// Returns an error if the given `component_id` does not exist. - pub fn successors(&self, component_id: u64) -> Result, Error> { + pub fn successors(&self, component_id: u64) -> Result, Error> { self.node_indices .get(&component_id) .map(|&index| Neighbors { @@ -81,7 +81,7 @@ where pub(crate) fn siblings_from_predecessors( &self, component_id: u64, - ) -> Result, Error> { + ) -> Result, Error> { Ok(Siblings::new( component_id, self.predecessors(component_id)? @@ -96,7 +96,10 @@ where /// given `component_id`, that have shared successors. /// /// Returns an error if the given `component_id` does not exist. - pub(crate) fn siblings_from_successors(&self, component_id: u64) -> Result, Error> { + pub(crate) fn siblings_from_successors( + &self, + component_id: u64, + ) -> Result, Error> { Ok(Siblings::new( component_id, self.successors(component_id)?