pub struct ReRooting<'a, M: Monoid, F: Fn(&M::T, usize, Option<usize>) -> M::T> {
pub dp: Vec<M::T>,
pub ep: Vec<M::T>,
/* private fields */
}
Expand description
dynamic programming on all-rooted trees
caluculate all subtrees (hanging on the edge) in specific ordering, each subtree calculated in the order of merge and rooting
Fields§
§dp: Vec<M::T>
dp[v]: result of v-rooted tree
ep: Vec<M::T>
ep[e]: result of e-subtree, if e >= n then reversed-e-subtree
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, M, F> Freeze for ReRooting<'a, M, F>where
F: Freeze,
impl<'a, M, F> RefUnwindSafe for ReRooting<'a, M, F>
impl<'a, M, F> Send for ReRooting<'a, M, F>
impl<'a, M, F> Sync for ReRooting<'a, M, F>
impl<'a, M, F> Unpin for ReRooting<'a, M, F>
impl<'a, M, F> UnwindSafe for ReRooting<'a, M, F>
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