Skip to content

Commit

Permalink
Add regulation iterator to RegulatoryGraph.
Browse files Browse the repository at this point in the history
  • Loading branch information
daemontus committed Dec 29, 2020
1 parent 9448237 commit ef430ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/_impl_regulatory_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ impl RegulatoryGraph {
pub fn variables(&self) -> VariableIdIterator {
(0..self.variables.len()).map(VariableId)
}

pub fn regulations(&self) -> std::slice::Iter<Regulation> {
self.regulations.iter()
}
}

/// Allow indexing `RegulatoryGraph` using `VariableId` objects.
Expand Down

0 comments on commit ef430ae

Please sign in to comment.