pub struct CooBuilder { /* private fields */ }Implementations§
Source§impl CooBuilder
impl CooBuilder
Sourcepub fn with_capacity(n: usize, capacity: usize) -> Self
pub fn with_capacity(n: usize, capacity: usize) -> Self
Square n × n accumulator with a pre-sized entry table.
Sourcepub fn with_capacity_rect(rows: usize, cols: usize, capacity: usize) -> Self
pub fn with_capacity_rect(rows: usize, cols: usize, capacity: usize) -> Self
Rectangular rows × cols accumulator with a pre-sized entry table.
Sourcepub fn add(&mut self, i: usize, j: usize, v: f64)
pub fn add(&mut self, i: usize, j: usize, v: f64)
Accumulate v into entry (i, j). Skips the insert if v == 0.0.
§Panics
Panics if (i, j) is outside the matrix shape or the packed coordinate
key overflows usize.
Sourcepub fn add_sym(&mut self, i: usize, j: usize, v: f64)
pub fn add_sym(&mut self, i: usize, j: usize, v: f64)
Symmetrically accumulate v into both (i, j) and (j, i). Square
builders only.
Sourcepub fn finish_csr(self) -> CsMat<f64>
pub fn finish_csr(self) -> CsMat<f64>
Finish as a CsMat<f64> (CSR) with explicit zeros pruned.
Sourcepub fn finish_csc(self) -> CsMat<f64>
pub fn finish_csc(self) -> CsMat<f64>
Finish as a CSC matrix.
Trait Implementations§
Source§impl Clone for CooBuilder
impl Clone for CooBuilder
Auto Trait Implementations§
impl Freeze for CooBuilder
impl RefUnwindSafe for CooBuilder
impl Send for CooBuilder
impl Sync for CooBuilder
impl Unpin for CooBuilder
impl UnsafeUnpin for CooBuilder
impl UnwindSafe for CooBuilder
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more