Add slice calls
@@ -58,8 +58,8 @@ public class MultivariateGaussian implements ContinuousDistribution {
DoubleVertex covInv = covariance.matrixInverse();
DoubleVertex scalar = isUnivariate(dimensions) ?
- covInv.times(xMinusMu).times(xMinusMuT):
- xMinusMuT.matrixMultiply(covInv.matrixMultiply(xMinusMu));
+ covInv.times(xMinusMu).times(xMinusMuT).slice(0, 0):
+ xMinusMuT.matrixMultiply(covInv.matrixMultiply(xMinusMu)).slice(0, 0);
return scalar.plus(kLog2Pi).plus(logCovDet).times(-0.5).slice(0, 0);
}
