Type Definition net_ensembles::spacial::SpacialGraph [−][src]
pub type SpacialGraph<T> = GenericGraph<T, SpacialNodeContainer<T>>;
Expand description
Type definiton for convinience. This is used to implement the spacial ensemble
Implementations
pub fn distance(&self, i: usize, j: usize) -> Option<f64> where
SpacialNodeContainer<T>: AdjContainer<T>,
pub fn distance(&self, i: usize, j: usize) -> Option<f64> where
SpacialNodeContainer<T>: AdjContainer<T>,
Euclidean distance between two vertices
- Calculates the distance between the vertices
corresponding to the indices
i
andj
None
if any of the indices is out of bounds