Leptonica 1.82.0
Image processing and image analysis suite
array.h
Go to the documentation of this file.
1/*====================================================================*
2 - Copyright (C) 2001 Leptonica. All rights reserved.
3 -
4 - Redistribution and use in source and binary forms, with or without
5 - modification, are permitted provided that the following conditions
6 - are met:
7 - 1. Redistributions of source code must retain the above copyright
8 - notice, this list of conditions and the following disclaimer.
9 - 2. Redistributions in binary form must reproduce the above
10 - copyright notice, this list of conditions and the following
11 - disclaimer in the documentation and/or other materials
12 - provided with the distribution.
13 -
14 - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16 - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
18 - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23 - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *====================================================================*/
26
27#ifndef LEPTONICA_ARRAY_H
28#define LEPTONICA_ARRAY_H
29
62/*------------------------------------------------------------------------*
63 * Array Structs *
64 *------------------------------------------------------------------------*/
65
67#define NUMA_VERSION_NUMBER 1
68
70struct Numa
71{
72 l_int32 nalloc;
73 l_int32 n;
74 l_int32 refcount;
75 l_float32 startx;
76 l_float32 delx;
77 l_float32 *array;
78};
79typedef struct Numa NUMA;
80
82struct Numaa
83{
84 l_int32 nalloc;
85 l_int32 n;
86 struct Numa **numa;
87};
88typedef struct Numaa NUMAA;
89
91#define DNA_VERSION_NUMBER 1
92
94struct L_Dna
95{
96 l_int32 nalloc;
97 l_int32 n;
98 l_int32 refcount;
99 l_float64 startx;
100 l_float64 delx;
101 l_float64 *array;
102};
103typedef struct L_Dna L_DNA;
104
106struct L_Dnaa
107{
108 l_int32 nalloc;
109 l_int32 n;
110 struct L_Dna **dna;
111};
112typedef struct L_Dnaa L_DNAA;
113
115{
116 l_int32 nbuckets;
117 l_int32 initsize;
118 struct L_Dna **dna;
119};
120typedef struct L_DnaHash L_DNAHASH;
121
123#define SARRAY_VERSION_NUMBER 1
124
126struct Sarray
127{
128 l_int32 nalloc;
129 l_int32 n;
130 l_int32 refcount;
131 char **array;
132};
133typedef struct Sarray SARRAY;
134
137{
138 size_t nalloc;
139 size_t size;
140 l_int32 refcount;
141 l_uint8 *data;
142};
143typedef struct L_Bytea L_BYTEA;
144
145
146/*------------------------------------------------------------------------*
147 * Array flags *
148 *------------------------------------------------------------------------*/
150enum {
154
156enum {
161
163enum {
165 L_FLOAT_VALUE = 2
167
168#endif /* LEPTONICA_ARRAY_H */
@ L_LINEAR_INTERP
Definition: array.h:151
@ L_QUADRATIC_INTERP
Definition: array.h:152
@ L_FLOAT_VALUE
Definition: array.h:165
@ L_INTEGER_VALUE
Definition: array.h:164
@ L_CONTINUED_BORDER
Definition: array.h:157
@ L_MIRRORED_BORDER
Definition: array.h:159
@ L_SLOPE_BORDER
Definition: array.h:158
Definition: array.h:137
size_t size
Definition: array.h:139
size_t nalloc
Definition: array.h:138
l_int32 refcount
Definition: array.h:140
l_uint8 * data
Definition: array.h:141
struct L_Dna ** dna
Definition: array.h:118
l_int32 initsize
Definition: array.h:117
Definition: array.h:95
l_float64 startx
Definition: array.h:99
l_int32 refcount
Definition: array.h:98
l_int32 n
Definition: array.h:97
l_float64 * array
Definition: array.h:101
l_int32 nalloc
Definition: array.h:96
l_float64 delx
Definition: array.h:100
Definition: array.h:107
l_int32 n
Definition: array.h:109
l_int32 nalloc
Definition: array.h:108
struct L_Dna ** dna
Definition: array.h:110
Definition: array.h:71
l_float32 startx
Definition: array.h:75
l_float32 delx
Definition: array.h:76
l_int32 nalloc
Definition: array.h:72
l_float32 * array
Definition: array.h:77
l_int32 refcount
Definition: array.h:74
l_int32 n
Definition: array.h:73
Definition: array.h:83
struct Numa ** numa
Definition: array.h:86
l_int32 n
Definition: array.h:85
l_int32 nalloc
Definition: array.h:84
Definition: array.h:127
l_int32 refcount
Definition: array.h:130
l_int32 nalloc
Definition: array.h:128
char ** array
Definition: array.h:131
l_int32 n
Definition: array.h:129