quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_stat.a #include <UniformModel.h> UniformModel(MODE mode = DEF_MODE); UniformModel(const UniformModel& arg); boolean eq(const UniformModel& arg) const; boolean assign(const UniformModel& arg); boolean setMin(VectorFloat& arg); boolean setMax(VectorFloat& arg);
description:UniformModel model; VectorFloat min; min.assign(L"-2, -1, -3"); model.setMin(min); VectorFloat max(L"1, 2, 0"); model.setMax(max);
1 p(x) = ----------------- , min < x < max Area(max - min) 0 , otherwisewhere the area is computed as a product of rectangular regions in an N-dimensional space.
static const String CLASS_NAME;
static const String DEF_PARAM;
static const String PARAM_MIN;
static const String PARAM_MAX;
static const long ERR = 60400;
VectorFloat min_d;
VectorFloat max_d;
float scale_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* message) const;
setDebug is inherited from base class
~UniformModel();
UniformModel(MODE mode = DEF_MODE);
UniformModel(const UniformModel& arg);
boolean assign(const UniformModel& arg);
UniformModel& operator=(const UniformModel& arg);
long sofSize() const;
boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const;
boolean readAccumulator(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean writeAccumulator(Sof& sof, long tag, const String& name = CLASS_NAME) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean readAccumulatorData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeAccumulatorData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean readOccupancies(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean readOccupanciesData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean eq(const UniformModel& arg) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);
UniformModel(VectorFloat min, MatrixFloat max, MODE mode = DEF_MODE);
UniformModel(float min, float max, MODE mode = DEF_MODE);
boolean setMin(const VectorFloat& min);
boolean setMin(float min);
boolean setMax(const MatrixFloat& max);
boolean setMax(float max);
boolean getMin(const VectorFloat& min);
boolean getMax(const MatrixFloat& max);
boolean assign(const StatisticalModelBase& arg);
boolean eq(const StatisticalModelBase& arg);
const String& className() const;
boolean init();
float getLikelihood(const VectorFloat& input);
float getLogLikelihood(const VectorFloat& input);
double getOccupancy();
boolean setOccupancy(double arg);
boolean setAccessCount(long arg);
long getAccessCount();
boolean resetAccumulators();
boolean initialize(VectorFloat& param);
boolean accumulate(VectorFloat& param);
boolean accumulate(VectorFloat& param, VectorFloat& data, boolean precomp);
boolean update(VectorFloat& param);
float initScale();
// declare the UniformModel object // UniformModel model; // set the compute mode // model.setMode(PRE_COMPUTE); // set the minimum vector // VectorFloat min; min.assign(L"-2, -1, -3"); model.setMin(min); // set the maximum vector // VectorFloat max(L"1, 2, 0"); model.setMax(max); // declare the input vector // VectorFloat input; input.assign(L"-1.050, -7.709, -2.303"); // get the distance // Float distance = model.getLikelihood(input);