// Check properties that would typically be considered invariants of the format.
// It is a logic error to call other methods on this type when these properties
// are not satisfied.
Check properties that would typically be considered invariants of the format.
It is a logic error to call other methods on this type when these properties
are not satisfied.
Check properties that would typically be considered invariants of the format . It is a logic error to call other methods on this type when these properties are not satisfied .
pub fn validate(&self) -> Result<(), SparseMatrixError>  {
        let RawBee { dim, ref map } = *self;
        ensure!(map.keys().max().unwrap().index() < dim.0, "row out of range");
        ensure!(map.values().filter_map(|m| m.keys().max()).max().unwrap().index() < dim.1, "col out of range");
        Ok(())
    }
pub fn validate ( & self ) -> Result < ( ) , SparseMatrixError > { let RawBee { dim , ref map } = * self ; ensure ! ( map keys ( ) max ( ) unwrap ( ) index ( ) dim 0 " " ) ; ensure ! ( map values ( ) filter_map ( m m keys ( ) max ( ) ) max ( ) unwrap ( ) index ( ) dim 1 " " ) ; Ok ( ( ) ) }
Check properties that would typically be considered invariants of the format.
Check properties that would typically be considered invariants of the format .
&self