Skip to content

Commit 5f2a1f8

Browse files
committed
Use IndPtr inside CsMat
1 parent 34b306a commit 5f2a1f8

File tree

9 files changed

+173
-387
lines changed

9 files changed

+173
-387
lines changed

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ pub use crate::indexing::SpIndex;
8989

9090
pub use crate::sparse::{
9191
csmat::CsIter,
92-
csmat::OuterIterator,
93-
csmat::OuterIteratorMut,
94-
csmat::OuterIteratorPerm,
9592
indptr::{IndPtr, IndPtrBase, IndPtrView},
9693
kronecker::kronecker_product,
9794
CsMat, CsMatBase, CsMatI, CsMatVecView, CsMatView, CsMatViewI,

src/sparse.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use crate::array_backend::Array2;
22
use crate::errors::SprsError;
33
use crate::indexing::SpIndex;
4+
use crate::IndPtrBase;
45
use std::ops::Deref;
56

67
#[cfg(feature = "serde")]
@@ -93,7 +94,7 @@ where
9394
storage: CompressedStorage,
9495
nrows: usize,
9596
ncols: usize,
96-
indptr: IptrStorage,
97+
indptr: IndPtrBase<Iptr, IptrStorage>,
9798
indices: IndStorage,
9899
data: DataStorage,
99100
}

src/sparse/binop.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use crate::sparse::csmat::CompressedStorage;
55
use crate::sparse::prelude::*;
66
use crate::sparse::vec::NnzEither::{Both, Left, Right};
77
use crate::sparse::vec::SparseIterTools;
8+
use crate::IndPtr;
89
use ndarray::{
910
self, Array, ArrayBase, ArrayView, ArrayViewMut, Axis, ShapeBuilder,
1011
};
@@ -125,7 +126,7 @@ where
125126
storage,
126127
nrows,
127128
ncols,
128-
indptr: out_indptr,
129+
indptr: IndPtr::new_trusted(out_indptr),
129130
indices: out_indices,
130131
data: out_data,
131132
}

0 commit comments

Comments
 (0)