mod categorical;
pub use categorical::*;
mod gaussian;
pub use gaussian::*;
use crate::{
models::graphs::DiGraph,
types::{Map, Result, Set},
};
pub trait BN {
type CPD;
type Evidence;
type Sample;
type Samples;
type IncSamples;
type WtdSamples;
fn new<I>(graph: DiGraph, cpds: I) -> Result<Self>
where
I: IntoIterator<Item = Self::CPD>,
Self: Sized;
fn name(&self) -> Option<&str>;
fn description(&self) -> Option<&str>;
fn graph(&self) -> &DiGraph;
fn cpds(&self) -> &Map<String, Self::CPD>;
fn parameters_size(&self) -> usize;
fn select(&self, x: &Set<usize>) -> Result<Self>
where
Self: Sized;
fn topological_order(&self) -> &[usize];
fn with_optionals<I>(
name: Option<String>,
description: Option<String>,
graph: DiGraph,
cpds: I,
) -> Result<Self>
where
I: IntoIterator<Item = Self::CPD>,
Self: Sized;
}