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§
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
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".