tesseract  4.00.00dev
clusttool.h
Go to the documentation of this file.
1 /******************************************************************************
2  ** Filename: clusttool.h
3  ** Purpose: Definition of clustering utility tools
4  ** Author: Dan Johnson
5  ** History: 6/6/89, DSJ, Created.
6  **
7  ** (c) Copyright Hewlett-Packard Company, 1988.
8  ** Licensed under the Apache License, Version 2.0 (the "License");
9  ** you may not use this file except in compliance with the License.
10  ** You may obtain a copy of the License at
11  ** http://www.apache.org/licenses/LICENSE-2.0
12  ** Unless required by applicable law or agreed to in writing, software
13  ** distributed under the License is distributed on an "AS IS" BASIS,
14  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  ** See the License for the specific language governing permissions and
16  ** limitations under the License.
17  ******************************************************************************/
18 
19 #ifndef TESSERACT_CLASSIFY_CLUSTTOOL_H_
20 #define TESSERACT_CLASSIFY_CLUSTTOOL_H_
21 
22 //--------------------------Include Files---------------------------------------
23 #include <stdio.h>
24 #include "cluster.h"
25 #include "host.h"
26 #include "serialis.h"
27 
28 /*-------------------------------------------------------------------------
29  Public Function Prototype
30 --------------------------------------------------------------------------*/
32 
34 
36 
37 PROTOSTYLE ReadProtoStyle(const char *style);
38 
40 
41 void WriteParamDesc(FILE *File, uinT16 N, const PARAM_DESC ParamDesc[]);
42 
43 void WritePrototype(FILE *File, uinT16 N, PROTOTYPE *Proto);
44 
45 void WriteNFloats (FILE * File, uinT16 N, FLOAT32 Array[]);
46 
47 void WriteProtoStyle(FILE *File, PROTOSTYLE ProtoStyle);
48 
49 void WriteProtoList(FILE *File, uinT16 N, PARAM_DESC ParamDesc[],
50  LIST ProtoList, BOOL8 WriteSigProtos,
51  BOOL8 WriteInsigProtos);
52 
53 //--------------Global Data Definitions and Declarations---------------------
54 // define errors that can be trapped
55 #define ILLEGALSAMPLESIZE 5000
56 #define ILLEGALCIRCULARSPEC 5001
57 #define ILLEGALMINMAXSPEC 5002
58 #define ILLEGALSIGNIFICANCESPEC 5003
59 #define ILLEGALSTYLESPEC 5004
60 #define ILLEGALSAMPLECOUNT 5005
61 #define ILLEGALMEANSPEC 5006
62 #define ILLEGALVARIANCESPEC 5007
63 #define ILLEGALDISTRIBUTION 5008
64 #define ILLEGALFLOAT 5009
65 #define ILLEGALESSENTIALSPEC 5013
66 #endif // TESSERACT_CLASSIFY_CLUSTTOOL_H_
PARAM_DESC * ReadParamDesc(tesseract::TFile *fp, uinT16 N)
Definition: clusttool.cpp:73
PROTOTYPE * ReadPrototype(tesseract::TFile *fp, uinT16 N)
Definition: clusttool.cpp:118
void WriteProtoStyle(FILE *File, PROTOSTYLE ProtoStyle)
Definition: clusttool.cpp:355
FLOAT32 * ReadNFloats(tesseract::TFile *fp, uinT16 N, FLOAT32 Buffer[])
Definition: clusttool.cpp:220
PROTOSTYLE ReadProtoStyle(const char *style)
Definition: clusttool.cpp:191
void WriteParamDesc(FILE *File, uinT16 N, const PARAM_DESC ParamDesc[])
Definition: clusttool.cpp:259
unsigned char BOOL8
Definition: host.h:44
PROTOSTYLE
Definition: cluster.h:44
float FLOAT32
Definition: host.h:42
void WritePrototype(FILE *File, uinT16 N, PROTOTYPE *Proto)
Definition: clusttool.cpp:288
void WriteProtoList(FILE *File, uinT16 N, PARAM_DESC ParamDesc[], LIST ProtoList, BOOL8 WriteSigProtos, BOOL8 WriteInsigProtos)
Definition: clusttool.cpp:389
uinT16 ReadSampleSize(tesseract::TFile *fp)
Definition: clusttool.cpp:47
uint16_t uinT16
Definition: host.h:37
void WriteNFloats(FILE *File, uinT16 N, FLOAT32 Array[])
Definition: clusttool.cpp:338