You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the Clone trait for LazySegtree.
Since both MapMonoid::F and <F::M as Monoid>::S have the Clone constraint, it can be derived.
Additionally, LazySegtree already has a Debug implementation, but there is a comment saying // TODO is it useful? .
It may be necessary to discuss whether to implement Debug for FenwickTree and Segtree based on this implementation.
The text was updated successfully, but these errors were encountered:
I'd like to propose a few improvements to the current Debug implementation for LazySegtree.
Currently, the fields n, size, and log are not displayed. I think it would be better to include them in the output as well.
Additionally, since the current implementation uses tabs and newlines manually rather than relying on helper methods like debug_struct, the output remains the same even when using the alternate flag ({:#?}).
To address this, I would like to update the implementation to use helpers such as debug_struct to provide proper formatting and alternate flag support.
More specifically, I’m thinking of displaying d and lz separately, formatting each in a way similar to a two-dimensional vector grouped by segment length.
To help clarify what I have in mind, I’m also considering opening a draft PR with a sample implementation.
Implement the
Clone
trait forLazySegtree
.Since both
MapMonoid::F
and<F::M as Monoid>::S
have theClone
constraint, it can be derived.Additionally,
LazySegtree
already has aDebug
implementation, but there is a comment saying// TODO is it useful?
.It may be necessary to discuss whether to implement
Debug
forFenwickTree
andSegtree
based on this implementation.The text was updated successfully, but these errors were encountered: