Public Types | Public Member Functions | Private Attributes
ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage > Class Template Reference

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

#include <grid_map_dynamic.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.
iterator cell (const int &x, const int &y) const ecl_assert_throw_decl(StandardException)
iterator cell (const double &x, const double &y) const ecl_assert_throw_decl(StandardException)
bool cell (const int &x, const int &y, iterator &it) const
bool cell (const double &x, const double &y, iterator &it) const
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 num_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 int &numOfRows=1, const int &numOfCols=1, 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())
bool operator!= (const GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage > &gridMap)
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)
void operator= (const GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage > &gridMap)
bool operator== (const GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage > &gridMap)
linear_algebra::Vector2d originVector () const
void remap (const int &numOfRows=1, const int &numOfCols=1, const double &origin_x=0.0, const double &origin_y=0.0, const double &scale=1.0)
size_type rows () const
 Number of num_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)
 ~GridMap ()

Private Attributes

CellType * cells
linear_algebra::Vector2d limits
int num_of_cols
int num_of_rows
linear_algebra::Vector2d origin
double scale_multiplier

Detailed Description

template<typename CellType>
class ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >

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 dynamic storage version of GirdMap. Actually nothing special

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.

Definition at line 49 of file grid_map_dynamic.hpp.


Member Typedef Documentation

template<typename CellType >
typedef const CellType* ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::const_iterator

Grid map's constant iterator type.

Definition at line 56 of file grid_map_dynamic.hpp.

template<typename CellType >
typedef const CellType& ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::const_reference

Grid map's element const reference type.

Definition at line 58 of file grid_map_dynamic.hpp.

template<typename CellType >
typedef CellType* ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::iterator

Array's iterator type.

Definition at line 55 of file grid_map_dynamic.hpp.

template<typename CellType >
typedef CellType& ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::reference

Grid map's element reference type.

Definition at line 57 of file grid_map_dynamic.hpp.

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

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

Definition at line 59 of file grid_map_dynamic.hpp.

template<typename CellType >
typedef CellType ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::value_type

Grid map's cell type.

Definition at line 54 of file grid_map_dynamic.hpp.


Constructor & Destructor Documentation

template<typename CellType >
ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::GridMap ( const int &  numOfRows = 1,
const int &  numOfCols = 1,
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 numOfRows and numOfCols instead of template parameters which is used in fixed size version of GridMap. Subseqently the real world coverage is determined via these and the specified real world input args.

  • Real Domain : [origin_x, origin_x + num_of_cols*scale]
  • Grid Domain : [ 0, num_of_cols ]
  • Real Range : [origin_y, origin_y + num_of_rows*scale]
  • Grid Range : [ 0, num_of_rows ]

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

Definition at line 191 of file grid_map_dynamic.hpp.

template<typename CellType >
ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::~GridMap ( )

Definition at line 224 of file grid_map_dynamic.hpp.


Member Function Documentation

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

Reference to the last grid cell.

Definition at line 86 of file grid_map_dynamic.hpp.

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

Const reference to the last grid cell.

Definition at line 87 of file grid_map_dynamic.hpp.

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

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

Definition at line 80 of file grid_map_dynamic.hpp.

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

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

Definition at line 81 of file grid_map_dynamic.hpp.

template<typename CellType >
iterator ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::cell ( const int &  x,
const int &  y 
) const [inline]

Definition at line 94 of file grid_map_dynamic.hpp.

template<typename CellType >
iterator ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::cell ( const double &  x,
const double &  y 
) const [inline]

Definition at line 100 of file grid_map_dynamic.hpp.

template<typename CellType >
bool ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::cell ( const int &  x,
const int &  y,
iterator it 
) const [inline]

Definition at line 107 of file grid_map_dynamic.hpp.

template<typename CellType >
bool ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::cell ( const double &  x,
const double &  y,
iterator it 
) const [inline]

Definition at line 114 of file grid_map_dynamic.hpp.

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

Definition at line 274 of file grid_map_dynamic.hpp.

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

Width of a single cell.

Definition at line 125 of file grid_map_dynamic.hpp.

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

Number of num_of_cols in the grid map.

Definition at line 127 of file grid_map_dynamic.hpp.

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

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

Definition at line 82 of file grid_map_dynamic.hpp.

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

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

Definition at line 83 of file grid_map_dynamic.hpp.

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

Reference to the first grid cell.

Definition at line 84 of file grid_map_dynamic.hpp.

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

Const reference to the first grid cell.

Definition at line 85 of file grid_map_dynamic.hpp.

template<typename CellType >
void ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::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 237 of file grid_map_dynamic.hpp.

template<typename CellType >
bool ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::operator!= ( const GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage > &  gridMap) [inline]

Definition at line 145 of file grid_map_dynamic.hpp.

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

Definition at line 249 of file grid_map_dynamic.hpp.

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

Definition at line 258 of file grid_map_dynamic.hpp.

template<typename CellType >
void ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::operator= ( const GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage > &  gridMap)

Definition at line 301 of file grid_map_dynamic.hpp.

template<typename CellType >
bool ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::operator== ( const GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage > &  gridMap) [inline]

Definition at line 133 of file grid_map_dynamic.hpp.

template<typename CellType >
linear_algebra::Vector2d ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::originVector ( ) const [inline]

Definition at line 131 of file grid_map_dynamic.hpp.

template<typename CellType >
void ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::remap ( const int &  numOfRows = 1,
const int &  numOfCols = 1,
const double &  origin_x = 0.0,
const double &  origin_y = 0.0,
const double &  scale = 1.0 
)

Definition at line 206 of file grid_map_dynamic.hpp.

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

Number of num_of_rows in the grid map.

Definition at line 126 of file grid_map_dynamic.hpp.

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

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

Definition at line 79 of file grid_map_dynamic.hpp.

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

Definition at line 287 of file grid_map_dynamic.hpp.


Member Data Documentation

template<typename CellType >
CellType* ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::cells [private]

Definition at line 161 of file grid_map_dynamic.hpp.

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

Definition at line 160 of file grid_map_dynamic.hpp.

template<typename CellType >
int ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::num_of_cols [private]

Definition at line 163 of file grid_map_dynamic.hpp.

template<typename CellType >
int ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::num_of_rows [private]

Definition at line 162 of file grid_map_dynamic.hpp.

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

Definition at line 159 of file grid_map_dynamic.hpp.

template<typename CellType >
double ecl::GridMap< CellType, DynamicGridMapStorage, DynamicGridMapStorage >::scale_multiplier [private]

Definition at line 158 of file grid_map_dynamic.hpp.


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


ecl_maps
Author(s): Daniel Stonier (d.stonier@gmail.com)
autogenerated on Thu Jan 2 2014 11:12:25