Skip to main content

score_pattern_reference

Function score_pattern_reference 

Source
pub fn score_pattern_reference(
    pattern: &NaryRulePattern,
    candidates: &[HostRelation],
    positives: &[Vec<u64>],
    negatives: &[Vec<u64>],
) -> ReferenceCoverage
Expand description

Score one pattern against positive and negative example tuples.

candidates is indexed by the pattern’s candidate_slot values; each example tuple’s length must equal the pattern’s head arity. The caller validates the pattern first (NaryRulePattern::validate) — this interpreter assumes canonical form and panics only on indexing bugs, never on data.