LOOS  v2.3.2
loos::DensityTools::DensityGridIterator< T, R > Class Template Reference

Random access iterator using the BOOST facade. More...

#include <DensityGrid.hpp>

Inheritance diagram for loos::DensityTools::DensityGridIterator< T, R >:
Collaboration diagram for loos::DensityTools::DensityGridIterator< T, R >:

Public Member Functions

 DensityGridIterator (const DensityGrid< T > &g, long l)
 
template<typename S >
 DensityGridIterator (const DensityGridIterator< T, S > &o)
 
loos::GCoord world () const
 
loos::GCoord coords () const
 
DensityGridpoint grid () const
 

Friends

class boost::iterator_core_access
 
template<typename , typename >
class DensityGridIterator
 

Detailed Description

template<typename T, typename R>
class loos::DensityTools::DensityGridIterator< T, R >

Random access iterator using the BOOST facade.

This iterator generates a family of iterators for an DensityGrid object. The iterators are random access and provide a "world()" public method that can return the world coordinates of the current iterator location and a "grid()" that returns the grid coordinates. Note that this is a method of the iterator. For example,

DensityGridIterator<double, double> i = grid.begin();
cout << *i << endl;
cout << i.world() << endl;

the first line will write out the grid value at the origin while the second line will write out the world coords for the origin. On the other hand,

cout << i[0] << endl;
cout << i[0].world() << endl;

the first line will again write out the grid value at the original, but the second line will be an error...

Definition at line 133 of file DensityGrid.hpp.


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