Gadget
popratio.h
Go to the documentation of this file.
1 #ifndef popratio_h
2 #define popratio_h
3 
4 #include "gadget.h"
5 
10 class PopRatio {
11 public:
15  PopRatio() { N = NULL; R = 0.0; };
19  ~PopRatio() {};
23  double* N;
27  double R;
32  void operator -= (double a) { *N -= a; R = 0.0; };
37  void operator *= (double a) { *N *= a; R = 0.0; };
42  PopRatio& operator = (const PopRatio& a);
47  PopRatio& operator += (const PopRatio& a);
48 };
49 
50 #endif
This is the class used to store information about the number of tagged fish in a population cell of a...
Definition: popratio.h:10
double R
This is the ratio of tagged fish in the population cell.
Definition: popratio.h:27
PopRatio & operator+=(const PopRatio &a)
This operator will add an existing PopRatio to the current PopRatio.
Definition: popratio.cc:19
PopRatio & operator=(const PopRatio &a)
This operator will set the PopRatio equal to an existing PopRatio.
Definition: popratio.cc:3
~PopRatio()
This is the PopRatio destructor.
Definition: popratio.h:19
double * N
This is the number of tagged fish in the population cell.
Definition: popratio.h:19
void operator*=(double a)
This operator will increase the PopRatio by a multiplicative constant.
Definition: popratio.h:37
void operator-=(double a)
This operator will subtract a number from the PopRatio.
Definition: popratio.h:32
PopRatio()
This is the PopRatio constructor.
Definition: popratio.h:15