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§
Sourcefn call<T>(
&self,
net: &T,
node: usize,
parent_set: &BTreeSet<usize>,
dataset: &Dataset,
) -> f64where
T: NetworkProcess,
fn call<T>(
&self,
net: &T,
node: usize,
parent_set: &BTreeSet<usize>,
dataset: &Dataset,
) -> f64where
T: NetworkProcess,
Compute the score function for a node its parentset given a dataset.
§Arguments
net:NetworkProcessobject.node: Node target for the decomposable score.parent_set: parentset of thenode.dataset: instantiation of thestruct tools::Datasetcontaining the observations used to compute the score.
§Return
- A
floatrepresenting 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.