Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Annotation of /trunk/gadget/popstatistics.h
[mareframe] / trunk / gadget / popstatistics.h Repository:
ViewVC logotype

Annotation of /trunk/gadget/popstatistics.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef popstatistics_h
2 :     #define popstatistics_h
3 :    
4 :     #include "lengthgroup.h"
5 :     #include "popinfovector.h"
6 :     #include "popinfoindexvector.h"
7 :    
8 :     /**
9 :     * \class PopStatistics
10 :     * \brief This is the class used to calculate some standard statistics about a given population
11 :     */
12 :     class PopStatistics {
13 :     public:
14 :     /**
15 :     * \brief This is the default PopStatistics constructor
16 :     */
17 :     PopStatistics() { meanlength = 0.0; meanweight = 0.0; totalnumber = 0.0; sdevlength = 0.0; };
18 :     /**
19 :     * \brief This is the default PopStatistics destructor
20 :     */
21 :     ~PopStatistics() {};
22 :     /**
23 :     * \brief This function will calculate the standard statistics for a given population
24 :     * \param pop is the PopInfoIndexVector that specifies the population
25 :     * \param lgrpdiv is the LengthGroupDivision of the population
26 :     * \param calcweight is the flag to denote whether the mean weight should be calculated or not (default value 1)
27 :     */
28 :     void calcStatistics(const PopInfoIndexVector& pop, const LengthGroupDivision* const lgrpdiv, int calcweight = 1);
29 :     /**
30 :     * \brief This will return the mean length of the population
31 :     * \return meanlength
32 :     */
33 :     double meanLength() const { return meanlength; };
34 :     /**
35 :     * \brief This will return the mean weight of the population
36 :     * \return meanweight
37 :     */
38 :     double meanWeight() const { return meanweight; };
39 :     /**
40 :     * \brief This will return the total number in the population
41 :     * \return totalnumber
42 :     */
43 :     double totalNumber() const { return totalnumber; };
44 :     /**
45 :     * \brief This will return the standard deviation of the length of the population
46 :     * \return sdevlength
47 :     */
48 :     double sdevLength() const { return sdevlength; };
49 :     private:
50 :     /**
51 :     * \brief This is the mean length of the stock in the population
52 :     */
53 :     double meanlength;
54 :     /**
55 :     * \brief This is the mean weight of the stock in the population
56 :     */
57 :     double meanweight;
58 :     /**
59 :     * \brief This is the total number of stock in the population
60 :     */
61 :     double totalnumber;
62 :     /**
63 :     * \brief This is the standard deviation of the length of the stock in the population
64 :     */
65 :     double sdevlength;
66 :     };
67 :    
68 :     #endif

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge