Go to Overview over all GrAL packages.
Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

xmjr_indexmap2D Class Reference

Mapping between integer intervals and integer rectangles. More...

#include <index-map.h>

Collaboration diagram for xmjr_indexmap2D:

Collaboration graph
[legend]
List of all members.

Public Types

typedef int_index_type index_type

Public Methods

 xmjr_indexmap2D (const index_type &UR=index_type(0, 0))
 xmjr_indexmap2D (int urx, int ury)
 xmjr_indexmap2D (const index_type &LL, const index_type &UR, int off=0)
void init ()
int x0 () const
int xmax () const
int y0 () const
int ymax () const
int n0 () const
int nmax () const
const index_typell () const
int llx () const
int lly () const
const index_typeur () const
int urx () const
int ury () const
bool IsInRange (int x, int y) const
bool IsInRange (const index_type &i) const
bool IsInRange (int i) const
int number (int x, int y) const
int number (const index_type &idx) const
int offset (int x, int y) const
int offset (const index_type ij) const
index_type index (int i) const
int range_size () const

Detailed Description

Mapping between integer intervals and integer rectangles.

This class implements a bijective map between the subset [n0,n0+size-1] of Z and the subset [llx,urx]x[lly,ury] of Z^2 via the x-major-scheme (y varies fastest) :

 (llx,ury)                                 (urx,ury)
          +  n0+ny                        +  n0+(nx*ny) -1
          .
          .

          +  n0+1

          +  n0     + n0+ny+1   ...       +
 (llx,lly)                                  (urx,lly)

Definition at line 33 of file index-map.h.


Member Typedef Documentation

typedef int_index_type xmjr_indexmap2D::index_type
 

Definition at line 35 of file index-map.h.

Referenced by index.


Constructor & Destructor Documentation

xmjr_indexmap2D::xmjr_indexmap2D const index_type   UR = index_type(0,0) [inline]
 

Definition at line 49 of file index-map.h.

References init.

xmjr_indexmap2D::xmjr_indexmap2D int    urx,
int    ury
[inline]
 

Definition at line 51 of file index-map.h.

References init, urx, and ury.

xmjr_indexmap2D::xmjr_indexmap2D const index_type   LL,
const index_type   UR,
int    off = 0
[inline]
 

Definition at line 54 of file index-map.h.

References init.


Member Function Documentation

void xmjr_indexmap2D::init   [inline]
 

Definition at line 57 of file index-map.h.

References int_index_type::x, and int_index_type::y.

Referenced by xmjr_indexmap2D.

int xmjr_indexmap2D::x0   const [inline]
 

Definition at line 63 of file index-map.h.

References int_index_type::x.

Referenced by index, and number.

int xmjr_indexmap2D::xmax   const [inline]
 

Definition at line 64 of file index-map.h.

References int_index_type::x.

int xmjr_indexmap2D::y0   const [inline]
 

Definition at line 65 of file index-map.h.

References int_index_type::y.

Referenced by index, and number.

int xmjr_indexmap2D::ymax   const [inline]
 

Definition at line 66 of file index-map.h.

References int_index_type::y.

int xmjr_indexmap2D::n0   const [inline]
 

Definition at line 67 of file index-map.h.

Referenced by index, IsInRange, nmax, number, and offset.

int xmjr_indexmap2D::nmax   const [inline]
 

Definition at line 68 of file index-map.h.

References n0, and range_size.

const index_type& xmjr_indexmap2D::ll   const [inline]
 

Definition at line 70 of file index-map.h.

int xmjr_indexmap2D::llx   const [inline]
 

Definition at line 71 of file index-map.h.

References int_index_type::x.

int xmjr_indexmap2D::lly   const [inline]
 

Definition at line 72 of file index-map.h.

References int_index_type::y.

const index_type& xmjr_indexmap2D::ur   const [inline]
 

Definition at line 73 of file index-map.h.

int xmjr_indexmap2D::urx   const [inline]
 

Definition at line 74 of file index-map.h.

References int_index_type::x.

Referenced by xmjr_indexmap2D.

int xmjr_indexmap2D::ury   const [inline]
 

Definition at line 75 of file index-map.h.

References int_index_type::y.

Referenced by xmjr_indexmap2D.

bool xmjr_indexmap2D::IsInRange int    x,
int    y
const [inline]
 

Definition at line 78 of file index-map.h.

References int_index_type::x, and int_index_type::y.

Referenced by index, IsInRange, and number.

bool xmjr_indexmap2D::IsInRange const index_type   i const [inline]
 

Definition at line 81 of file index-map.h.

References IsInRange, int_index_type::x, and int_index_type::y.

bool xmjr_indexmap2D::IsInRange int    i const [inline]
 

Definition at line 84 of file index-map.h.

References n0, and range_size.

int xmjr_indexmap2D::number int    x,
int    y
const [inline]
 

Definition at line 88 of file index-map.h.

References IsInRange, n0, range, int_index_type::x, x0, int_index_type::y, and y0.

Referenced by number, and offset.

int xmjr_indexmap2D::number const index_type   idx const [inline]
 

Definition at line 94 of file index-map.h.

References number, int_index_type::x, and int_index_type::y.

int xmjr_indexmap2D::offset int    x,
int    y
const [inline]
 

Definition at line 95 of file index-map.h.

References n0, and number.

int xmjr_indexmap2D::offset const index_type    ij const [inline]
 

Definition at line 96 of file index-map.h.

References n0, and number.

index_type xmjr_indexmap2D::index int    i const [inline]
 

Definition at line 98 of file index-map.h.

References index_type, IsInRange, n0, range, range_size, x0, and y0.

int xmjr_indexmap2D::range_size   const [inline]
 

Definition at line 107 of file index-map.h.

Referenced by index, IsInRange, and nmax.


The documentation for this class was generated from the following file:
Copyright (c) Guntram Berti 1997-2002. See the GrAL Homepage for up-to-date information.

Generated at Tue Feb 26 16:08:24 2002 for GrAL Cartesian2D by doxygen 1.2.11-20011104 written by Dimitri van Heesch, © 1997-2000