Trait sprs::indexing::SpIndex[][src]

pub trait SpIndex: Debug + PrimInt + AddAssign<Self> + Default {
    fn index(self) -> usize;
fn from_usize(ind: usize) -> Self; }

A sparse matrix index

This is a convenience trait to enable using various integer sizes for sparse matrix indices.

Required Methods

Convert to usize

Panics

If the integer cannot be represented as an usize, eg negative numbers. The panic happens in debug builds only.

Convert from usize

Panics

If the input overflows the index type. The panic happens in debug builds only.

Implementations on Foreign Types

impl SpIndex for usize
[src]

impl SpIndex for isize
[src]

impl SpIndex for i64
[src]

impl SpIndex for i32
[src]

impl SpIndex for i16
[src]

impl SpIndex for u64
[src]

impl SpIndex for u32
[src]

impl SpIndex for u16
[src]

Implementors