#include <CGridder.hpp>
Public Member Functions | |
CGridder (Cvals *xval, Cvals *yval, Cvals *binval, double xmin, double xmax, double ymin, double ymax, int istart, int iend) | |
virtual int | doGridding ()=0 |
Matrix< float > * | getDataPtr () |
Protected Member Functions | |
void | allocateMemory (int nx, int ny) |
int | getStartIndex () const |
int | getEndIndex () const |
void | setNx (const int &nx) |
void | setNy (const int &ny) |
Protected Attributes | |
Matrix< float > * | _data |
int | _nx |
int | _ny |
Cvals * | _xval |
Cvals * | _yval |
Cvals * | _binval |
double | _xmin |
double | _xmax |
double | _ymin |
double | _ymax |
int | _ngridded |
Private Attributes | |
int | _istart |
int | _iend |
the resulting grid (dimensions nx,ny) is declared (ny, nx) i.e. we use the matrix way of specifying stuff:
The result matrix is allocated in this function, when you receive the pointer you are in absolute controll of it (i.e. no attempt to deallocate the allocated memory is made in the CGridder class or its derivatives)
void CGridder::allocateMemory | ( | int | nx, | |
int | ny | |||
) | [protected] |
Call this function to allocate the memory for the data storage. Note: the data is stored as Matrix(ny, nx): ny is for the number of rows!
virtual int CGridder::doGridding | ( | ) | [pure virtual] |
Virtual destructor with default implementation pure virtual function: does the actual gridding. Returns number of particles gridded
Implemented in CProj3DKernel, CProj3DGridder, and CParticleIDFinder.
int CGridder::getEndIndex | ( | ) | const [inline, protected] |
return the start particle array index
void CGridder::setNx | ( | const int & | nx | ) | [inline, protected] |
return the end particle array index
Cvals* CGridder::_binval [protected] |
Cvals class instance providing data to bin
Matrix<float>* CGridder::_data [protected] |
pointer to the allocated data. Never freed by a gridder, free yourself!
int CGridder::_iend [private] |
array index of the last particle to check
int CGridder::_istart [private] |
array index of the first particle to check
int CGridder::_ngridded [protected] |
number of particles gridded
int CGridder::_nx [protected] |
number of bins (pixels) in the x-direction
int CGridder::_ny [protected] |
number of bins (pixels) in the y-direction
Cvals* CGridder::_xval [protected] |
Cvals class instance providing x-data
Cvals* CGridder::_yval [protected] |
Cvals class instance providing y-data