Leptonica  1.77.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 
51 /*------------------------------------------------------------------------*
52  * Array Structs *
53  *------------------------------------------------------------------------*/
54 
56 #define NUMA_VERSION_NUMBER 1
57 
59 struct Numa
60 {
61  l_int32 nalloc;
62  l_int32 n;
63  l_int32 refcount;
64  l_float32 startx;
65  l_float32 delx;
66  l_float32 *array;
67 };
68 typedef struct Numa NUMA;
69 
71 struct Numaa
72 {
73  l_int32 nalloc;
74  l_int32 n;
75  struct Numa **numa;
76 };
77 typedef struct Numaa NUMAA;
78 
80 #define DNA_VERSION_NUMBER 1
81 
83 struct L_Dna
84 {
85  l_int32 nalloc;
86  l_int32 n;
87  l_int32 refcount;
88  l_float64 startx;
89  l_float64 delx;
90  l_float64 *array;
91 };
92 typedef struct L_Dna L_DNA;
93 
95 struct L_Dnaa
96 {
97  l_int32 nalloc;
98  l_int32 n;
99  struct L_Dna **dna;
100 };
101 typedef struct L_Dnaa L_DNAA;
102 
104 struct L_DnaHash
105 {
106  l_int32 nbuckets;
107  l_int32 initsize;
108  struct L_Dna **dna;
109 };
110 typedef struct L_DnaHash L_DNAHASH;
111 
113 #define SARRAY_VERSION_NUMBER 1
114 
116 struct Sarray
117 {
118  l_int32 nalloc;
119  l_int32 n;
120  l_int32 refcount;
121  char **array;
122 };
123 typedef struct Sarray SARRAY;
124 
126 struct L_Bytea
127 {
128  size_t nalloc;
129  size_t size;
130  l_int32 refcount;
131  l_uint8 *data;
132 };
133 typedef struct L_Bytea L_BYTEA;
134 
135 
136 /*------------------------------------------------------------------------*
137  * Array flags *
138  *------------------------------------------------------------------------*/
140 enum {
143 };
144 
146 enum {
150 };
151 
153 enum {
156 };
157 
158 
159 #endif /* LEPTONICA_ARRAY_H */
l_float64 delx
Definition: array.h:89
l_int32 n
Definition: array.h:86
struct Numa ** numa
Definition: array.h:75
l_int32 refcount
Definition: array.h:87
l_int32 nalloc
Definition: array.h:85
struct L_Dna ** dna
Definition: array.h:108
l_int32 nalloc
Definition: array.h:73
l_int32 refcount
Definition: array.h:63
l_float32 startx
Definition: array.h:64
l_int32 nalloc
Definition: array.h:61
Definition: array.h:83
l_float32 delx
Definition: array.h:65
Definition: array.h:95
size_t size
Definition: array.h:129
l_int32 refcount
Definition: array.h:130
Definition: array.h:116
Definition: array.h:59
l_int32 n
Definition: array.h:98
l_int32 n
Definition: array.h:119
struct L_Dna ** dna
Definition: array.h:99
l_uint8 * data
Definition: array.h:131
l_int32 nalloc
Definition: array.h:97
l_int32 refcount
Definition: array.h:120
l_float32 * array
Definition: array.h:66
Definition: array.h:71
l_float64 startx
Definition: array.h:88
l_int32 nalloc
Definition: array.h:118
l_int32 n
Definition: array.h:74
l_int32 n
Definition: array.h:62
l_int32 initsize
Definition: array.h:107
char ** array
Definition: array.h:121
size_t nalloc
Definition: array.h:128
l_float64 * array
Definition: array.h:90
Definition: array.h:126