Struct pulau_rs::quickunion::QuickUnion
source · Expand description
QuickUnion
algorithm
This algorithm is parameterized by the following
H
- Heuristic Type. Available types:ByRank
,BySize
,Unweighted
COMPRESS_PATH
- boolean value, enables path compression during find operation
By default, ByRank
heuristic is used and path compression is enabled
Trait Implementations§
source§impl AlgorithmContainer for QuickUnion<ByRank<true>>
impl AlgorithmContainer for QuickUnion<ByRank<true>>
§type HeuristicContainer<'a, const N: usize> = &'a mut [usize]
type HeuristicContainer<'a, const N: usize> = &'a mut [usize]
Any kind of contiguous container Read more
§type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = &'a mut [R]
type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = &'a mut [R]
source§impl AlgorithmContainer for QuickUnion<ByRank>
impl AlgorithmContainer for QuickUnion<ByRank>
§type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = [R; N]
type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = [R; N]
source§impl AlgorithmContainer for QuickUnion<BySize<true>>
impl AlgorithmContainer for QuickUnion<BySize<true>>
§type HeuristicContainer<'a, const N: usize> = &'a mut [usize]
type HeuristicContainer<'a, const N: usize> = &'a mut [usize]
Any kind of contiguous container Read more
§type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = &'a mut [R]
type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = &'a mut [R]
source§impl AlgorithmContainer for QuickUnion<BySize>
impl AlgorithmContainer for QuickUnion<BySize>
§type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = [R; N]
type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = [R; N]
source§impl<const PATH_COMPRESS: bool> AlgorithmContainer for QuickUnion<Unweighted, PATH_COMPRESS>
impl<const PATH_COMPRESS: bool> AlgorithmContainer for QuickUnion<Unweighted, PATH_COMPRESS>
§type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = [R; N]
type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = [R; N]
source§impl<const PATH_COMPRESS: bool> AlgorithmContainer for QuickUnion<Unweighted<true>, PATH_COMPRESS>
impl<const PATH_COMPRESS: bool> AlgorithmContainer for QuickUnion<Unweighted<true>, PATH_COMPRESS>
§type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = &'a mut [R]
type RepresentativeContainer<'a, R: VertexType + 'a, const N: usize> = &'a mut [R]
source§impl<H, T, const PATH_COMPRESS: bool> Connected<T> for QuickUnion<H, PATH_COMPRESS>where
T: VertexType,
Self: Find<T>,
impl<H, T, const PATH_COMPRESS: bool> Connected<T> for QuickUnion<H, PATH_COMPRESS>where
T: VertexType,
Self: Find<T>,
fn connected(
representative: &mut [T],
a: T::IdentifierType,
b: T::IdentifierType
) -> bool
source§impl<H: Default, const COMPRESS_PATH: bool> Default for QuickUnion<H, COMPRESS_PATH>
impl<H: Default, const COMPRESS_PATH: bool> Default for QuickUnion<H, COMPRESS_PATH>
source§fn default() -> QuickUnion<H, COMPRESS_PATH>
fn default() -> QuickUnion<H, COMPRESS_PATH>
Returns the “default value” for a type. Read more