Diff of /src/modules/bugs/distributions/DMNorm.cc [c69947] .. [0bd8b6]  Maximize  Restore

  Switch to side-by-side view

--- a/src/modules/bugs/distributions/DMNorm.cc
+++ b/src/modules/bugs/distributions/DMNorm.cc
@@ -38,12 +38,18 @@
 	}
     }
 
-    if (type == PDF_PRIOR) {
-	return loglik; //No need to calculate normalizing constant
+    switch(type) {
+    case PDF_PRIOR:
+	break;
+    case PDF_LIKELIHOOD:
+	loglik += logdet(T, m)/2;
+	break;
+    case PDF_FULL:
+	loglik += logdet(T, m)/2 - m * M_LN_SQRT_2PI;
+	break;
     }
-    else {
-	return loglik + logdet(T, m)/2;
-    }
+    
+    return loglik;
 }
 
 void DMNorm::randomSample(double *x, unsigned int m,

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks