From a0da3e2fe8fb8e3dde02ca2c375e2826623d4ee0 Mon Sep 17 00:00:00 2001 From: meliurwen Date: Fri, 30 Dec 2022 17:47:32 +0100 Subject: [PATCH] Fixed formatting issue --- reCTBN/src/parameter_learning.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/reCTBN/src/parameter_learning.rs b/reCTBN/src/parameter_learning.rs index 021b100..73193ca 100644 --- a/reCTBN/src/parameter_learning.rs +++ b/reCTBN/src/parameter_learning.rs @@ -1,6 +1,6 @@ //! Module containing methods used to learn the parameters. -use std::collections::{BTreeSet,HashMap}; +use std::collections::{BTreeSet, HashMap}; use ndarray::prelude::*; @@ -173,7 +173,10 @@ pub struct Cache<'a, P: ParameterLearning> { impl<'a, P: ParameterLearning> Cache<'a, P> { pub fn new(parameter_learning: &'a P) -> Cache<'a, P> { - Cache { parameter_learning, cache_persistent: HashMap::new() } + Cache { + parameter_learning, + cache_persistent: HashMap::new(), + } } pub fn fit( &mut self, @@ -187,7 +190,9 @@ impl<'a, P: ParameterLearning> Cache<'a, P> { // not cloning requires a minor and reasoned refactoring across the library Some(params) => params.clone(), None => { - let params = self.parameter_learning.fit(net, dataset, node, parent_set.clone()); + let params = self + .parameter_learning + .fit(net, dataset, node, parent_set.clone()); self.cache_persistent.insert(parent_set, params.clone()); params }