pub struct DecomposeOptions {
pub allow_steiner: bool,
pub max_rotation_attempts: usize,
pub collect_trace: bool,
pub minimize_parts: bool,
}Expand description
Options for the decompose() cascade.
Fields§
§allow_steiner: boolIf true, Bayazit may introduce Steiner points at edge intersections. If false, only original vertices are used (exact_vertex_partition preferred).
max_rotation_attempts: usizeNumber of ring rotation attempts if initial decomposition fails. Default: vertex_count.
collect_trace: bool§minimize_parts: boolIf false (default) — cascade mode: try ExactPartition → Bayazit →
EarClipMerge in order and return the first strategy that passes
validation. This minimizes Steiner-point pollution and keeps the
on-chain client behaviour deterministic.
If true — run every strategy across every rotation that is
attempted, collect all validated candidates, and return the one with
the fewest parts. Ties are broken by: fewer Steiner points, then
earlier rotation, then strategy preference (Exact > Bayazit > EarClip).
Strictly more work than cascade mode; intended for demos, tooling,
and research where “absolute minimum parts” matters more than
cascade determinism.
Trait Implementations§
Source§impl Clone for DecomposeOptions
impl Clone for DecomposeOptions
Source§fn clone(&self) -> DecomposeOptions
fn clone(&self) -> DecomposeOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more