CARMA C++
RegAxes.h
Go to the documentation of this file.
1 #ifndef SZA_UTIL_REGAXES_H
2 #define SZA_UTIL_REGAXES_H
3 
11 #include <vector>
12 
13 #include "carma/szautil/RegCoord.h"
14 
15 namespace sza {
16  namespace util {
17 
23  class RegAxes {
24  public:
25 
29  RegAxes();
30  RegAxes(unsigned nel0);
31  RegAxes(unsigned nel0, unsigned nel1);
32 
36  RegAxes(RegAxes* regAxes);
37 
41  void setAxis(unsigned nAxis, unsigned nEl);
42 
46  virtual ~RegAxes();
47 
51  unsigned int nAxis();
52 
56  unsigned int nEl(int axis=-1);
57 
62  unsigned int elementOffsetOf(RegCoord& coord);
63 
68  unsigned int elementOffsetOf(RegCoord coord);
69 
74  unsigned int refElementOffsetOf(RegCoord& coord);
75 
76  private:
77 
78  std::vector<unsigned int> nel_;
79 
83  void privateConstructor();
84 
88  unsigned int getIndex(RegCoord& coord, unsigned iAxis);
89 
90  }; // End class RegAxes
91 
92  } // End namespace util
93 } // End namespace sza
94 
95 
96 
97 #endif // End #ifndef SZA_UTIL_REGAXES_H
unsigned int refElementOffsetOf(RegCoord &coord)
Return the element offset of the specified coordinate from the start of the register array...
virtual ~RegAxes()
Destructor.
Tagged: Thu Jun 24 17:38:28 UTC 2004.
RegAxes()
Constructors.
void setAxis(unsigned nAxis, unsigned nEl)
Method for setting arbitrary axes.
A class for specifying a coordinate in a multi-dimensional space.
Definition: RegCoord.h:20
Class for managing coordinate axes.
Definition: RegAxes.h:23
unsigned int nEl(int axis=-1)
Return the number of elements.
unsigned int nAxis()
Return the number of axes.
unsigned int elementOffsetOf(RegCoord &coord)
Return the element offset of the specified coordinate from the start of the register array...