#[non_exhaustive]pub struct Stats {
pub expanded: u64,
pub generated: u64,
pub reopened: u64,
pub evaluations: u64,
}Expand description
Counters collected during one search run.
Non-exhaustive: later algorithms may add counters. Start from Stats::default where
a value is needed.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.expanded: u64States whose successors were generated. A goal state that ends the search is not counted. A state reopened through a cheaper path counts once per expansion.
generated: u64Edges reported by Successors::successors, whether
or not their target was new.
reopened: u64Closed states reopened because a cheaper path to them turned up. Always 0 for
breadth-first and greedy best-first search, and for A* with a consistent heuristic.
evaluations: u64True edge costs computed by an expensive edge evaluator. Only
lazy_sp evaluates edges; 0 everywhere else.
Trait Implementations§
Source§impl Budget<Stats> for Limits
Asked before every expansion, with the counters so far, so a search stopped by
Limits::max_expansions = n has expanded exactly n states. Closures
FnMut(&Stats) -> bool are budgets too, which lets callers with a clock (this crate is
no_std) add a time limit; annotate the argument (|stats: &Stats| ...).
impl Budget<Stats> for Limits
Asked before every expansion, with the counters so far, so a search stopped by
Limits::max_expansions = n has expanded exactly n states. Closures
FnMut(&Stats) -> bool are budgets too, which lets callers with a clock (this crate is
no_std) add a time limit; annotate the argument (|stats: &Stats| ...).