pub struct HeuristicsBank { /* private fields */ }Expand description
The heuristics bank: a fixed-size collection of typed degradation motifs.
Version 1.0: 12 entries covering the primary distributed Rust system
failure patterns. The bank is finite and versioned — novel patterns
produce UnclassifiedStructuralAnomaly.
Implementations§
Source§impl HeuristicsBank
impl HeuristicsBank
Sourcepub fn default_bank() -> Self
pub fn default_bank() -> Self
Create a bank with the default Rust distributed-systems entries.
Sourcepub fn custom(entries: &'static [HeuristicEntry]) -> Self
pub fn custom(entries: &'static [HeuristicEntry]) -> Self
Create a bank with custom entries.
Sourcepub fn match_sign(
&self,
sign: &ResidualSign,
grammar_state: GrammarState,
) -> MatchResult
pub fn match_sign( &self, sign: &ResidualSign, grammar_state: GrammarState, ) -> MatchResult
Match a residual sign against the bank.
Returns the best-matching heuristic (highest confidence) or
UnclassifiedStructuralAnomaly if no entry matches.
Only matches when the grammar state is Boundary or Violation.
In Admissible state, returns NoAnomaly.
Sourcepub fn match_sign_with_priors(
&self,
sign: &ResidualSign,
grammar_state: GrammarState,
priors: &StaticPriorSet,
) -> MatchResult
pub fn match_sign_with_priors( &self, sign: &ResidualSign, grammar_state: GrammarState, priors: &StaticPriorSet, ) -> MatchResult
Match a residual sign against the bank using optional static priors.
Static priors do not force a detection. They only apply bounded threshold scaling to the candidate heuristic they target.