Skip to content

Commit ee4048f

Browse files
authored
Prepare for release v0.1.0 (#15)
2 parents 1e6f09b + f0e66ca commit ee4048f

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,4 @@
22

33
## Summary
44

5-
<!-- Here goes a general summary of what this release is about -->
6-
7-
## Upgrading
8-
9-
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
10-
11-
## New Features
12-
13-
<!-- Here goes the main new features and examples or instructions on how to use them -->
14-
15-
## Bug Fixes
16-
17-
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
5+
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.

src/graph/retrieval.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ where
2424
}
2525

2626
/// Returns an iterator over the components in the graph.
27-
pub fn components(&self) -> Components<N> {
27+
pub fn components(&self) -> Components<'_, N> {
2828
Components {
2929
iter: self.graph.raw_nodes().iter(),
3030
}
3131
}
3232

3333
/// Returns an iterator over the connections in the graph.
34-
pub fn connections(&self) -> Connections<N, E> {
34+
pub fn connections(&self) -> Connections<'_, N, E> {
3535
Connections {
3636
cg: self,
3737
iter: self.graph.raw_edges().iter(),
@@ -42,7 +42,7 @@ where
4242
/// given `component_id`.
4343
///
4444
/// Returns an error if the given `component_id` does not exist.
45-
pub fn predecessors(&self, component_id: u64) -> Result<Neighbors<N>, Error> {
45+
pub fn predecessors(&self, component_id: u64) -> Result<Neighbors<'_, N>, Error> {
4646
self.node_indices
4747
.get(&component_id)
4848
.map(|&index| Neighbors {
@@ -60,7 +60,7 @@ where
6060
/// given `component_id`.
6161
///
6262
/// Returns an error if the given `component_id` does not exist.
63-
pub fn successors(&self, component_id: u64) -> Result<Neighbors<N>, Error> {
63+
pub fn successors(&self, component_id: u64) -> Result<Neighbors<'_, N>, Error> {
6464
self.node_indices
6565
.get(&component_id)
6666
.map(|&index| Neighbors {
@@ -81,7 +81,7 @@ where
8181
pub(crate) fn siblings_from_predecessors(
8282
&self,
8383
component_id: u64,
84-
) -> Result<Siblings<N>, Error> {
84+
) -> Result<Siblings<'_, N>, Error> {
8585
Ok(Siblings::new(
8686
component_id,
8787
self.predecessors(component_id)?
@@ -96,7 +96,10 @@ where
9696
/// given `component_id`, that have shared successors.
9797
///
9898
/// Returns an error if the given `component_id` does not exist.
99-
pub(crate) fn siblings_from_successors(&self, component_id: u64) -> Result<Siblings<N>, Error> {
99+
pub(crate) fn siblings_from_successors(
100+
&self,
101+
component_id: u64,
102+
) -> Result<Siblings<'_, N>, Error> {
100103
Ok(Siblings::new(
101104
component_id,
102105
self.successors(component_id)?

0 commit comments

Comments
 (0)