tesseract  3.05.02
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 #ifndef __CLUSTERTOOL__
19 #define __CLUSTERTOOL__
20 
21 //--------------------------Include Files---------------------------------------
22 #include "host.h"
23 #include "cluster.h"
24 #include <stdio.h>
25 
26 /*-------------------------------------------------------------------------
27  Public Function Prototype
28 --------------------------------------------------------------------------*/
29 uinT16 ReadSampleSize(FILE *File);
30 
31 PARAM_DESC *ReadParamDesc(FILE *File, uinT16 N);
32 
33 PROTOTYPE *ReadPrototype(FILE *File, uinT16 N);
34 
35 PROTOSTYLE ReadProtoStyle(FILE *File);
36 
37 FLOAT32 *ReadNFloats (FILE * File, uinT16 N, FLOAT32 Buffer[]);
38 
39 void WriteParamDesc(FILE *File, uinT16 N, const PARAM_DESC ParamDesc[]);
40 
41 void WritePrototype(FILE *File, uinT16 N, PROTOTYPE *Proto);
42 
43 void WriteNFloats (FILE * File, uinT16 N, FLOAT32 Array[]);
44 
45 void WriteProtoStyle(FILE *File, PROTOSTYLE ProtoStyle);
46 
47 void WriteProtoList(FILE *File, uinT16 N, PARAM_DESC ParamDesc[],
48  LIST ProtoList, BOOL8 WriteSigProtos,
49  BOOL8 WriteInsigProtos);
50 
51 //--------------Global Data Definitions and Declarations---------------------
52 // define errors that can be trapped
53 #define ILLEGALSAMPLESIZE 5000
54 #define ILLEGALCIRCULARSPEC 5001
55 #define ILLEGALMINMAXSPEC 5002
56 #define ILLEGALSIGNIFICANCESPEC 5003
57 #define ILLEGALSTYLESPEC 5004
58 #define ILLEGALSAMPLECOUNT 5005
59 #define ILLEGALMEANSPEC 5006
60 #define ILLEGALVARIANCESPEC 5007
61 #define ILLEGALDISTRIBUTION 5008
62 #define ILLEGALFLOAT 5009
63 #define ILLEGALESSENTIALSPEC 5013
64 #endif
PROTOSTYLE ReadProtoStyle(FILE *File)
Definition: clusttool.cpp:242
PROTOTYPE * ReadPrototype(FILE *File, uinT16 N)
Definition: clusttool.cpp:114
unsigned char BOOL8
Definition: host.h:46
uinT16 ReadSampleSize(FILE *File)
Definition: clusttool.cpp:44
unsigned short uinT16
Definition: host.h:34
void WriteProtoList(FILE *File, uinT16 N, PARAM_DESC ParamDesc[], LIST ProtoList, BOOL8 WriteSigProtos, BOOL8 WriteInsigProtos)
Definition: clusttool.cpp:449
PARAM_DESC * ReadParamDesc(FILE *File, uinT16 N)
Definition: clusttool.cpp:67
float FLOAT32
Definition: host.h:44
void WriteProtoStyle(FILE *File, PROTOSTYLE ProtoStyle)
Definition: clusttool.cpp:415
void WriteParamDesc(FILE *File, uinT16 N, const PARAM_DESC ParamDesc[])
Definition: clusttool.cpp:319
void WriteNFloats(FILE *File, uinT16 N, FLOAT32 Array[])
Definition: clusttool.cpp:398
void WritePrototype(FILE *File, uinT16 N, PROTOTYPE *Proto)
Definition: clusttool.cpp:348
FLOAT32 * ReadNFloats(FILE *File, uinT16 N, FLOAT32 Buffer[])
Definition: clusttool.cpp:282
PROTOSTYLE
Definition: cluster.h:44