3
3
4
4
#include "types.h"
5
5
6
- /*
7
- * Declarations of key build functions
8
- */
6
+ /* Declarations of key build functions */
9
7
10
8
#define KEYSIZE 24 /* the key size for one entry */
11
9
#define BPCKSIZE (KEYSIZE/6) /* the key size for one entry per coordinate */
12
10
13
11
/*
14
12
* The coordinate value has to be between -MAXCVALUE .. MAXCVALUE
15
13
*/
16
- #define MAXCVALUE ( ( 1 << ( 8* BPCKSIZE - 2 ) ) - 1 )
14
+ #define MAXCVALUE ( (1 << (8 * BPCKSIZE - 2) ) - 1 )
17
15
18
16
typedef struct
19
17
{
20
- int32 vl_len_ ;
18
+ int32 vl_len_ ;
21
19
union
22
20
{
23
21
struct
24
22
{
25
- float4 lat ,
26
- lng ;
23
+ float4 lat ,
24
+ lng ;
27
25
};
28
26
struct
29
27
{
30
- int32 k [6 ];
28
+ int32 k [6 ];
31
29
};
32
30
};
33
31
} GiSTSPointKey ;
@@ -45,129 +43,129 @@ typedef struct
45
43
} while (0) ;
46
44
47
45
/*
48
- * Union the both keys and returns it . Result is placed into kunion.
46
+ * Returns the union of two keys . Result is placed into ' kunion' .
49
47
*/
50
48
void spherekey_union_two (int32 * kunion , const int32 * key );
51
49
52
50
/*
53
- * Intersect the both keys and returns it . Returns NULL if there is
54
- * no intersection. Result is placed into kinter.
51
+ * Returns the intersection of two keys . Returns NULL if there is
52
+ * no intersection. Result is placed into ' kinter' .
55
53
*/
56
54
bool spherekey_inter_two (int32 * kinter , const int32 * key );
57
55
58
56
/*
59
- * Generate key value of spherical point and returns it. Result is placed
60
- * into k .
57
+ * Generates the key of a spherical point and returns it. Result is placed
58
+ * into 'k' .
61
59
*/
62
60
void spherepoint_gen_key (int32 * k , const SPoint * sp );
63
61
64
62
/*
65
- * Generates circle's key and returns it. Result is placed into k .
63
+ * Generates the circle's key and returns it. Result is placed into 'k' .
66
64
*/
67
65
void spherecircle_gen_key (int32 * k , const SCIRCLE * c );
68
66
69
67
/*
70
- * Returns the key of a spherical ellipse and returns it. Result is placed
71
- * into k .
68
+ * Generates the key of a spherical ellipse and returns it. Result is placed
69
+ * into 'k' .
72
70
*/
73
71
void sphereellipse_gen_key (int32 * k , const SELLIPSE * e );
74
72
75
73
/*
76
- * Returns the key of a spherical line and returns it. Result is placed
77
- * into k .
74
+ * Generates the key of a spherical line and returns it. Result is placed
75
+ * into 'k' .
78
76
*/
79
77
void sphereline_gen_key (int32 * k , const SLine * sl );
80
78
81
79
/*
82
- * Creates the key of polygon and returns it. Result is placed into "key" .
80
+ * Generates the key of a polygon and returns it. Result is placed into 'k' .
83
81
*/
84
- void spherepoly_gen_key (int32 * key , const SPOLY * sp );
82
+ void spherepoly_gen_key (int32 * k , const SPOLY * sp );
85
83
86
84
/*
87
- * Creates the key of path and returns it. Result is placed into k .
85
+ * Generates the key of a path and returns it. Result is placed into 'k' .
88
86
*/
89
87
void spherepath_gen_key (int32 * k , const SPATH * sp );
90
88
91
89
/*
92
- * Creates the key of box and returns it. Result is placed into k .
90
+ * Generates the key of a box and returns it. Result is placed into 'k' .
93
91
*/
94
92
void spherebox_gen_key (int32 * key , const SBOX * box );
95
93
96
94
/*
97
- * Returns true, if first key is less than second key.
95
+ * Returns true if the first key is less than the second key.
98
96
*/
99
97
Datum spherekey_lt (PG_FUNCTION_ARGS );
100
98
101
99
/*
102
- * Returns true, if first key is less or equal than second key.
100
+ * Returns true if the first key is less or equal than the second key.
103
101
*/
104
102
Datum spherekey_le (PG_FUNCTION_ARGS );
105
103
106
104
/*
107
- * Returns true, if first keys are equal.
105
+ * Returns true if two keys are equal.
108
106
*/
109
107
Datum spherekey_eq (PG_FUNCTION_ARGS );
110
108
111
109
/*
112
- * Returns true, if first keys are not equal.
110
+ * Returns true if two keys are not equal.
113
111
*/
114
112
Datum spherekey_eq_neg (PG_FUNCTION_ARGS );
115
113
116
114
/*
117
- * Returns true, if first key is greater or equal than second key.
115
+ * Returns true if the first key is greater or equal than the second key.
118
116
*/
119
117
Datum spherekey_ge (PG_FUNCTION_ARGS );
120
118
121
119
/*
122
- * Returns true, if first key is greater than second key.
120
+ * Returns true if the first key is greater than the second key.
123
121
*/
124
122
Datum spherekey_gt (PG_FUNCTION_ARGS );
125
123
126
124
/*
127
125
* Returns relationship of two keys.
128
- * ‘alls skey_cmp(const int32 *, const int32 *) for two keys.
126
+ * Calls skey_cmp(const int32 *, const int32 *) for two keys.
129
127
*/
130
128
Datum spherekey_cmp (PG_FUNCTION_ARGS );
131
129
132
130
/*
133
131
* Returns relationship of keys of two spherical points.
134
- * ‘alls skey_cmp(const int32 *, const int32 *) for two points.
132
+ * Calls skey_cmp(const int32 *, const int32 *) for two points.
135
133
*/
136
134
Datum spherepoint_cmp (PG_FUNCTION_ARGS );
137
135
138
136
/*
139
137
* Returns relationship of keys of two spherical circles.
140
- * ‘alls skey_cmp(const int32 *, const int32 *) for two circles.
138
+ * Calls skey_cmp(const int32 *, const int32 *) for two circles.
141
139
*/
142
140
Datum spherecircle_cmp (PG_FUNCTION_ARGS );
143
141
144
142
/*
145
143
* Returns relationship of keys of two spherical ellipses.
146
- * ‘alls skey_cmp(const int32 *, const int32 *) for two ellipses.
144
+ * Calls skey_cmp(const int32 *, const int32 *) for two ellipses.
147
145
*/
148
146
Datum sphereellipse_cmp (PG_FUNCTION_ARGS );
149
147
150
148
/*
151
149
* Returns relationship of keys of two spherical lines.
152
- * ‘alls skey_cmp(const int32 *, const int32 *) for two lines.
150
+ * Calls skey_cmp(const int32 *, const int32 *) for two lines.
153
151
*/
154
152
Datum sphereline_cmp (PG_FUNCTION_ARGS );
155
153
156
154
/*
157
- * Returns relationship of keys of two spherical pathes .
158
- * ‘alls skey_cmp(const int32 *, const int32 *) for two pathes .
155
+ * Returns relationship of keys of two spherical paths .
156
+ * Calls skey_cmp(const int32 *, const int32 *) for two paths .
159
157
*/
160
158
Datum spherepath_cmp (PG_FUNCTION_ARGS );
161
159
162
160
/*
163
161
* Returns relationship of keys of two spherical polygons.
164
- * ‘alls skey_cmp(const int32 *, const int32 *) for two polygons.
162
+ * Calls skey_cmp(const int32 *, const int32 *) for two polygons.
165
163
*/
166
164
Datum spherepoly_cmp (PG_FUNCTION_ARGS );
167
165
168
166
/*
169
167
* Returns relationship of keys of two spherical boxes.
170
- * ‘alls skey_cmp(const int32 *, const int32 *) for two boxes.
168
+ * Calls skey_cmp(const int32 *, const int32 *) for two boxes.
171
169
*/
172
170
Datum spherebox_cmp (PG_FUNCTION_ARGS );
173
171
0 commit comments