map.h

libPathFinder / Docs / Headers / 

Defines a generic map/grid-type (or matrix if you are mathematically inclined) holding n x m objects of the type given as the first parameter to the map template. The type used to represent coordinates can also be defined as the second parameter of the template, it default to unsigned int.

template < typename T, typename _coord_type = unsigned int >
class map {
public:
  typedef T data_type;
  typedef _coord_type coord_type;

The two typedefs above are also defined to make the template a bit easier to use.

Values can be set using the two methods:

void set ( x coord_type, coord_type y, data_type value );
data_type get( coord_type x, coord_type y );