GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
index.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Rect
 
struct  Branch
 
struct  Node
 
struct  ListNode
 

Macros

#define PGSIZE   512
 
#define NUMDIMS   3 /* number of dimensions */
 
#define TRUE   1
 
#define FALSE   0
 
#define NUMSIDES   2*NUMDIMS
 
#define MAXCARD   (int)((PGSIZE-(2*sizeof(int))) / sizeof(struct Branch))
 

Typedefs

typedef double RectReal
 
typedef int(* SearchHitCallback )(int id, void *arg)
 

Functions

int RTreeSearch (struct Node *, struct Rect *, SearchHitCallback, void *)
 
int RTreeInsertRect (struct Rect *, int, struct Node **, int depth)
 
int RTreeInsertRect1 (struct Rect *, struct Node *, struct Node **, int depth)
 
int RTreeDeleteRect (struct Rect *, int, struct Node **)
 
int RTreeDeleteRect1 (struct Rect *, struct Node *, struct Node **)
 
struct NodeRTreeNewIndex (void)
 
struct NodeRTreeNewNode (void)
 
void RTreeInitNode (struct Node *)
 
void RTreeFreeNode (struct Node *)
 
void RTreeDestroyNode (struct Node *)
 
void RTreePrintNode (struct Node *, int)
 
void RTreeTabIn (int)
 
struct Rect RTreeNodeCover (struct Node *)
 
void RTreeInitRect (struct Rect *)
 
struct Rect RTreeNullRect (void)
 
RectReal RTreeRectArea (struct Rect *)
 
RectReal RTreeRectSphericalVolume (struct Rect *R)
 
RectReal RTreeRectVolume (struct Rect *R)
 
struct Rect RTreeCombineRect (struct Rect *, struct Rect *)
 
int RTreeOverlap (struct Rect *, struct Rect *)
 
void RTreePrintRect (struct Rect *, int)
 
int RTreeAddBranch (struct Branch *, struct Node *, struct Node **)
 
int RTreePickBranch (struct Rect *, struct Node *)
 
void RTreeDisconnectBranch (struct Node *, int)
 
void RTreeSplitNode (struct Node *, struct Branch *, struct Node **)
 
int RTreeSetNodeMax (int)
 
int RTreeSetLeafMax (int)
 
int RTreeGetNodeMax (void)
 
int RTreeGetLeafMax (void)
 

Macro Definition Documentation

#define FALSE   0

Definition at line 35 of file index.h.

#define MAXCARD   (int)((PGSIZE-(2*sizeof(int))) / sizeof(struct Branch))

Definition at line 54 of file index.h.

Referenced by RTreeInitNode().

#define NUMDIMS   3 /* number of dimensions */
#define NUMSIDES   2*NUMDIMS

Definition at line 38 of file index.h.

Referenced by RTreeInitRect().

#define PGSIZE   512

Definition at line 21 of file index.h.

#define TRUE   1

Definition at line 32 of file index.h.

Typedef Documentation

typedef double RectReal

Definition at line 25 of file index.h.

typedef int(* SearchHitCallback)(int id, void *arg)

Definition at line 76 of file index.h.

Function Documentation

int RTreeAddBranch ( struct Branch ,
struct Node ,
struct Node **   
)

Definition at line 179 of file node.c.

References b, Node::branch, Branch::child, Node::count, MAXKIDS, N, n, NULL, and RTreeSplitNode().

Referenced by RTreeInsertRect1().

struct Rect RTreeCombineRect ( struct Rect ,
struct Rect  
)

Definition at line 305 of file rect.c.

References Rect::boundary, MAX, MIN, NUMDIMS, r, and Undefined.

Referenced by RTreeNodeCover(), and RTreePickBranch().

int RTreeDeleteRect ( struct Rect ,
int  ,
struct Node **   
)
int RTreeDeleteRect1 ( struct Rect ,
struct Node ,
struct Node **   
)
void RTreeDisconnectBranch ( struct Node ,
int   
)

Definition at line 207 of file node.c.

References Node::branch, Branch::child, Node::count, and MAXKIDS.

void RTreeFreeNode ( struct Node )

Definition at line 55 of file node.c.

References free().

Referenced by RTreeDeleteRect1(), and RTreeDestroyNode().

int RTreeGetLeafMax ( void  )

Definition at line 44 of file card.c.

References LEAFCARD.

int RTreeGetNodeMax ( void  )

Definition at line 40 of file card.c.

References NODECARD.

void RTreeInitNode ( struct Node )

Definition at line 32 of file node.c.

References Node::branch, Node::count, Node::level, MAXCARD, N, and n.

Referenced by RTreeNewNode().

void RTreeInitRect ( struct Rect )

Definition at line 38 of file rect.c.

References Rect::boundary, NUMSIDES, and r.

Referenced by RTreeNodeCover().

int RTreeInsertRect1 ( struct Rect ,
struct Node ,
struct Node **  ,
int  depth 
)
struct Node* RTreeNewNode ( void  )

Definition at line 44 of file node.c.

References malloc(), n, and RTreeInitNode().

Referenced by rtree_read_branch(), RTreeInsertRect1(), RTreeNewIndex(), and RTreeSplitNode().

struct Rect RTreeNodeCover ( struct Node )

Definition at line 111 of file node.c.

References Node::branch, Branch::child, MAXKIDS, N, n, r, Branch::rect, RTreeCombineRect(), and RTreeInitRect().

Referenced by RTreeInsertRect1().

struct Rect RTreeNullRect ( void  )

Definition at line 52 of file rect.c.

References Rect::boundary, NUMDIMS, and r.

int RTreeOverlap ( struct Rect ,
struct Rect  
)

Definition at line 331 of file rect.c.

References Rect::boundary, FALSE, NUMDIMS, dialogs::s, and TRUE.

Referenced by RTreeSearch().

int RTreePickBranch ( struct Rect ,
struct Node  
)
void RTreePrintNode ( struct Node ,
int   
)

Definition at line 77 of file node.c.

References Node::count, Node::level, and RTreeTabIn().

void RTreePrintRect ( struct Rect ,
int   
)

Definition at line 130 of file rect.c.

References Rect::boundary, NUMDIMS, and RTreeTabIn().

RectReal RTreeRectArea ( struct Rect )
RectReal RTreeRectSphericalVolume ( struct Rect R)

Definition at line 253 of file rect.c.

References Rect::boundary, NUMDIMS, Undefined, and UnitSphereVolume.

Referenced by RTreePickBranch().

RectReal RTreeRectVolume ( struct Rect R)

Definition at line 148 of file rect.c.

References Rect::boundary, NUMDIMS, and Undefined.

int RTreeSetLeafMax ( int  )

Definition at line 36 of file card.c.

References LEAFCARD.

int RTreeSetNodeMax ( int  )

Definition at line 32 of file card.c.

References NODECARD.

void RTreeSplitNode ( struct Node ,
struct Branch ,
struct Node **   
)
void RTreeTabIn ( int  )

Definition at line 68 of file node.c.

Referenced by RTreePrintNode(), and RTreePrintRect().