Gadget
popratiovector.h
Go to the documentation of this file.
1 #ifndef popratiovector_h
2 #define popratiovector_h
3 
4 #include "popratio.h"
5 
11 public:
15  PopRatioVector() { size = 0; v = 0;};
21  PopRatioVector(int sz, PopRatio initial);
26  PopRatioVector(const PopRatioVector& initial);
36  void resize(PopRatio value);
42  void resize(double* num, double rat);
48  void Delete(int pos);
53  int Size() const { return size; };
59  PopRatio& operator [] (int pos) { return v[pos]; };
65  const PopRatio& operator [] (int pos) const { return v[pos]; };
66 protected:
74  int size;
75 };
76 
77 #endif
This class implements a dynamic vector of PopRatio values.
Definition: popratiovector.h:10
PopRatio * v
This is the vector of PopRatio values.
Definition: popratiovector.h:65
PopRatioVector()
This is the default PopRatioVector constructor.
Definition: popratiovector.h:15
int size
This is the size of the vector.
Definition: popratiovector.h:74
void resize(PopRatio value)
This will add one new entry to the vector.
Definition: popratiovector.cc:33
int Size() const
This will return the size of the vector.
Definition: popratiovector.h:53
~PopRatioVector()
This is the PopRatioVector destructor.
Definition: popratiovector.cc:26
void Delete(int pos)
This will delete an entry from the vector.
Definition: popratiovector.cc:66
PopRatio & operator[](int pos)
This will return the value of an element of the vector.
Definition: popratiovector.h:59
This is the class used to store information about the number of tagged fish in a population cell of a...
Definition: popratio.h:10