public void iterate(IMap <IRandomVariable, object> possibleWorld, double probability) { // <b>P</b>(X<sub>t+1</sub> | x<sub>t</sub>)* // P(x<sub>t</sub> | e<sub>1:t</sub>) foreach (var av in possibleWorld) { xtVarAssignMap.Get(av.GetKey()).setValue(av.GetValue()); } int i = 0; foreach (double tp in transitionModel.posteriorDistribution(xtp1, xt).getValues()) { s1.setValue(i, s1.getValues()[i] + (tp * probability)); ++i; } }
public void iterate(IMap <IRandomVariable, object> possibleWorld, double probability) { // Assign current values for x<sub>k+1</sub> foreach (var av in possibleWorld) { x_kp1VarAssignMap.Get(av.GetKey()).setValue(av.GetValue()); } // P(e<sub>k+1</sub> | x<sub>k+1</sub>) // P(e<sub>k+2:t</sub> | x<sub>k+1</sub>) double p = sensorModel.posterior(pe_kp1, x_kp1) * probability; // <b>P</b>(x<sub>k+1</sub> | X<sub>k</sub>) int i = 0; foreach (double tp in transitionModel.posteriorDistribution(x_kp1, xk).getValues()) { b_kp1t.setValue(i, b_kp1t.getValues()[i] + (tp * p)); ++i; } }