struct SubtreeSum;Trait Implementations§
Source§impl LinkCutTreeSpec for SubtreeSum
impl LinkCutTreeSpec for SubtreeSum
Source§const ROOT_TO_NODE_TOP_DOWN: bool = false
const ROOT_TO_NODE_TOP_DOWN: bool = false
Whether splay must propagate from the auxiliary root before rotations.
type Value = u64
type Data = SubtreeSumData
fn new(value: Self::Value) -> Self::Data
fn value(data: &Self::Data) -> &Self::Value
fn value_mut(data: &mut Self::Data) -> &mut Self::Value
fn bottom_up(data: &mut Self::Data, children: [Option<&Self::Data>; 2])
fn reverse(_data: &mut Self::Data)
fn attach_virtual(parent: &mut Self::Data, child: &mut Self::Data)
fn detach_virtual(parent: &mut Self::Data, child: &mut Self::Data)
Source§const MODIFY_REQUIRES_ACCESS: bool = true
const MODIFY_REQUIRES_ACCESS: bool = true
Whether
modify must expose the node to update virtual subtree state.fn top_down(_data: &mut Self::Data, _children: [Option<&mut Self::Data>; 2])
Source§fn transfer_path_parent(_old_root: &mut Self::Data, _new_root: &mut Self::Data)
fn transfer_path_parent(_old_root: &mut Self::Data, _new_root: &mut Self::Data)
Moves state associated with the same path-parent edge after a splay.
Source§impl LinkCutTreeSubtreeFold for SubtreeSum
impl LinkCutTreeSubtreeFold for SubtreeSum
Source§impl TopTreeSpec for SubtreeSum
impl TopTreeSpec for SubtreeSum
type Info = u64
type Point = (u64, u64)
type Path = (u64, u64, u64)
fn vertex(info: &Self::Info) -> Self::Path
fn add_vertex(point: &Self::Point, info: &Self::Info) -> Self::Path
fn add_edge(path: &Self::Path) -> Self::Point
fn rake(left: &Self::Point, right: &Self::Point) -> Self::Point
fn compress(left: &Self::Path, right: &Self::Path) -> Self::Path
fn reverse(_path: &mut Self::Path)
Auto Trait Implementations§
impl Freeze for SubtreeSum
impl RefUnwindSafe for SubtreeSum
impl Send for SubtreeSum
impl Sync for SubtreeSum
impl Unpin for SubtreeSum
impl UnsafeUnpin for SubtreeSum
impl UnwindSafe for SubtreeSum
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