Trait diffsol::vector::VectorIndex

source ·
pub trait VectorIndex: Sized + Index<IndexType, Output = IndexType> + Debug {
    // Required methods
    fn zeros(len: IndexType) -> Self;
    fn len(&self) -> IndexType;
    fn clone_as_vec(&self) -> Vec<IndexType>;
    fn from_slice(slice: &[IndexType]) -> Self;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Methods§

source

fn zeros(len: IndexType) -> Self

source

fn len(&self) -> IndexType

source

fn clone_as_vec(&self) -> Vec<IndexType>

source

fn from_slice(slice: &[IndexType]) -> Self

Provided Methods§

source

fn is_empty(&self) -> bool

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl VectorIndex for Vec<IndexType>

source§

fn zeros(len: IndexType) -> Self

source§

fn len(&self) -> IndexType

source§

fn from_slice(slice: &[IndexType]) -> Self

source§

fn clone_as_vec(&self) -> Vec<IndexType>

source§

impl VectorIndex for DVector<IndexType>

source§

fn zeros(len: IndexType) -> Self

source§

fn len(&self) -> IndexType

source§

fn from_slice(slice: &[IndexType]) -> Self

source§

fn clone_as_vec(&self) -> Vec<IndexType>

Implementors§