#include <BufferedHistogram2D.h>
Public Member Functions | |
BufferedHistogram2D (double xbinsize=1.0, double ybinsize=1.0, double xmin=0.0, double ymin=0.0) | |
bool | fill (double x, double y, double v=1.0) |
Add v to the bin holding x,y. Return false if point is out of bounds. More... | |
std::vector< double > | popx () |
int | size () const |
popy is not yet implemented. More... | |
int | xsize () const |
int | ysize () const |
double | xmin () const |
double | ymin () const |
double | xmax () const |
double | ymax () const |
double | xbinsize () const |
double | ybinsize () const |
Private Types | |
typedef std::vector< double > | XBin |
typedef std::deque< XBin > | XBinDeque |
Private Attributes | |
double | m_xmin |
double | m_ymin |
double | m_xbinsize |
double | m_ybinsize |
XBinDeque | m_xbindeque |
A 2D histogram which can expand its range based on filling and have its edge sliced off.
Definition at line 12 of file BufferedHistogram2D.h.
|
private |
Definition at line 16 of file BufferedHistogram2D.h.
|
private |
Definition at line 17 of file BufferedHistogram2D.h.
BufferedHistogram2D::BufferedHistogram2D | ( | double | xbinsize = 1.0 , |
double | ybinsize = 1.0 , |
||
double | xmin = 0.0 , |
||
double | ymin = 0.0 |
||
) |
Create a buffered 2d histogram with lower corner at xmin, ymin and with bins of given sizes.
Definition at line 7 of file BufferedHistogram2D.cxx.
bool BufferedHistogram2D::fill | ( | double | x, |
double | y, | ||
double | v = 1.0 |
||
) |
Add v to the bin holding x,y. Return false if point is out of bounds.
Definition at line 31 of file BufferedHistogram2D.cxx.
std::vector< double > BufferedHistogram2D::popx | ( | ) |
Slice off the lowest X bin and return it as a vector. Note, the zeroth element of the vector corresponds to the bin starting at ymin but the length of vector may not represent the global ymax.
Definition at line 54 of file BufferedHistogram2D.cxx.
|
inline |
|
inline |
Definition at line 48 of file BufferedHistogram2D.h.
double BufferedHistogram2D::xmax | ( | ) | const |
Definition at line 13 of file BufferedHistogram2D.cxx.
|
inline |
Definition at line 44 of file BufferedHistogram2D.h.
|
inline |
Definition at line 40 of file BufferedHistogram2D.h.
|
inline |
Definition at line 49 of file BufferedHistogram2D.h.
double BufferedHistogram2D::ymax | ( | ) | const |
Definition at line 17 of file BufferedHistogram2D.cxx.
|
inline |
Definition at line 45 of file BufferedHistogram2D.h.
int BufferedHistogram2D::ysize | ( | ) | const |
Definition at line 21 of file BufferedHistogram2D.cxx.
|
private |
Definition at line 18 of file BufferedHistogram2D.h.
|
private |
Definition at line 13 of file BufferedHistogram2D.h.
|
private |
Definition at line 13 of file BufferedHistogram2D.h.
|
private |
Definition at line 13 of file BufferedHistogram2D.h.
|
private |
Definition at line 13 of file BufferedHistogram2D.h.