pub struct NoHeuristic;Expand description
Keeps the candidates in their original order.
Trait Implementations§
Source§impl Default for NoHeuristic
impl Default for NoHeuristic
Source§fn default() -> NoHeuristic
fn default() -> NoHeuristic
Returns the “default value” for a type. Read more
Source§impl Heuristic for NoHeuristic
impl Heuristic for NoHeuristic
Source§fn compute(&self, _cover: &mut Cover, _candidates: &mut Vec<usize>) -> Vec<f64>
fn compute(&self, _cover: &mut Cover, _candidates: &mut Vec<usize>) -> Vec<f64>
Sorts
candidates best first and returns their scores in the same
order (empty when the heuristic does not score).Source§fn compute_with_scorer(
&self,
parent_entropy: f64,
cover: &mut Cover,
candidates: &mut Vec<usize>,
scorer: Box<dyn Fn(&[usize], &[usize], &[usize], f64) -> f64>,
lower_is_better: bool,
) -> Vec<f64>
fn compute_with_scorer( &self, parent_entropy: f64, cover: &mut Cover, candidates: &mut Vec<usize>, scorer: Box<dyn Fn(&[usize], &[usize], &[usize], f64) -> f64>, lower_is_better: bool, ) -> Vec<f64>
Scores each candidate with
scorer and sorts them, ascending when
lower_is_better and descending otherwise.Auto Trait Implementations§
impl Freeze for NoHeuristic
impl RefUnwindSafe for NoHeuristic
impl Send for NoHeuristic
impl Sync for NoHeuristic
impl Unpin for NoHeuristic
impl UnsafeUnpin for NoHeuristic
impl UnwindSafe for NoHeuristic
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