Tesseract
3.02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
sortflts.h
Go to the documentation of this file.
1
/**********************************************************************
2
* File: sortflts.h (Formerly sfloats.h)
3
* Description: Code to maintain a sorted list of floats.
4
* Author: Ray Smith
5
* Created: Mon Oct 4 16:15:40 BST 1993
6
*
7
* (C) Copyright 1993, Hewlett-Packard Ltd.
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
20
#ifndef SORTFLTS_H
21
#define SORTFLTS_H
22
23
#include "
elst.h
"
24
#include "
notdll.h
"
25
#include "
notdll.h
"
26
27
class
SORTED_FLOAT
:
public
ELIST_LINK
28
{
29
friend
class
SORTED_FLOATS
;
30
31
public
:
32
SORTED_FLOAT
() {
33
}
//empty constructor
34
SORTED_FLOAT
(
//create one
35
float
value,
//value of entry
36
inT32
key) {
//reference
37
entry = value;
38
address = key;
39
}
40
private
:
41
float
entry;
//value of float
42
inT32
address;
//key
43
};
44
45
ELISTIZEH
(
SORTED_FLOAT
)
46
class
SORTED_FLOATS
47
{
48
public
:
50
SORTED_FLOATS
() {
51
it.set_to_list (&list);
52
}
58
void
add
(
float
value,
59
inT32
key);
64
void
remove
(
inT32
key);
69
float
operator[]
(
inT32
index);
70
71
private
:
72
SORTED_FLOAT_LIST list;
//list of floats
73
SORTED_FLOAT_IT it;
//iterator built-in
74
};
75
#endif
mnt
data
src
tesseract-ocr
textord
sortflts.h
Generated on Thu Nov 1 2012 20:19:50 for Tesseract by
1.8.1