pub struct DistanceMatrix<T: Num> { /* private fields */ }Expand description
A structure representing a matrix of float/int weights/distances.
§Example usage
use elkai_rs::DistanceMatrix;
fn main() {
let cities = DistanceMatrix::new(vec![
vec![0, 4, 0],
vec![0, 0, 5],
vec![0, 0, 0]
]);
println!("{:?}", cities.solve(10));
}Implementations§
Source§impl<T: Num> DistanceMatrix<T>
impl<T: Num> DistanceMatrix<T>
Auto Trait Implementations§
impl<T> Freeze for DistanceMatrix<T>
impl<T> RefUnwindSafe for DistanceMatrix<T>where
T: RefUnwindSafe,
impl<T> Send for DistanceMatrix<T>where
T: Send,
impl<T> Sync for DistanceMatrix<T>where
T: Sync,
impl<T> Unpin for DistanceMatrix<T>where
T: Unpin,
impl<T> UnwindSafe for DistanceMatrix<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more