fix(mincut): refine hierarchy warm-start logic

This commit is contained in:
Claude 2026-01-25 15:01:57 +00:00
parent 384c4f9571
commit 48463a208b
No known key found for this signature in database

View file

@ -162,7 +162,6 @@ pub struct JTreeStatistics {
}
/// State of a level (for lazy evaluation)
#[derive(Debug)]
enum LevelState {
/// Not yet materialized
Unmaterialized,
@ -172,6 +171,16 @@ enum LevelState {
Dirty(Box<dyn JTreeLevel>),
}
impl std::fmt::Debug for LevelState {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Unmaterialized => write!(f, "Unmaterialized"),
Self::Materialized(l) => write!(f, "Materialized(level={})", l.level()),
Self::Dirty(l) => write!(f, "Dirty(level={})", l.level()),
}
}
}
/// The main j-tree hierarchy structure
pub struct JTreeHierarchy {
/// Configuration