pull/26/head
AlessandroBregoli 3 years ago
parent c178862664
commit 490fe4e010
  1. 7
      src/params.rs

@ -84,11 +84,16 @@ impl DiscreteStatesContinousTimeParams {
residence_time: Option::None, residence_time: Option::None,
} }
} }
///Getter function for CIM
pub fn get_cim(&self) -> &Option<Array3<f64>> { pub fn get_cim(&self) -> &Option<Array3<f64>> {
&self.cim &self.cim
} }
///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 retu ParamsError
pub fn set_cim(&mut self, cim: Array3<f64>) -> Result<(), ParamsError>{ pub fn set_cim(&mut self, cim: Array3<f64>) -> Result<(), ParamsError>{
self.cim = Some(cim); self.cim = Some(cim);
match self.validate_params() { match self.validate_params() {

Loading…
Cancel
Save