Gadget
popinfovector.h
Go to the documentation of this file.
1 #ifndef popinfovector_h
2 #define popinfovector_h
3 
4 #include "conversionindex.h"
5 #include "popinfo.h"
6 
12 public:
16  PopInfoVector() { size = 0; v = 0; };
22  PopInfoVector(int sz, PopInfo initial);
27  PopInfoVector(const PopInfoVector& initial);
37  void resizeBlank(int addsize);
42  void resize(PopInfo value);
48  void Delete(int pos);
53  int Size() const { return size; };
59  PopInfo& operator [] (int pos) { return v[pos]; };
65  const PopInfo& operator [] (int pos) const { return v[pos]; };
71  void Sum(const PopInfoVector* const Number, const ConversionIndex& CI);
72 protected:
80  int size;
81 };
82 
83 #endif
This is the class used to convert information from one LengthGroupDivision length structure to a seco...
Definition: conversionindex.h:12
This class implements a dynamic vector of PopInfo values.
Definition: popinfovector.h:11
void resize(PopInfo value)
This will add one new entry to the vector.
Definition: popinfovector.cc:50
int size
This is the size of the vector.
Definition: popinfovector.h:80
PopInfo * v
This is the vector of PopInfo values.
Definition: popinfovector.h:76
PopInfoVector()
This is the default PopInfoVector constructor.
Definition: popinfovector.h:16
PopInfo & operator[](int pos)
This will return the value of an element of the vector.
Definition: popinfovector.h:59
int Size() const
This will return the size of the vector.
Definition: popinfovector.h:53
void Delete(int pos)
This will delete an entry from the vector.
Definition: popinfovector.cc:65
void resizeBlank(int addsize)
This will add new blank (ie. NULL) entries to the vector.
Definition: popinfovector.cc:33
void Sum(const PopInfoVector *const Number, const ConversionIndex &CI)
This function will sum the elements of an existing PopInfoVector, possibly allowing for the length gr...
Definition: popinfomemberfunctions.cc:10
~PopInfoVector()
This is the PopInfoVector destructor.
Definition: popinfovector.cc:26
This is the class used to store information about the number, and mean weight, of a population cell o...
Definition: popinfo.h:10