Public Types | Public Member Functions | Public Attributes | Friends

rectangle Class Reference

#include <rectangle.h>

List of all members.

Public Types

enum  { dim = RECTANGLE_DIMENSION }
typedef bool(rectangle::* comparator )(rectangle const &r) const

Public Member Functions

void operator+= (rectangle const &r)
rectangle operator+ (rectangle const &r) const
bool operator& (rectangle const &r) const
bool operator<= (rectangle const &r) const
bool operator>= (rectangle const &r) const
bool operator< (rectangle const &r) const
bool operator> (rectangle const &r) const
bool operator== (rectangle const &r) const
bool operator!= (rectangle const &r) const

Public Attributes

coord_t boundary [dim *2]

Friends

coord_t GIGABASE_DLL_ENTRY distance (rectangle const &r, rectangle const &q)
area_t area (rectangle const &r)

Detailed Description

Multidimensional rectangle


Member Function Documentation

bool rectangle::operator!= ( rectangle const &  r  )  const [inline]

Check if two rectangle are not the same

References boundary.

bool rectangle::operator& ( rectangle const &  r  )  const [inline]

Intersect two rectangles

References boundary.

rectangle rectangle::operator+ ( rectangle const &  r  )  const [inline]

Join two rectangles: construct enveloping rectangle

References boundary.

void rectangle::operator+= ( rectangle const &  r  )  [inline]

Join two rectangles: construct enveloping rectangle

References boundary.

bool rectangle::operator< ( rectangle const &  r  )  const [inline]

Check if rectangle is strict subpart of other rectanle

Returns:
true if this rectangle is part of rectangle r and not the same
bool rectangle::operator<= ( rectangle const &  r  )  const [inline]

Check if rectangle is part of other rectanle

Returns:
true if this rectangle is part of rectangle r

References boundary.

bool rectangle::operator== ( rectangle const &  r  )  const [inline]

Check if two rectangle are the same

References boundary.

bool rectangle::operator> ( rectangle const &  r  )  const [inline]

Check if rectangle is strict subpart of other rectanle

Returns:
true if this rectangle contains rectangle r and not the same
bool rectangle::operator>= ( rectangle const &  r  )  const [inline]

Check if rectangle is part of other rectanle

Returns:
true if this rectangle contains rectangle r

References boundary.


Friends And Related Function Documentation

area_t area ( rectangle const &  r  )  [friend]

Caclulate area of rectangle

coord_t GIGABASE_DLL_ENTRY distance ( rectangle const &  r,
rectangle const &  q 
) [friend]

Calculate distance between two rectangles


Member Data Documentation

coord_t rectangle::boundary[dim *2]

Boundary array contains coordinates of two vertices specifying rectangle of "dim" dimmension. First vertex has coordinaes (boundary[0], ..., boundary[dim]) Second vertext has coordinates (boundary[dim], ..., boundary[dim*2-1]) Precondition: for i = 0, dim : boundary[i] <= boundary[dim+i]

Referenced by operator!=(), operator&(), operator+(), operator+=(), operator<=(), operator==(), and operator>=().


The documentation for this class was generated from the following file: