Tesseract  3.02
tesseract-ocr/classify/clusttool.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  **     Filename:       clusttool.h
00003  **     Purpose:        Definition of clustering utility tools
00004  **     Author:         Dan Johnson
00005  **     History:        6/6/89, DSJ, Created.
00006  **
00007  **     (c) Copyright Hewlett-Packard Company, 1988.
00008  ** Licensed under the Apache License, Version 2.0 (the "License");
00009  ** you may not use this file except in compliance with the License.
00010  ** You may obtain a copy of the License at
00011  ** http://www.apache.org/licenses/LICENSE-2.0
00012  ** Unless required by applicable law or agreed to in writing, software
00013  ** distributed under the License is distributed on an "AS IS" BASIS,
00014  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  ** See the License for the specific language governing permissions and
00016  ** limitations under the License.
00017  ******************************************************************************/
00018 #ifndef   __CLUSTERTOOL__
00019 #define   __CLUSTERTOOL__
00020 
00021 //--------------------------Include Files---------------------------------------
00022 #include "host.h"
00023 #include "cluster.h"
00024 #include <stdio.h>
00025 
00026 /*-------------------------------------------------------------------------
00027         Public Funtion Prototype
00028 --------------------------------------------------------------------------*/
00029 uinT16 ReadSampleSize(FILE *File);
00030 
00031 PARAM_DESC *ReadParamDesc(FILE *File, uinT16 N);
00032 
00033 PROTOTYPE *ReadPrototype(FILE *File, uinT16 N);
00034 
00035 PROTOSTYLE ReadProtoStyle(FILE *File);
00036 
00037 FLOAT32 *ReadNFloats (FILE * File, uinT16 N, FLOAT32 Buffer[]);
00038 
00039 void WriteParamDesc (FILE * File, uinT16 N, PARAM_DESC ParamDesc[]);
00040 
00041 void WritePrototype(FILE *File, uinT16 N, PROTOTYPE *Proto);
00042 
00043 void WriteNFloats (FILE * File, uinT16 N, FLOAT32 Array[]);
00044 
00045 void WriteProtoStyle(FILE *File, PROTOSTYLE ProtoStyle);
00046 
00047 void WriteProtoList(
00048      FILE       *File,
00049      uinT16     N,
00050      PARAM_DESC ParamDesc[],
00051      LIST       ProtoList,
00052      BOOL8      WriteSigProtos,
00053      BOOL8      WriteInsigProtos);
00054 
00055 //--------------Global Data Definitions and Declarations---------------------
00056 // define errors that can be trapped
00057 #define ILLEGALSAMPLESIZE 5000
00058 #define ILLEGALCIRCULARSPEC 5001
00059 #define ILLEGALMINMAXSPEC 5002
00060 #define ILLEGALSIGNIFICANCESPEC 5003
00061 #define ILLEGALSTYLESPEC  5004
00062 #define ILLEGALSAMPLECOUNT  5005
00063 #define ILLEGALMEANSPEC 5006
00064 #define ILLEGALVARIANCESPEC 5007
00065 #define ILLEGALDISTRIBUTION 5008
00066 #define ILLEGALFLOAT  5009
00067 #define ILLEGALESSENTIALSPEC  5013
00068 #endif