All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Private Attributes
ecl::GridMap< CellType, Rows, Cols > Class Template Reference

Stores a discretised map over a real world co-ordinate (x-y) system. More...

#include <grid_map_fixed.hpp>

List of all members.

Public Types

typedef const CellType * const_iterator
typedef const CellType & const_reference
typedef CellType * iterator
typedef CellType & reference
typedef int size_type
typedef CellType value_type
 Grid map's cell type.

Public Member Functions

reference back ()
 Reference to the last grid cell.
const_reference back () const
 Const reference to the last grid cell.
iterator begin ()
 One dimensional iterator to the start of the underlying array of cells.
const_iterator begin () const
 One dimensional const iterator to the start of the underlying array of cells.
linear_algebra::Vector2i cellCoordinates (const double &x, const double &y) const ecl_assert_throw_decl(StandardException)
double cellWidth () const
 Width of a single cell.
size_type cols () const
 Number of cols in the grid map.
iterator end ()
 One dimensional iterator to the end of the underlying array of cells.
const_iterator end () const
 One dimensional const iterator to the end of the underlying array of cells.
reference front ()
 Reference to the first grid cell.
const_reference front () const
 Const reference to the first grid cell.
 GridMap (const double &origin_x=0.0, const double &origin_y=0.0, const double &scale=1.0)
 Locks real world co-ordinates onto the the grid map.
void init (const CellType &initialValue=CellType())
CellType & operator() (const int &x, const int &y) ecl_assert_throw_decl(StandardException)
CellType & operator() (const double &x, const double &y) ecl_assert_throw_decl(StandardException)
size_type rows () const
 Number of rows in the grid map.
size_type size () const
 Grid map size (in 1 dimension), i.e. total number of cells.
linear_algebra::Vector2d worldCoordinates (const int &x, const int &y) const ecl_assert_throw_decl(StandardException)

Private Attributes

CellType cells [Rows *Cols]
linear_algebra::Vector2d limits
linear_algebra::Vector2d origin
double scale_multiplier

Detailed Description

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
class ecl::GridMap< CellType, Rows, Cols >

Stores a discretised map over a real world co-ordinate (x-y) system.

Interface for a discretised grid map overlaying a real world x,y co-ordinate system. See the constructor for detailed information on how the grid map is overlaid on the real world co-ordinate system.

This is just a container storage system with real world/grid map coordinate access, no more.

Usage:

Template Parameters:
CellType: type for allocated cells in the grid map.
Rows: number of rows allocated to the fixed grid map.
Cols: number of cols allocated to the fixed grid map, default is Cols=Rows.

Definition at line 50 of file grid_map_fixed.hpp.


Member Typedef Documentation

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
typedef const CellType* ecl::GridMap< CellType, Rows, Cols >::const_iterator

Grid map's constant iterator type.

Definition at line 57 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
typedef const CellType& ecl::GridMap< CellType, Rows, Cols >::const_reference

Grid map's element const reference type.

Definition at line 59 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
typedef CellType* ecl::GridMap< CellType, Rows, Cols >::iterator

Array's iterator type.

Definition at line 56 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
typedef CellType& ecl::GridMap< CellType, Rows, Cols >::reference

Grid map's element reference type.

Definition at line 58 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
typedef int ecl::GridMap< CellType, Rows, Cols >::size_type

Grid map's type used to denote the length of the array.

Definition at line 60 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
typedef CellType ecl::GridMap< CellType, Rows, Cols >::value_type

Grid map's cell type.

Definition at line 55 of file grid_map_fixed.hpp.


Constructor & Destructor Documentation

template<typename CellType , int Rows, int Cols>
ecl::GridMap< CellType, Rows, Cols >::GridMap ( const double &  origin_x = 0.0,
const double &  origin_y = 0.0,
const double &  scale = 1.0 
)

Locks real world co-ordinates onto the the grid map.

This constructor sets the real world location and scale (stretch) multiplier for the grid map. The bottom left corner of the grid map will lock onto the specified real world co-ordinates.

Note that the size of the grid map is specified through the template parameters. Subseqently the real world coverage is determined via these and the specified real world input args.

  • Real Domain : [origin_x, origin_x + Cols*scale]
  • Grid Domain : [ 0, Cols ]
  • Real Range : [origin_y, origin_y + Rows*scale]
  • Grid Range : [ 0, Rows ]

Also note that the grid map is filled with the default cell type object (ie. constructor with () call).

Definition at line 130 of file grid_map_fixed.hpp.


Member Function Documentation

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
reference ecl::GridMap< CellType, Rows, Cols >::back ( ) [inline]

Reference to the last grid cell.

Definition at line 84 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
const_reference ecl::GridMap< CellType, Rows, Cols >::back ( ) const [inline]

Const reference to the last grid cell.

Definition at line 85 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
iterator ecl::GridMap< CellType, Rows, Cols >::begin ( ) [inline]

One dimensional iterator to the start of the underlying array of cells.

Definition at line 78 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
const_iterator ecl::GridMap< CellType, Rows, Cols >::begin ( ) const [inline]

One dimensional const iterator to the start of the underlying array of cells.

Definition at line 79 of file grid_map_fixed.hpp.

template<typename CellType , int Rows, int Cols>
linear_algebra::Vector2i ecl::GridMap< CellType, Rows, Cols >::cellCoordinates ( const double &  x,
const double &  y 
) const

Definition at line 179 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
double ecl::GridMap< CellType, Rows, Cols >::cellWidth ( ) const [inline]

Width of a single cell.

Definition at line 96 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
size_type ecl::GridMap< CellType, Rows, Cols >::cols ( ) const [inline]

Number of cols in the grid map.

Definition at line 98 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
iterator ecl::GridMap< CellType, Rows, Cols >::end ( ) [inline]

One dimensional iterator to the end of the underlying array of cells.

Definition at line 80 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
const_iterator ecl::GridMap< CellType, Rows, Cols >::end ( ) const [inline]

One dimensional const iterator to the end of the underlying array of cells.

Definition at line 81 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
reference ecl::GridMap< CellType, Rows, Cols >::front ( ) [inline]

Reference to the first grid cell.

Definition at line 82 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
const_reference ecl::GridMap< CellType, Rows, Cols >::front ( ) const [inline]

Const reference to the first grid cell.

Definition at line 83 of file grid_map_fixed.hpp.

template<typename CellType , int Rows, int Cols>
void ecl::GridMap< CellType, Rows, Cols >::init ( const CellType &  initialValue = CellType())

This allows resetting of the grid map at a later stage. This currently just fills the map with the same default cell type object. (We're assuming here that the coordinates of the grid map do not change).

Definition at line 145 of file grid_map_fixed.hpp.

template<typename CellType , int Rows, int Cols>
CellType & ecl::GridMap< CellType, Rows, Cols >::operator() ( const int &  x,
const int &  y 
)

Definition at line 156 of file grid_map_fixed.hpp.

template<typename CellType , int Rows, int Cols>
CellType & ecl::GridMap< CellType, Rows, Cols >::operator() ( const double &  x,
const double &  y 
)

Definition at line 164 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
size_type ecl::GridMap< CellType, Rows, Cols >::rows ( ) const [inline]

Number of rows in the grid map.

Definition at line 97 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
size_type ecl::GridMap< CellType, Rows, Cols >::size ( ) const [inline]

Grid map size (in 1 dimension), i.e. total number of cells.

Definition at line 77 of file grid_map_fixed.hpp.

template<typename CellType , int Rows, int Cols>
ecl::linear_algebra::Vector2d ecl::GridMap< CellType, Rows, Cols >::worldCoordinates ( const int &  x,
const int &  y 
) const

Definition at line 191 of file grid_map_fixed.hpp.


Member Data Documentation

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
CellType ecl::GridMap< CellType, Rows, Cols >::cells[Rows *Cols] [private]

Definition at line 104 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
linear_algebra::Vector2d ecl::GridMap< CellType, Rows, Cols >::limits [private]

Definition at line 103 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
linear_algebra::Vector2d ecl::GridMap< CellType, Rows, Cols >::origin [private]

Definition at line 102 of file grid_map_fixed.hpp.

template<typename CellType, int Rows = DynamicGridMapStorage, int Cols = Rows>
double ecl::GridMap< CellType, Rows, Cols >::scale_multiplier [private]

Definition at line 101 of file grid_map_fixed.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends


ecl_maps
Author(s): Daniel Stonier
autogenerated on Thu Apr 25 2013 15:26:24