Gadget
popratioindexvector.h
Go to the documentation of this file.
1 #ifndef popratioindexvector_h
2 #define popratioindexvector_h
3 
4 #include "popratiovector.h"
5 
11 public:
15  PopRatioIndexVector() { minpos = 0; size = 0; v = 0; };
22  PopRatioIndexVector(int sz, int minpos);
29  PopRatioIndexVector(int sz, int minpos, const PopRatioVector& initial);
46  void resize(int addsize, int newminpos, const PopRatioVector& initial);
52  PopRatioVector& operator [] (int pos) { return *v[pos - minpos]; };
58  const PopRatioVector& operator [] (int pos) const { return *v[pos - minpos]; };
63  int minCol() const { return minpos; };
68  int maxCol() const { return minpos + size; };
73  int Size() const { return size; };
74 protected:
78  int minpos;
82  int size;
87 };
88 
89 #endif
This class implements a dynamic vector of PopRatioVector values, indexed from minpos not 0.
Definition: popratioindexvector.h:10
PopRatioVector ** v
This is the indexed vector of PopRatioVector values.
Definition: popratioindexvector.h:86
int size
This is the size of the vector.
Definition: popratioindexvector.h:82
int minpos
This is the index for the vector.
Definition: popratioindexvector.h:73
int Size() const
This will return the size of the vector.
Definition: popratioindexvector.h:73
int minCol() const
This will return the index of the vector.
Definition: popratioindexvector.h:63
PopRatioVector & operator[](int pos)
This will return the value of an element of the vector.
Definition: popratioindexvector.h:52
~PopRatioIndexVector()
This is the PopRatioIndexVector destructor.
Definition: popratioindexvector.cc:40
PopRatioIndexVector()
This is the default PopRatioIndexVector constructor.
Definition: popratioindexvector.h:15
void resize(int addsize, int newminpos, const PopRatioVector &initial)
This will add new entries to the vector.
Definition: popratioindexvector.cc:50
int maxCol() const
This will return the length of the vector.
Definition: popratioindexvector.h:68
This class implements a dynamic vector of PopRatio values.
Definition: popratiovector.h:10