pub struct SearchControl {
pub order: SearchOrder,
pub seed: u64,
pub max_work: Option<u64>,
pub max_results: Option<usize>,
pub max_frontier: Option<usize>,
pub max_memory_nodes: Option<usize>,
pub max_time: Option<Duration>,
pub branch_and_bound: bool,
pub costs: WorkCosts,
}Expand description
Bounds, ordering, seed, and accounting policy for one search run.
Fields§
§order: SearchOrderDeterministic frontier ordering policy.
seed: u64Caller-supplied seed recorded in the receipt digest.
max_work: Option<u64>Optional maximum charged work.
max_results: Option<usize>Optional maximum number of emitted outputs.
max_frontier: Option<usize>Optional maximum frontier length.
max_memory_nodes: Option<usize>Optional maximum frontier + results node count.
max_time: Option<Duration>Optional wall-clock deadline for the run.
branch_and_bound: boolWhether lower-bound pruning uses the best emitted output score.
costs: WorkCostsPer-operation work charges.
Implementations§
Source§impl SearchControl
impl SearchControl
Sourcepub fn with_order(self, order: SearchOrder) -> Self
pub fn with_order(self, order: SearchOrder) -> Self
Return a copy with a different deterministic frontier order.
Sourcepub fn with_max_work(self, max_work: u64) -> Self
pub fn with_max_work(self, max_work: u64) -> Self
Return a copy with a maximum charged-work bound.
Sourcepub fn with_max_results(self, max_results: usize) -> Self
pub fn with_max_results(self, max_results: usize) -> Self
Return a copy with a maximum emitted-result bound.
Sourcepub fn with_max_frontier(self, max_frontier: usize) -> Self
pub fn with_max_frontier(self, max_frontier: usize) -> Self
Return a copy with a maximum frontier bound.
Sourcepub fn with_max_memory_nodes(self, max_memory_nodes: usize) -> Self
pub fn with_max_memory_nodes(self, max_memory_nodes: usize) -> Self
Return a copy with a maximum frontier + results bound.
Sourcepub fn with_max_time(self, max_time: Duration) -> Self
pub fn with_max_time(self, max_time: Duration) -> Self
Return a copy with a wall-clock deadline.
Sourcepub fn with_branch_and_bound(self, enabled: bool) -> Self
pub fn with_branch_and_bound(self, enabled: bool) -> Self
Return a copy with branch-and-bound pruning enabled or disabled.
Sourcepub fn with_costs(self, costs: WorkCosts) -> Self
pub fn with_costs(self, costs: WorkCosts) -> Self
Return a copy with explicit per-operation work costs.
Trait Implementations§
Source§impl Clone for SearchControl
impl Clone for SearchControl
Source§fn clone(&self) -> SearchControl
fn clone(&self) -> SearchControl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more