Harmonized some docstrings in `params.rs`

pull/68/head
Meliurwen 2 years ago
parent 064b582833
commit 9ca8973550
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 21
      reCTBN/src/params.rs

@ -73,14 +73,17 @@ pub enum Params {
}
/// This represents the parameters of a classical discrete node for ctbn and it's composed by the
/// following elements:
/// - `label`
/// - `domain`: an ordered and exhaustive set of possible states.
/// - `cim`: Conditional Intensity Matrix.
/// - `transitions`: number of transitions from one state to another given a specific realization
/// following elements.
///
/// # Arguments
///
/// * `label` - node's variable name.
/// * `domain` - an ordered and exhaustive set of possible states.
/// * `cim` - Conditional Intensity Matrix.
/// * `transitions` - number of transitions from one state to another given a specific realization
/// of the parent set; is a sufficient statistics are mainly used during the parameter learning
/// task.
/// - `residence_time`: permanence time in each possible state, given a specific realization of the
/// * `residence_time` - residence time in each possible state, given a specific realization of the
/// parent set; is a sufficient statistics are mainly used during the parameter learning task.
#[derive(Clone)]
pub struct DiscreteStatesContinousTimeParams {
@ -109,9 +112,9 @@ impl DiscreteStatesContinousTimeParams {
/// Setter function for CIM.
///
/// This function check if the CIM is valid using the validate_params method:
/// - **Valid CIM inserted**: it substitute the CIM in self.cim and return `Ok(())`.
/// - **Invalid CIM inserted**: it replace the self.cim value with None and it returns
/// This function checks if the CIM is valid using the [`validate_params`](self::ParamsTrait::validate_params) method:
/// * **Valid CIM inserted** - it substitutes the CIM in `self.cim` and returns `Ok(())`.
/// * **Invalid CIM inserted** - it replaces the `self.cim` value with `None` and it returns
/// `ParamsError`.
pub fn set_cim(&mut self, cim: Array3<f64>) -> Result<(), ParamsError> {
self.cim = Some(cim);

Loading…
Cancel
Save