This commit is contained in:
2018-10-25 21:41:23 +02:00
parent 4fc27841e9
commit 2367a8e47f
3 changed files with 37 additions and 33 deletions

View File

@@ -99,7 +99,10 @@ impl PriorFactor {
}
pub fn start(&self, variable_arena: &mut VariableArena) {
debug!("Prior::down var={:?}, value={:?}", self.variable.index, self.gaussian);
debug!(
"Prior::down var={:?}, value={:?}",
self.variable.index, self.gaussian
);
variable_arena
.get_mut(self.variable)
@@ -143,7 +146,10 @@ impl LikelihoodFactor {
let a = 1.0 / (1.0 + self.variance * (x.pi() - fx.pi()));
let gaussian = Gaussian::from_pi_tau(a * (x.pi() - fx.pi()), a * (x.tau() - fx.tau()));
debug!("Likelihood::up var={:?}, value={:?}", self.mean.index, gaussian);
debug!(
"Likelihood::up var={:?}, value={:?}",
self.mean.index, gaussian
);
variable_arena
.get_mut(self.mean)
@@ -160,7 +166,10 @@ impl LikelihoodFactor {
let a = 1.0 / (1.0 + self.variance * (y.pi() - fy.pi()));
let gaussian = Gaussian::from_pi_tau(a * (y.pi() - fy.pi()), a * (y.tau() - fy.tau()));
debug!("Likelihood::down var={:?}, value={:?}", self.value.index, gaussian);
debug!(
"Likelihood::down var={:?}, value={:?}",
self.value.index, gaussian
);
variable_arena
.get_mut(self.value)
@@ -359,7 +368,10 @@ impl TruncateFactor {
let gaussian = Gaussian::from_pi_tau(c / m_w, (d + sqrt_c * v) / m_w);
debug!("Trunc::up var={:?}, value={:?}", self.variable.index, gaussian);
debug!(
"Trunc::up var={:?}, value={:?}",
self.variable.index, gaussian
);
variable_arena
.get_mut(self.variable)