OSDN Git Service

modified eosBayesCondition
authorKoji HISANAGA <hisanaga0824@cs04.lan.yasunaga-lab.bio.kyutech.ac.jp>
Thu, 29 Dec 2016 14:59:16 +0000 (23:59 +0900)
committerKoji HISANAGA <hisanaga0824@cs04.lan.yasunaga-lab.bio.kyutech.ac.jp>
Thu, 29 Dec 2016 14:59:16 +0000 (23:59 +0900)
include/eosBayes.h
src/Objects/General/eosBayes/src/eosBayesCondition.c

index bfb3637..0797770 100644 (file)
@@ -26,17 +26,19 @@ typedef struct eosBayes {
 
 
 typedef enum eosBayesDistributionInfoMode {
-        eosBayesDistributionInfoModeGaussian=0
+        eosBayesDistributionInfoModeGaussian=0,
+        eosBayesDistributionInfoModeConstant=1
 } eosBayesDistributionInfoMode;
 
 typedef struct eosBayesDistributionInfo {
-       float min;
-       float max;
-       float delta;
-       eosBayesDistributionInfoMode mode;
-       // For Gaussian
-       float mean;
-       float sigma;
+  float min;
+  float max;
+  float delta;
+  eosBayesDistributionInfoMode mode;
+  // For Gaussian
+  float mean;
+  float sigma;
+  float constant;
 } eosBayesDistributionInfo;
 
 
@@ -45,6 +47,7 @@ typedef struct eosBayesDistributionInfo {
 extern void leosBayesInit(eosBayes* d, int numDistribution, int numLikelihood, int mode);
 
 extern void eosBayesCondition(FILE* fptIn, eosBayes* d, eosBayesDistributionInfo* llinfo, int mode);
+extern void eosBayesRefinementCondition(eosBayes* d, eosBayesDistributionInfo* llinfo, int n, int mode);
 
 // Initialize Each distribution of eosBayesDistributions
 extern void eosBayesDistributionInit(eosBayesDistribution* d,eosBayesDistributionInfo* info, int mode);
index 34ef006..4569fdb 100644 (file)
@@ -75,7 +75,7 @@ void eosBayesRefinementCondition(eosBayes* d, eosBayesDistributionInfo* llinfo,
        case 0:
          /*Gaussian*/
          llinfo->min = d->posterior[i].valueofmaxposterior-d->posterior[i].delta;
-         llinfo->min = d->posterior[i].valueofmaxposterior+d->posterior[i].delta;
+         llinfo->max = d->posterior[i].valueofmaxposterior+d->posterior[i].delta;
          llinfo->sigma = d->posterior[i].delta;
          llinfo->mean = d->posterior[i].valueofmaxposterior;
          llinfo->delta = d->posterior[i].delta/n;