pub struct CompressedDAGSearcher { /* private fields */ }
Expand description
Performs a robust binary search over a CompressedDAG.
Implementations§
Source§impl CompressedDAGSearcher
impl CompressedDAGSearcher
Sourcepub fn new(graph: Rc<CompressedDAG>) -> Self
pub fn new(graph: Rc<CompressedDAG>) -> Self
Creates a new CompressedDAGSearcher.
Sourcepub fn confidence_percentile_ceil(
&self,
percentile: f64,
) -> CompressedDAGNodeRef
pub fn confidence_percentile_ceil( &self, percentile: f64, ) -> CompressedDAGNodeRef
Returns the node whose percentile (i.e. the sum of weights over the node and its ancestors) is smallest but greater than or equal to the argument.
Sourcepub fn best_node(&self) -> CompressedDAGNodeRef
pub fn best_node(&self) -> CompressedDAGNodeRef
Returns the current estimate of the best node.
Sourcepub fn next_node(&self) -> CompressedDAGNodeRef
pub fn next_node(&self) -> CompressedDAGNodeRef
Returns the next node that should be tested.
Sourcepub fn report(
&mut self,
node: CompressedDAGNodeRef,
heads: bool,
flakiness: f64,
)
pub fn report( &mut self, node: CompressedDAGNodeRef, heads: bool, flakiness: f64, )
Adds a vote to the internal statistics. With low flakiness, nodes with false votes are expected not to nodes with true votes as ancestors.
§Panics
Panics if the node is out of range.
Sourcepub fn likelihood(&self, node: CompressedDAGNodeRef) -> f64
pub fn likelihood(&self, node: CompressedDAGNodeRef) -> f64
Trait Implementations§
Source§impl Clone for CompressedDAGSearcher
impl Clone for CompressedDAGSearcher
Source§fn clone(&self) -> CompressedDAGSearcher
fn clone(&self) -> CompressedDAGSearcher
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CompressedDAGSearcher
impl RefUnwindSafe for CompressedDAGSearcher
impl !Send for CompressedDAGSearcher
impl !Sync for CompressedDAGSearcher
impl Unpin for CompressedDAGSearcher
impl UnwindSafe for CompressedDAGSearcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more