pub struct CatCTBN { /* private fields */ }Expand description
A categorical continuous time Bayesian network.
Implementations§
Trait Implementations§
Source§impl AbsDiffEq for CatCTBN
impl AbsDiffEq for CatCTBN
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq.Source§impl CTBN for CatCTBN
impl CTBN for CatCTBN
Source§type InitialDistribution = CatBN
type InitialDistribution = CatBN
The type of the initial distribution.
Source§type Trajectory = CatTrj
type Trajectory = CatTrj
The type of the observed trajectory.
Source§type Trajectories = CatTrjs
type Trajectories = CatTrjs
The type of a collection of trajectories.
Source§fn 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>,
Constructs a new CTBN. Read more
Source§fn initial_distribution(&self) -> &Self::InitialDistribution
fn initial_distribution(&self) -> &Self::InitialDistribution
Returns the initial distribution. Read more
Source§fn parameters_size(&self) -> usize
fn parameters_size(&self) -> usize
Returns the parameters size. Read more
Source§fn 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. Read more
Source§impl<R: Rng> CTBNSampler<CatCTBN> for ForwardSampler<'_, R, CatCTBN>
impl<R: Rng> CTBNSampler<CatCTBN> for ForwardSampler<'_, R, CatCTBN>
Source§fn sample_by_length(&self, max_length: usize) -> Self::Sample
fn sample_by_length(&self, max_length: usize) -> Self::Sample
Sample a single trajectory with a given length from a CTBN. Read more
Source§fn sample_by_time(&self, max_time: f64) -> Self::Sample
fn sample_by_time(&self, max_time: f64) -> Self::Sample
Sample a single trajectory with a given time from a CTBN. Read more
Source§fn sample_by_length_or_time(
&self,
max_length: usize,
max_time: f64,
) -> Self::Sample
fn sample_by_length_or_time( &self, max_length: usize, max_time: f64, ) -> Self::Sample
Sample a single trajectory with a given length or time from a CTBN. Read more
Source§fn sample_n_by_length(&self, max_length: usize, n: usize) -> Self::Samples
fn sample_n_by_length(&self, max_length: usize, n: usize) -> Self::Samples
Sample multiple trajectories with a given length from a CTBN. Read more
Source§impl<R: Rng> CTBNSampler<CatCTBN> for ImportanceSampler<'_, R, CatCTBN, CatTrjEv>
impl<R: Rng> CTBNSampler<CatCTBN> for ImportanceSampler<'_, R, CatCTBN, CatTrjEv>
Source§type Samples = CatWtdTrjs
type Samples = CatWtdTrjs
The samples type.
Source§fn sample_by_length(&self, max_length: usize) -> Self::Sample
fn sample_by_length(&self, max_length: usize) -> Self::Sample
Sample a single trajectory with a given length from a CTBN. Read more
Source§fn sample_by_time(&self, max_time: f64) -> Self::Sample
fn sample_by_time(&self, max_time: f64) -> Self::Sample
Sample a single trajectory with a given time from a CTBN. Read more
Source§fn sample_by_length_or_time(
&self,
max_length: usize,
max_time: f64,
) -> Self::Sample
fn sample_by_length_or_time( &self, max_length: usize, max_time: f64, ) -> Self::Sample
Sample a single trajectory with a given length or time from a CTBN. Read more
Source§fn sample_n_by_length(&self, max_length: usize, n: usize) -> Self::Samples
fn sample_n_by_length(&self, max_length: usize, n: usize) -> Self::Samples
Sample multiple trajectories with a given length from a CTBN. Read more
Source§impl<'de> Deserialize<'de> for CatCTBN
impl<'de> Deserialize<'de> for CatCTBN
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonIO for CatCTBN
impl JsonIO for CatCTBN
Source§fn write_json(&self, path: &str)
fn write_json(&self, path: &str)
Write the instance to a JSON file. Read more
Source§impl Labelled for CatCTBN
impl Labelled for CatCTBN
Source§fn label_to_index(&self, x: &str) -> usize
fn label_to_index(&self, x: &str) -> usize
Return the variable index for a given label. Read more
Source§fn index_to_label(&self, x: usize) -> &str
fn index_to_label(&self, x: usize) -> &str
Return the label for a given variable index. Read more
Source§fn index_to(&self, x: usize, other: &Labels) -> usize
fn index_to(&self, x: usize, other: &Labels) -> usize
Maps an index from this model to another model with the same label. Read more
Source§fn indices_to(&self, x: &Set<usize>, other: &Labels) -> Set<usize>
fn indices_to(&self, x: &Set<usize>, other: &Labels) -> Set<usize>
Maps a set of indices from this model to another model with the same labels. Read more
Source§impl<R: Rng + SeedableRng> ParCTBNSampler<CatCTBN> for ForwardSampler<'_, R, CatCTBN>
impl<R: Rng + SeedableRng> ParCTBNSampler<CatCTBN> for ForwardSampler<'_, R, CatCTBN>
Source§fn par_sample_n_by_length(&self, max_length: usize, n: usize) -> Self::Samples
fn par_sample_n_by_length(&self, max_length: usize, n: usize) -> Self::Samples
Sample multiple trajectories with a given length from a CTBN in parallel. Read more
Source§impl<R: Rng + SeedableRng> ParCTBNSampler<CatCTBN> for ImportanceSampler<'_, R, CatCTBN, CatTrjEv>
impl<R: Rng + SeedableRng> ParCTBNSampler<CatCTBN> for ImportanceSampler<'_, R, CatCTBN, CatTrjEv>
Source§type Samples = CatWtdTrjs
type Samples = CatWtdTrjs
The samples type.
Source§fn par_sample_n_by_length(&self, max_length: usize, n: usize) -> Self::Samples
fn par_sample_n_by_length(&self, max_length: usize, n: usize) -> Self::Samples
Sample multiple trajectories with a given length from a CTBN in parallel. Read more
Source§impl RelativeEq for CatCTBN
impl RelativeEq for CatCTBN
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
Source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
A test for equality that uses a relative comparison if the values are far apart.
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
The inverse of
RelativeEq::relative_eq.Auto Trait Implementations§
impl Freeze for CatCTBN
impl RefUnwindSafe for CatCTBN
impl Send for CatCTBN
impl Sync for CatCTBN
impl Unpin for CatCTBN
impl UnwindSafe for CatCTBN
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more