ScoreFunction

Trait ScoreFunction 

Source
pub trait ScoreFunction: Sync {
    // Required method
    fn call<T>(
        &self,
        net: &T,
        node: usize,
        parent_set: &BTreeSet<usize>,
        dataset: &Dataset,
    ) -> f64
       where T: NetworkProcess;
}
Expand description

It defines the required methods for a decomposable ScoreFunction functor over a NetworkProcess

Required Methods§

Source

fn call<T>( &self, net: &T, node: usize, parent_set: &BTreeSet<usize>, dataset: &Dataset, ) -> f64
where T: NetworkProcess,

Compute the score function for a node its parentset given a dataset.

§Arguments
  • net: NetworkProcess object.
  • node: Node target for the decomposable score.
  • parent_set: parentset of the node.
  • dataset: instantiation of the struct tools::Dataset containing the observations used to compute the score.
§Return
  • A float representing the score of the node given the dataset.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§