Trait AlgorithmContainer

Source
pub trait AlgorithmContainer {
    type HeuristicKind<'a>: Heuristic<RngProvider = Self::RngKind<'a>>;
    type HeuristicContainer<'a, const N: usize>: AsRef<[usize]> + AsMut<[usize]>;
    type RepresentativeContainer<'a, V: VertexType + 'a, const N: usize>: AsRef<[V]> + AsMut<[V]>;
    type RngKind<'a>: RngCore;
}
Expand description

This trait represents the kind of containers that is required for a particular algorithm to function

Required Associated Types§

Source

type HeuristicKind<'a>: Heuristic<RngProvider = Self::RngKind<'a>>

Source

type HeuristicContainer<'a, const N: usize>: AsRef<[usize]> + AsMut<[usize]>

Any kind of contiguous container

§Examples
  • [T; N]
  • [T; 0]
  • heapless::Vec<T, N>
Source

type RepresentativeContainer<'a, V: VertexType + 'a, const N: usize>: AsRef<[V]> + AsMut<[V]>

Any kind of contiguous container (should not be ZST). R must also live as long as 'a

§Examples
  • [T; N]
  • heaples::Vec<T, N>
Source

type RngKind<'a>: RngCore

Any kind of RNG

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl AlgorithmContainer for QuickFind<Borrowed>

Source§

impl AlgorithmContainer for QuickFind<Owned>

Source§

impl AlgorithmContainer for QuickUnion<ByRank<Owned>>

Source§

impl AlgorithmContainer for QuickUnion<BySize<Owned>>

Source§

impl<R, const P: bool> AlgorithmContainer for QuickUnion<ByRandom<R>, P>
where R: RngCore,

Source§

impl<R, const P: bool> AlgorithmContainer for QuickUnion<ByRandom<R, Borrowed<Fat>>, P>
where R: RngCore,

Source§

type HeuristicKind<'a> = ByRandom<R, Borrowed>

Source§

type HeuristicContainer<'a, const N: usize> = &'a mut [usize]

Source§

type RepresentativeContainer<'a, V: VertexType + 'a, const N: usize> = &'a mut [V]

Source§

type RngKind<'a> = R

Source§

impl<R, const P: bool> AlgorithmContainer for QuickUnion<ByRandom<R, Borrowed<Thin>>, P>
where R: RngCore,

Source§

type HeuristicKind<'a> = ByRandom<R, Borrowed<Thin>>

Source§

type HeuristicContainer<'a, const N: usize> = &'a mut [usize]

Source§

type RepresentativeContainer<'a, V: VertexType + 'a, const N: usize> = &'a mut [V]

Source§

type RngKind<'a> = R

Source§

impl<const P: bool> AlgorithmContainer for QuickUnion<ByRank<Borrowed<Fat>>, P>

Source§

type HeuristicKind<'a> = ByRank<Borrowed>

Source§

type HeuristicContainer<'a, const N: usize> = &'a mut [usize]

Source§

type RepresentativeContainer<'a, V: VertexType + 'a, const N: usize> = &'a mut [V]

Source§

type RngKind<'a> = PhantomRng

Source§

impl<const P: bool> AlgorithmContainer for QuickUnion<ByRank<Borrowed<Thin>>, P>

Source§

type HeuristicKind<'a> = ByRank<Borrowed<Thin>>

Source§

type HeuristicContainer<'a, const N: usize> = &'a mut [usize; N]

Source§

type RepresentativeContainer<'a, V: VertexType + 'a, const N: usize> = &'a mut [V; N]

Source§

type RngKind<'a> = PhantomRng

Source§

impl<const P: bool> AlgorithmContainer for QuickUnion<BySize<Borrowed<Fat>>, P>

Source§

type HeuristicKind<'a> = BySize<Borrowed>

Source§

type HeuristicContainer<'a, const N: usize> = &'a mut [usize]

Source§

type RepresentativeContainer<'a, V: VertexType + 'a, const N: usize> = &'a mut [V]

Source§

type RngKind<'a> = PhantomRng

Source§

impl<const P: bool> AlgorithmContainer for QuickUnion<BySize<Borrowed<Thin>>, P>

Source§

type HeuristicKind<'a> = BySize<Borrowed<Thin>>

Source§

type HeuristicContainer<'a, const N: usize> = &'a mut [usize; N]

Source§

type RepresentativeContainer<'a, V: VertexType + 'a, const N: usize> = &'a mut [V; N]

Source§

type RngKind<'a> = PhantomRng

Source§

impl<const P: bool> AlgorithmContainer for QuickUnion<Unweighted<Borrowed<Fat>>, P>

Source§

impl<const P: bool> AlgorithmContainer for QuickUnion<Unweighted<Borrowed<Thin>>, P>

Source§

impl<const P: bool> AlgorithmContainer for QuickUnion<Unweighted<Owned>, P>