pub trait CTBN {
type CIM;
type InitialDistribution;
type Event;
type Trajectory;
type Trajectories;
// Required methods
fn new<I>(graph: DiGraph, cims: I) -> Self
where I: IntoIterator<Item = Self::CIM>;
fn initial_distribution(&self) -> &Self::InitialDistribution;
fn graph(&self) -> &DiGraph;
fn cims(&self) -> &Map<String, Self::CIM>;
fn parameters_size(&self) -> usize;
fn with_optionals<I>(
name: Option<String>,
description: Option<String>,
initial_distribution: Self::InitialDistribution,
graph: DiGraph,
cims: I,
) -> Self
where I: IntoIterator<Item = Self::CIM>;
}Expand description
A trait for continuous time Bayesian networks (CTBNs).
Required Associated Types§
Sourcetype InitialDistribution
type InitialDistribution
The type of the initial distribution.
Sourcetype Trajectory
type Trajectory
The type of the observed trajectory.
Sourcetype Trajectories
type Trajectories
The type of a collection of trajectories.
Required Methods§
Sourcefn new<I>(graph: DiGraph, cims: I) -> Selfwhere
I: IntoIterator<Item = Self::CIM>,
fn new<I>(graph: DiGraph, cims: I) -> Selfwhere
I: IntoIterator<Item = Self::CIM>,
Sourcefn initial_distribution(&self) -> &Self::InitialDistribution
fn initial_distribution(&self) -> &Self::InitialDistribution
Sourcefn parameters_size(&self) -> usize
fn parameters_size(&self) -> usize
Sourcefn with_optionals<I>(
name: Option<String>,
description: Option<String>,
initial_distribution: Self::InitialDistribution,
graph: DiGraph,
cims: I,
) -> Selfwhere
I: IntoIterator<Item = Self::CIM>,
fn with_optionals<I>(
name: Option<String>,
description: Option<String>,
initial_distribution: Self::InitialDistribution,
graph: DiGraph,
cims: I,
) -> Selfwhere
I: IntoIterator<Item = Self::CIM>,
Creates a new categorical continuous-time Bayesian network with optional fields.
§Arguments
name- The name of the model.description- The description of the model.graph- The underlying graph.cims- The conditional intensity matrices.
§Panics
- Panics if
nameis an empty string. - Panics if
descriptionis an empty string.
§Returns
A new categorical continuous-time Bayesian network instance.
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.