Defines | Functions | Variables

rect.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include "assert.h"
#include "index.h"
#include <float.h>
#include <math.h>
#include <grass/gis.h>
Include dependency graph for rect.c:

Go to the source code of this file.

Defines

#define BIG_NUM   (FLT_MAX/4.0)
#define Undefined(x)   ((x)->boundary[0] > (x)->boundary[NUMDIMS])
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define UnitSphereVolume   UnitSphereVolumes[NUMDIMS]

Functions

void RTreeInitRect (struct Rect *R)
struct Rect RTreeNullRect (void)
void RTreePrintRect (struct Rect *R, int depth)
RectReal RTreeRectVolume (struct Rect *R)
RectReal RTreeRectSphericalVolume (struct Rect *R)
RectReal RTreeRectSurfaceArea (struct Rect *R)
struct Rect RTreeCombineRect (struct Rect *R, struct Rect *Rr)
int RTreeOverlap (struct Rect *R, struct Rect *S)
int RTreeContained (struct Rect *R, struct Rect *S)

Variables

const double UnitSphereVolumes []

Define Documentation

#define BIG_NUM   (FLT_MAX/4.0)

Definition at line 27 of file rect.c.

#define MAX (   a,
  b 
)    ((a) > (b) ? (a) : (b))

Definition at line 32 of file rect.c.

Referenced by RTreeCombineRect().

#define MIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 31 of file rect.c.

Referenced by RTreeCombineRect().

#define Undefined (   x  )     ((x)->boundary[0] > (x)->boundary[NUMDIMS])
#define UnitSphereVolume   UnitSphereVolumes[NUMDIMS]

Definition at line 218 of file rect.c.


Function Documentation

struct Rect RTreeCombineRect ( struct Rect R,
struct Rect Rr 
) [read]

Definition at line 305 of file rect.c.

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

Referenced by RTreeNodeCover(), and RTreePickBranch().

int RTreeContained ( struct Rect R,
struct Rect S 
)

Definition at line 352 of file rect.c.

References Rect::boundary, and Undefined.

void RTreeInitRect ( struct Rect R  ) 

Definition at line 38 of file rect.c.

References Rect::boundary.

Referenced by RTreeNodeCover().

struct Rect RTreeNullRect ( void   )  [read]

Definition at line 52 of file rect.c.

References Rect::boundary, and NUMDIMS.

int RTreeOverlap ( struct Rect R,
struct Rect S 
)

Definition at line 331 of file rect.c.

References Rect::boundary.

Referenced by RTreeSearch().

void RTreePrintRect ( struct Rect R,
int  depth 
)

Definition at line 130 of file rect.c.

References Rect::boundary, and RTreeTabIn().

RectReal RTreeRectSphericalVolume ( struct Rect R  ) 

Definition at line 253 of file rect.c.

References Rect::boundary, and Undefined.

Referenced by RTreePickBranch().

RectReal RTreeRectSurfaceArea ( struct Rect R  ) 

Definition at line 275 of file rect.c.

References Rect::boundary, and Undefined.

RectReal RTreeRectVolume ( struct Rect R  ) 

Definition at line 148 of file rect.c.

References Rect::boundary, and Undefined.


Variable Documentation

const double UnitSphereVolumes[]
Initial value:
 {
    0.000000,                   
    2.000000,                   
    3.141593,                   
    4.188790,                   
    4.934802,                   
    5.263789,                   
    5.167713,                   
    4.724766,                   
    4.058712,                   
    3.298509,                   
    2.550164,                   
    1.884104,                   
    1.335263,                   
    0.910629,                   
    0.599265,                   
    0.381443,                   
    0.235331,                   
    0.140981,                   
    0.082146,                   
    0.046622,                   
    0.025807,                   
}

Definition at line 191 of file rect.c.