pub struct WeightedEntropy;Expand description
Lowest weighted entropy of the children first.
Trait Implementations§
Source§impl Default for WeightedEntropy
impl Default for WeightedEntropy
Source§fn default() -> WeightedEntropy
fn default() -> WeightedEntropy
Returns the “default value” for a type. Read more
Source§impl Heuristic for WeightedEntropy
impl Heuristic for WeightedEntropy
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 WeightedEntropy
impl RefUnwindSafe for WeightedEntropy
impl Send for WeightedEntropy
impl Sync for WeightedEntropy
impl Unpin for WeightedEntropy
impl UnsafeUnpin for WeightedEntropy
impl UnwindSafe for WeightedEntropy
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