#include "Surprise/SurpriseModel.H"
#include "Util/Assert.H"
#include "Util/log.H"
Go to the source code of this file.
Defines | |
#define | COMBINE_FROM(models, weights) |
#define | COMBINE_FROM_WMIN(models, weights, pos, width, height, offset) |
#define | COMBINE_INIT itsMean = 0.0; itsVar = 0.0; |
#define | COMBINE_TYPE SurpriseModelSG |
#define | COMBINE_UPDATE |
#define | COMBINE_FINISH |
#define | COMBINE_INIT itsAlpha = 0.0; itsBeta = 0.0; |
#define | COMBINE_TYPE SurpriseModelSP |
#define | COMBINE_UPDATE |
#define | COMBINE_FINISH |
#define | COMBINE_INIT itsAlpha = 0.0; itsBeta = 0.0; |
#define | COMBINE_TYPE SurpriseModelSP1 |
#define | COMBINE_UPDATE |
#define | COMBINE_FINISH |
#define | COMBINE_INIT itsAlpha = 0.0; itsBeta = 0.0; |
#define | COMBINE_TYPE SurpriseModelSPC |
#define | COMBINE_UPDATE |
#define | COMBINE_FINISH |
#define | COMBINE_INIT itsAlpha = 0.0; itsBeta = 0.0; |
#define | COMBINE_TYPE SurpriseModelSPF |
#define | COMBINE_UPDATE |
#define | COMBINE_FINISH |
#define | COMBINE_INIT itsAlpha = 0.0; itsBeta = 0.0; |
#define | COMBINE_TYPE SurpriseModelCS |
#define | COMBINE_UPDATE itsAlpha += weight * m->itsAlpha/m->itsBeta; |
#define | COMBINE_FINISH |
#define | COMBINE_INIT itsMean = 0.0; itsVar = 0.0; |
#define | COMBINE_TYPE SurpriseModelGG |
#define | COMBINE_UPDATE |
#define | COMBINE_FINISH |
a local (single-point) model of surprise
Definition in file SurpriseModel.C.
#define COMBINE_FINISH |
itsSum = itsMean; \
itsSS = itsVar; \
itsWeightSum = wsum; \
itsMean /= wsum; itsVar /= wsum; \
itsVar -= itsMean * itsMean; \
itsCombineFromRun = true;
Definition at line 1107 of file SurpriseModel.C.
#define COMBINE_FINISH |
wsum = 1/wsum; \ itsAlpha *= itsBeta * wsum;
Definition at line 1107 of file SurpriseModel.C.
#define COMBINE_FINISH |
wsum = 1/wsum; \ itsBeta *= wsum; \ itsAlpha *= itsBeta * wsum;
Definition at line 1107 of file SurpriseModel.C.
#define COMBINE_FINISH |
wsum = 1/wsum; \ itsBeta *= wsum; \ itsAlpha *= itsBeta * wsum;
Definition at line 1107 of file SurpriseModel.C.
#define COMBINE_FINISH |
wsum = 1/wsum; \ itsBeta *= wsum; \ itsAlpha *= itsBeta * wsum;
Definition at line 1107 of file SurpriseModel.C.
#define COMBINE_FINISH |
wsum = 1/wsum; \ itsBeta *= wsum; \ itsAlpha *= itsBeta * wsum;
Definition at line 1107 of file SurpriseModel.C.
#define COMBINE_FINISH |
itsMean /= wsum; itsVar /= wsum; \ itsVar -= itsMean * itsMean;
Definition at line 1107 of file SurpriseModel.C.
#define COMBINE_FROM | ( | models, | |||
weights | ) |
ASSERT(models.isSameSize(weights)); \ COMBINE_INIT \ Image<COMBINE_TYPE>::const_iterator m = models.begin(), \ stop = models.end(); \ Image<float>::const_iterator w = weights.begin(); \ double wsum = 0.0; \ while(m != stop) \ { \ const double weight = double(*w++); \ COMBINE_UPDATE \ wsum += weight; \ ++m; \ } \ COMBINE_FINISH
Definition at line 97 of file SurpriseModel.C.
#define COMBINE_FROM_WMIN | ( | models, | |||
weights, | |||||
pos, | |||||
width, | |||||
height, | |||||
offset | ) |
COMBINE_INIT \ Image<COMBINE_TYPE>::const_iterator m = models.begin(); \ Image<float>::const_iterator w = weights.begin(); \ w += offset - pos.i; \ double wsum = 0.0F; \ for (int j = 0; j < height; j ++) \ { \ for (int i = 0; i < width; i ++) \ { \ const double weight = *w++; \ COMBINE_UPDATE \ wsum += weight; \ ++m; \ } \ w += width + 1; \ } \ COMBINE_FINISH
Definition at line 142 of file SurpriseModel.C.
#define COMBINE_UPDATE |
const double expVal = m->itsAlpha / m->itsBeta; \ itsMean += weight * expVal; \ itsVar += weight * expVal * expVal;
Definition at line 1103 of file SurpriseModel.C.
#define COMBINE_UPDATE |
itsAlpha += weight * m->itsAlpha; \ itsBeta += weight * m->itsBeta;
Definition at line 1103 of file SurpriseModel.C.
#define COMBINE_UPDATE |
itsAlpha += weight * m->itsAlpha; \ itsBeta += weight * m->itsBeta;
Definition at line 1103 of file SurpriseModel.C.
#define COMBINE_UPDATE |
itsAlpha += weight * m->itsAlpha; \ itsBeta += weight * m->itsBeta;
Definition at line 1103 of file SurpriseModel.C.
#define COMBINE_UPDATE |
itsAlpha += weight * m->itsAlpha; \ itsBeta += weight * m->itsBeta;
Definition at line 1103 of file SurpriseModel.C.
#define COMBINE_UPDATE |
const double mmean = m->itsMean; \ itsMean += weight * mmean; \ itsVar += weight * (m->itsVar + mmean * mmean);
Definition at line 1103 of file SurpriseModel.C.