shine-graph 0.2.0

SHINE. Graph and sparse matrix module for the shine engine.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub trait Store {
    type Item;

    fn get(&self, idx: usize) -> &Self::Item;
}

pub trait StoreMut: Store {
    fn clear(&mut self);

    fn add(&mut self, idx: usize, value: Self::Item);
    fn replace(&mut self, idx: usize, value: Self::Item) -> Self::Item;
    fn remove(&mut self, idx: usize) -> Self::Item;

    fn get_mut(&mut self, idx: usize) -> &mut Self::Item;
}