pub struct PotentializedUnionFind<G: CommutativeGroup>where
<G as Magma>::Set: Clone,{ /* private fields */ }
Expand description
ポテンシャルつき union-find。
Idea
通常の union-find に加え、配列 pot
を管理する。
親ノード par
と子ノード child
に対して、pot[child]
には
phi(child) - phi(par)
を持つようにする。
代表元を探してパスを縮約する際、ポテンシャル差の更新を適切に行う。
Implementations§
Trait Implementations§
source§impl<G: Clone + CommutativeGroup> Clone for PotentializedUnionFind<G>where
<G as Magma>::Set: Clone,
impl<G: Clone + CommutativeGroup> Clone for PotentializedUnionFind<G>where <G as Magma>::Set: Clone,
source§fn clone(&self) -> PotentializedUnionFind<G>
fn clone(&self) -> PotentializedUnionFind<G>
Returns a copy 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 moreAuto Trait Implementations§
impl<G> !RefUnwindSafe for PotentializedUnionFind<G>
impl<G> Send for PotentializedUnionFind<G>where G: Send, <G as Magma>::Set: Send,
impl<G> !Sync for PotentializedUnionFind<G>
impl<G> Unpin for PotentializedUnionFind<G>where G: Unpin, <G as Magma>::Set: Unpin,
impl<G> UnwindSafe for PotentializedUnionFind<G>where G: UnwindSafe, <G as Magma>::Set: 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