CTBN

Trait CTBN 

Source
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§

Source

type CIM

The type of the CIM.

Source

type InitialDistribution

The type of the initial distribution.

Source

type Event

The type of the observed event.

Source

type Trajectory

The type of the observed trajectory.

Source

type Trajectories

The type of a collection of trajectories.

Required Methods§

Source

fn new<I>(graph: DiGraph, cims: I) -> Self
where I: IntoIterator<Item = Self::CIM>,

Constructs a new CTBN.

§Arguments
  • graph - The underlying graph.
  • cims - The conditional intensity matrices.
§Notes

The distribution of the initial state (i.e. initial distribution) is uniform. See with_initial_distribution to specify the initial distribution.

§Returns

A new CTBN instance.

Source

fn initial_distribution(&self) -> &Self::InitialDistribution

Returns the initial distribution.

§Returns

A reference to the initial distribution.

Source

fn graph(&self) -> &DiGraph

Returns the underlying graph.

§Returns

A reference to the graph.

Source

fn cims(&self) -> &Map<String, Self::CIM>

Returns the a map labels-distributions.

§Returns

A reference to the CIMs.

Source

fn parameters_size(&self) -> usize

Returns the parameters size.

§Returns

The parameters size.

Source

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>,

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 name is an empty string.
  • Panics if description is 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.

Implementors§