#include "cluster.h"
#include "genericheap.h"
#include "kdpair.h"
#include "matrix.h"
#include "tprintf.h"
#include "helpers.h"
#include <cfloat>
#include <cmath>
#include <vector>
Go to the source code of this file.
|
CLUSTERER * | tesseract::MakeClusterer (int16_t SampleSize, const PARAM_DESC ParamDesc[]) |
|
SAMPLE * | tesseract::MakeSample (CLUSTERER *Clusterer, const float *Feature, uint32_t CharID) |
|
LIST | tesseract::ClusterSamples (CLUSTERER *Clusterer, CLUSTERCONFIG *Config) |
|
void | tesseract::FreeClusterer (CLUSTERER *Clusterer) |
|
void | tesseract::FreeProtoList (LIST *ProtoList) |
|
void | tesseract::FreePrototype (void *arg) |
|
CLUSTER * | tesseract::NextSample (LIST *SearchState) |
|
float | tesseract::Mean (PROTOTYPE *Proto, uint16_t Dimension) |
|
float | tesseract::StandardDeviation (PROTOTYPE *Proto, uint16_t Dimension) |
|
int32_t | tesseract::MergeClusters (int16_t N, PARAM_DESC ParamDesc[], int32_t n1, int32_t n2, float m[], float m1[], float m2[]) |
|
◆ _USE_MATH_DEFINES
#define _USE_MATH_DEFINES |
◆ Abs
#define Abs |
( |
|
N | ) |
(((N) < 0) ? (-(N)) : (N)) |
◆ BUCKETTABLESIZE
#define BUCKETTABLESIZE 1024 |
define the size of the table which maps normalized samples to histogram buckets. Also define the number of standard deviations in a normal distribution which are considered to be significant. The mapping table will be defined in such a way that it covers the specified number of standard deviations on either side of the mean. BUCKETTABLESIZE should always be even.
Definition at line 1254 of file cluster.cpp.
◆ CHIACCURACY
◆ DELTARATIO
◆ FTABLE_X
◆ FTABLE_Y
◆ HOTELLING
◆ ILLEGAL_CHAR
◆ INITIALDELTA
◆ LOOKUPTABLESIZE
#define LOOKUPTABLESIZE 8 |
define lookup tables used to compute the number of histogram buckets that should be used for a given number of samples.
Definition at line 1335 of file cluster.cpp.
◆ MAXDEGREESOFFREEDOM
◆ MAXDISTANCE
#define MAXDISTANCE FLT_MAX |
◆ MAXNEIGHBORS
◆ MINALPHA
#define MINALPHA (1e-200) |
◆ MINSAMPLES
◆ MINSAMPLESNEEDED
#define MINSAMPLESNEEDED 1 |
◆ MINSAMPLESPERBUCKET
#define MINSAMPLESPERBUCKET 5 |
define the absolute minimum number of samples which must be present in order to accurately test hypotheses about underlying probability distributions. Define separately the minimum samples that are needed before a statistical analysis is attempted; this number should be equal to MINSAMPLES but can be set to a lower number for early testing when very few samples are available.
Definition at line 1244 of file cluster.cpp.
◆ MINVARIANCE
#define MINVARIANCE 0.0004 |
define the variance which will be used as a minimum variance for any dimension of any feature. Since most features are calculated from numbers with a precision no better than 1 in 128, the variance should never be less than the square of this number for parameters whose range is 1.
Definition at line 1236 of file cluster.cpp.
◆ Mirror
#define Mirror |
( |
|
N, |
|
|
|
R |
|
) |
| ((R) - (N)-1) |
◆ NORMALEXTENT
◆ Odd
#define Odd |
( |
|
N | ) |
((N) % 2) |
◆ SqrtOf2Pi
#define SqrtOf2Pi 2.506628275 |
the following variables describe a discrete normal distribution which is used by NormalDensity() and NormalBucket(). The constant NORMALEXTENT determines how many standard deviations of the distribution are mapped onto the fixed discrete range of x. x=0 is mapped to -NORMALEXTENT standard deviations and x=BUCKETTABLESIZE is mapped to +NORMALEXTENT standard deviations.
Definition at line 1326 of file cluster.cpp.