Skip to content

Commit 88603ac

Browse files
author
maxtremblay
committed
Add non trivial elements iterator
1 parent 25fecb5 commit 88603ac

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/matrix/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ use constructor_utils::initialize_from;
1717
mod gauss_jordan;
1818
use gauss_jordan::GaussJordan;
1919

20+
mod non_trivial_elements;
21+
pub use self::non_trivial_elements::NonTrivialElements;
22+
2023
mod nullspace;
2124
use nullspace::nullspace;
2225

src/matrix/non_trivial_elements.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
use super::SparseBinMat;
2+
use crate::SparseBinSlice;
3+
4+
/// An iterator over the coordinates of non trivial elements.
5+
///
6+
/// See the [`non_trivial_elements`](SparseBinMat::non_trivial_elements) method.
7+
#[derive(Debug, Clone)]
8+
pub struct NonTrivialElements<'a> {}
9+
10+
impl<'a> NonTrivialElements<'a> {
11+
pub(super) fn new(matrix: &'a SparseBinMat) -> Self {}
12+
13+
fn move_to_next_row(&mut self) {
14+
todo!()
15+
}
16+
}
17+
18+
impl<'a> Iterator for NonTrivialElements<'a> {
19+
type Item = (usize, usize);
20+
21+
fn next(&mut self) -> Option<Self::Item> {}
22+
}
23+
24+
#[cfg(test)]
25+
mod test {
26+
use super::*;
27+
}

0 commit comments

Comments
 (0)