mod categorical;
pub use categorical::*;
mod gaussian;
pub use gaussian::*;
use crate::{models::graphs::DiGraph, types::Map};
pub trait BN {
type CPD;
type Evidence;
type Sample;
type Samples;
fn new<I>(graph: DiGraph, cpds: I) -> Self
where
I: IntoIterator<Item = Self::CPD>;
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 topological_order(&self) -> &[usize];
fn with_optionals<I>(
name: Option<String>,
description: Option<String>,
graph: DiGraph,
cpds: I,
) -> Self
where
I: IntoIterator<Item = Self::CPD>;
}