pub struct VoronoiPartition {
pub membership: Vec<Option<u32>>,
pub distances: Vec<f64>,
}Expand description
Result of voronoi: the Voronoi cell each vertex belongs to plus
the distance to its assigned generator.
membership[v] is the index into generators of the generator
vertex that v was assigned to (so generators[membership[v] .unwrap()] is the vertex id of that generator). None means v is
unreachable from every generator. distances[v] is the shortest-path
distance from v to its generator (under the given mode), or
f64::INFINITY if unreachable.
Fields§
§membership: Vec<Option<u32>>Per-vertex generator index; None for unreachable vertices.
distances: Vec<f64>Per-vertex distance to assigned generator; f64::INFINITY if
unreachable. Unweighted graphs round to integer values.
Trait Implementations§
Source§impl Clone for VoronoiPartition
impl Clone for VoronoiPartition
Source§fn clone(&self) -> VoronoiPartition
fn clone(&self) -> VoronoiPartition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VoronoiPartition
impl Debug for VoronoiPartition
Source§impl PartialEq for VoronoiPartition
impl PartialEq for VoronoiPartition
impl StructuralPartialEq for VoronoiPartition
Auto Trait Implementations§
impl Freeze for VoronoiPartition
impl RefUnwindSafe for VoronoiPartition
impl Send for VoronoiPartition
impl Sync for VoronoiPartition
impl Unpin for VoronoiPartition
impl UnsafeUnpin for VoronoiPartition
impl UnwindSafe for VoronoiPartition
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