[][src]Struct vrp_core::models::matrix::SparseMatrix

pub struct SparseMatrix {
    pub data: HashMap<usize, Vec<(usize, f64)>>,
    pub values: HashSet<i64>,
    pub size: usize,
}

A simple AdjacencyMatrix using naive sparse matrix implementation.

Fields

data: HashMap<usize, Vec<(usize, f64)>>values: HashSet<i64>size: usize

Implementations

impl SparseMatrix[src]

pub fn to_vvec(&self) -> Vec<Vec<f64>>[src]

Converts SparseMatrix to vector of vectors representation.

pub fn from_vvec(matrix: &[Vec<f64>]) -> Self[src]

Creates SparseMatrix from vector of vectors representation.

Trait Implementations

impl AdjacencyMatrix for SparseMatrix[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,