tesseract-doxygen/classify/clusttool.h File Reference
#include "host.h"
#include "cluster.h"
#include <stdio.h>
Go to the source code of this file.
Defines |
#define | ILLEGALSAMPLESIZE 5000 |
#define | ILLEGALCIRCULARSPEC 5001 |
#define | ILLEGALMINMAXSPEC 5002 |
#define | ILLEGALSIGNIFICANCESPEC 5003 |
#define | ILLEGALSTYLESPEC 5004 |
#define | ILLEGALSAMPLECOUNT 5005 |
#define | ILLEGALMEANSPEC 5006 |
#define | ILLEGALVARIANCESPEC 5007 |
#define | ILLEGALDISTRIBUTION 5008 |
#define | ILLEGALFLOAT 5009 |
#define | ILLEGALESSENTIALSPEC 5013 |
Functions |
uinT16 | ReadSampleSize (FILE *File) |
PARAM_DESC * | ReadParamDesc (FILE *File, uinT16 N) |
PROTOTYPE * | ReadPrototype (FILE *File, uinT16 N) |
PROTOSTYLE | ReadProtoStyle (FILE *File) |
FLOAT32 * | ReadNFloats (FILE *File, uinT16 N, FLOAT32 Buffer[]) |
void | WriteParamDesc (FILE *File, uinT16 N, PARAM_DESC ParamDesc[]) |
void | WritePrototype (FILE *File, uinT16 N, PROTOTYPE *Proto) |
void | WriteNFloats (FILE *File, uinT16 N, FLOAT32 Array[]) |
void | WriteProtoStyle (FILE *File, PROTOSTYLE ProtoStyle) |
void | WriteProtoList (FILE *File, uinT16 N, PARAM_DESC ParamDesc[], LIST ProtoList, BOOL8 WriteSigProtos, BOOL8 WriteInsigProtos) |
FLOAT32 | UniformRandomNumber (FLOAT32 MMin, FLOAT32 MMax) |
Define Documentation
#define ILLEGALCIRCULARSPEC 5001 |
#define ILLEGALDISTRIBUTION 5008 |
#define ILLEGALESSENTIALSPEC 5013 |
#define ILLEGALFLOAT 5009 |
#define ILLEGALMEANSPEC 5006 |
#define ILLEGALMINMAXSPEC 5002 |
#define ILLEGALSAMPLECOUNT 5005 |
#define ILLEGALSAMPLESIZE 5000 |
#define ILLEGALSIGNIFICANCESPEC 5003 |
#define ILLEGALSTYLESPEC 5004 |
#define ILLEGALVARIANCESPEC 5007 |
Function Documentation
ReadNFloats ************************************************************* Parameters: File open text file to read floats from N number of floats to read Buffer pointer to buffer to place floats into Globals: None Operation: This routine reads N floats from the specified text file and places them into Buffer. If Buffer is NULL, a buffer is created and passed back to the caller. If EOF is encountered before any floats can be read, NULL is returned. Return: Pointer to buffer holding floats or NULL if EOF Exceptions: ILLEGALFLOAT History: 6/6/89, DSJ, Created.
ReadParamDesc ************************************************************* Parameters: File open text file to read N parameter descriptions from N number of parameter descriptions to read Globals: None Operation: This routine reads textual descriptions of sets of parameters which describe the characteristics of feature dimensions. Return: Pointer to an array of parameter descriptors. Exceptions: ILLEGALCIRCULARSPEC ILLEGALESSENTIALSPEC ILLEGALMINMAXSPEC History: 6/6/89, DSJ, Created.
ReadPrototype ************************************************************* Parameters: File open text file to read prototype from N number of dimensions used in prototype Globals: None Operation: This routine reads a textual description of a prototype from the specified file. Return: List of prototypes Exceptions: ILLEGALSIGNIFICANCESPEC ILLEGALSAMPLECOUNT ILLEGALMEANSPEC ILLEGALVARIANCESPEC ILLEGALDISTRIBUTION History: 6/6/89, DSJ, Created.
uinT16 ReadSampleSize |
( |
FILE * |
File |
) |
|
ReadSampleSize *********************************************************** Parameters: File open text file to read sample size from Globals: None Operation: This routine reads a single integer from the specified file and checks to ensure that it is between 0 and MAXSAMPLESIZE. Return: Sample size Exceptions: ILLEGALSAMPLESIZE illegal format or range History: 6/6/89, DSJ, Created.
UniformRandomNumber ******************************************************** Parameters: MMin lower range of uniform distribution MMax upper range of uniform distribution Globals: None Operation: This routine computes a random number which comes from a uniform distribution over the range from MMin to MMax. Return: Uniform random number Exceptions: None History: 6/6/89, DSJ, Created.
WriteNFloats *********************************************************** Parameters: File open text file to write N floats to N number of floats to write Array array of floats to write Globals: None Operation: This routine writes a text representation of N floats from an array to a file. All of the floats are placed on one line. Return: None Exceptions: None History: 6/6/89, DSJ, Created.
WriteParamDesc ************************************************************ Parameters: File open text file to write param descriptors to N number of param descriptors to write ParamDesc array of param descriptors to write Globals: None Operation: This routine writes an array of dimension descriptors to the specified text file. Return: None Exceptions: None History: 6/6/89, DSJ, Created.
void WriteProtoStyle |
( |
FILE * |
File, |
|
|
PROTOSTYLE |
ProtoStyle | |
|
) |
| | |
WriteProtoSyle ********************************************************** Parameters: File open text file to write prototype style to ProtoStyle prototype style to write Globals: None Operation: This routine writes to the specified text file a word which represents the ProtoStyle. It does not append a carriage return to the end. Return: None Exceptions: None History: 6/8/89, DSJ, Created.
WritePrototype ************************************************************ Parameters: File open text file to write prototype to N number of dimensions in feature space Proto prototype to write out Globals: None Operation: This routine writes a textual description of a prototype to the specified text file. Return: None Exceptions: None History: 6/12/89, DSJ, Created.