pub trait VariableOrder {
// Required methods
fn name(&self) -> &'static str;
fn order(&self, hg: &HypergraphRule) -> Vec<VertexId>;
}Expand description
Compute a variable order for a HypergraphRule.
Returned vectors must:
- contain every
VertexIdinhg.vertex_ids()exactly once, - be deterministic for a given input (same
hg→ same output), - not depend on hidden mutable state (e.g. process-wide RNG).
Determinism is the contract that lets the explain output be snapshot-tested. Implementations that want randomness should expose a seeded constructor and document the seeding policy.
Required Methods§
Sourcefn name(&self) -> &'static str
fn name(&self) -> &'static str
Stable identifier for this order’s strategy. Used by the
explain output (e.g. "appearance", "selectivity-greedy").
Sourcefn order(&self, hg: &HypergraphRule) -> Vec<VertexId>
fn order(&self, hg: &HypergraphRule) -> Vec<VertexId>
Compute the order. See trait-level contract for invariants.