lsst.jointcal  14.0-28-ge87de3a+4
Histo4d.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 #ifndef LSST_JOINTCAL_HISTO4D_H
3 #define LSST_JOINTCAL_HISTO4D_H
4 
5 namespace lsst {
6 namespace jointcal {
7 
11 public:
13  // obvious meanings. NEntries is used as the size of the primary allocation.
14  SparseHisto4d(const int n1, double min1, double max1, const int n2, double min2, double max2,
15  const int n3, double min3, double max3, const int n4, double min4, double max4,
16  const int nEntries);
18  void fill(const double x[4]);
20  void fill(const double x1, const double x2, const double x3, const double x4);
22  int maxBin(double x[4]);
23 
25  void zeroBin(double x[4]);
26 
28  void binLimits(const double x[4], const int idim, double &xMin, double &xMax) const;
29 
31  int getNEntries() const { return _ndata; }
32 
34 
35  // private:
36  int code_value(const double x[4]) const;
37  void inverse_code(const int code, double x[4]) const;
38  void sort();
39  void dump() const;
40 
41 private:
43  int _ndata;
44  int _dataSize;
45  int _n[4];
46  double _minVal[4], _maxVal[4];
47  double _scale[4];
48  bool _sorted;
49 };
50 } // namespace jointcal
51 } // namespace lsst
52 
53 #endif // LSST_JOINTCAL_HISTO4D_H
void fill(const double x[4])
Definition: Histo4d.cc:69
int code_value(const double x[4]) const
Definition: Histo4d.cc:44
void binLimits(const double x[4], const int idim, double &xMin, double &xMax) const
return the bin limits of dimension idim (0<=idim<4), around point X.
Definition: Histo4d.cc:130
A class to histogram in 4 dimensions.
Definition: Histo4d.h:10
void inverse_code(const int code, double x[4]) const
Definition: Histo4d.cc:54
int maxBin(double x[4])
Definition: Histo4d.cc:93
Class for a simple mapping implementing a generic Gtransfo.
void zeroBin(double x[4])
Definition: Histo4d.cc:115
double x