Skip to main content

GeneralLossComputer

Trait GeneralLossComputer 

Source
pub trait GeneralLossComputer {
    // Required methods
    fn expected_loss_kernel(&self) -> f64;
    fn speculative_add(
        &mut self,
        partition: &Partition,
        i: usize,
        subset_index: LabelType,
    ) -> f64;
    fn new_subset(&mut self, partition: &mut Partition);
    fn add_with_index(
        &mut self,
        partition: &mut Partition,
        i: usize,
        subset_index: LabelType,
    );
    fn remove(&mut self, partition: &mut Partition, i: usize) -> LabelType;
}

Required Methods§

Source

fn expected_loss_kernel(&self) -> f64

Source

fn speculative_add( &mut self, partition: &Partition, i: usize, subset_index: LabelType, ) -> f64

Source

fn new_subset(&mut self, partition: &mut Partition)

Source

fn add_with_index( &mut self, partition: &mut Partition, i: usize, subset_index: LabelType, )

Source

fn remove(&mut self, partition: &mut Partition, i: usize) -> LabelType

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§