Gadget
popinfo.h
Go to the documentation of this file.
1 #ifndef popinfo_h
2 #define popinfo_h
3 
4 #include "gadget.h"
5 
10 class PopInfo {
11 public:
15  PopInfo() { N = 0.0; W = 0.0; };
19  ~PopInfo() {};
23  double N;
27  double W;
32  void operator -= (double a) { N -= a; };
37  void operator *= (double a) { N *= a; };
41  void setToZero() { N = 0.0; W = 0.0; };
46  PopInfo& operator = (const PopInfo& a);
51  PopInfo& operator += (const PopInfo& a);
56  PopInfo operator * (double a);
57 };
58 
59 #endif
This is the class used to store information about the number, and mean weight, of a population cell o...
Definition: popinfo.h:10
PopInfo operator*(double a)
This operator will multiply the PopInfo by a constant.
Definition: popinfo.cc:26
void operator*=(double a)
This operator will increase the PopInfo by a multiplicative constant.
Definition: popinfo.h:37
void setToZero()
This function will set the PopInfo to zero.
Definition: popinfo.h:41
PopInfo & operator=(const PopInfo &a)
This operator will set the PopInfo equal to an existing PopInfo.
Definition: popinfo.cc:4
PopInfo & operator+=(const PopInfo &a)
This operator will add an existing PopInfo to the current PopInfo.
Definition: popinfo.cc:10
PopInfo()
This is the PopInfo constructor.
Definition: popinfo.h:15
double N
This is the number of fish in the population cell.
Definition: popinfo.h:19
double W
This is the mean weight of the fish in the population cell.
Definition: popinfo.h:27
~PopInfo()
This is the PopInfo destructor.
Definition: popinfo.h:19
void operator-=(double a)
This operator will subtract a number from the PopInfo.
Definition: popinfo.h:32