1/* Copyright (C) 2006 MySQL AB & Ramil Kalimullin & MySQL Finland AB
2 & TCX DataKonsult AB
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; version 2 of the License.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
16
17#ifndef _rt_mbr_h
18#define _rt_mbr_h
19
20#ifdef HAVE_RTREE_KEYS
21
22int maria_rtree_key_cmp(HA_KEYSEG *keyseg, const uchar *a, const uchar *b,
23 uint key_length, uint32 nextflag);
24int maria_rtree_combine_rect(const HA_KEYSEG *keyseg,
25 const uchar *, const uchar *, uchar*,
26 uint key_length);
27double maria_rtree_rect_volume(HA_KEYSEG *keyseg, uchar*, uint key_length);
28int maria_rtree_d_mbr(const HA_KEYSEG *keyseg, const uchar *a,
29 uint key_length, double *res);
30double maria_rtree_overlapping_area(HA_KEYSEG *keyseg, uchar *a, uchar *b,
31 uint key_length);
32double maria_rtree_area_increase(const HA_KEYSEG *keyseg, const uchar *a,
33 const uchar *b,
34 uint key_length, double *ab_area);
35double maria_rtree_perimeter_increase(HA_KEYSEG *keyseg, uchar* a, uchar* b,
36 uint key_length, double *ab_perim);
37int maria_rtree_page_mbr(const HA_KEYSEG *keyseg, MARIA_PAGE *page,
38 uchar *key, uint key_length);
39#endif /*HAVE_RTREE_KEYS*/
40#endif /* _rt_mbr_h */
41