[−][src]Trait vrp_core::models::matrix::AdjacencyMatrix
An adjacency matrix trait specifies behaviour of a data structure which is used to store VRP solution.
Required methods
fn new(size: usize) -> Self
Creates a new AdjacencyMatrix with size
*size
fn values<'a>(&'a self) -> Box<dyn Iterator<Item = f64> + 'a>
Iterates over unique matrix values.
fn set_cell(&mut self, row: usize, col: usize, value: f64)
Sets given value to cell.
fn scan_row<F>(&self, row: usize, predicate: F) -> Option<usize> where
F: Fn(f64) -> bool,
F: Fn(f64) -> bool,
Scans given row in order to find first occurrence of element for which predicate returns true.