--- trunk/gadget/grower.h 2014/02/10 17:09:07 1 +++ trunk/gadget/grower.h 2015/04/29 12:55:30 2 @@ -10,6 +10,7 @@ #include "formulavector.h" #include "keeper.h" #include "growthcalc.h" +#include "matrix.h" /** * \class Grower @@ -91,13 +92,15 @@ * \param area is the area that the growth is being calculated on * \return lgrowth, a DoubleMatrix containing the length increase */ - const DoubleMatrix& getLengthIncrease(int area) const { return *lgrowth[this->areaNum(area)]; }; +// const DoubleMatrix& getLengthIncrease(int area) const { return *lgrowth[this->areaNum(area)]; }; + const Matrix& getLengthIncrease_(int area) const { return *_lgrowth; }; /** * \brief This function will return the calculated weight increase due to growth on an area * \param area is the area that the growth is being calculated on * \return wgrowth, a DoubleMatrix containing the weight increase */ - const DoubleMatrix& getWeightIncrease(int area) const { return *wgrowth[this->areaNum(area)]; }; +// const DoubleMatrix& getWeightIncrease(int area) const { return *wgrowth[this->areaNum(area)]; }; + const Matrix& getWeightIncrease_(int area) const { return *_wgrowth; }; /** * \brief This function will return the fixed weight increase due to growth on an area * \param area is the area that the growth is being calculated on @@ -118,6 +121,12 @@ * \brief This is the LengthGroupDivision used to store length information */ LengthGroupDivision* LgrpDiv; + + //FIXME + double * meanlength_vectorPow; + + int vector_OK; + /** * \brief This is the ConversionIndex used to convert from the stock LengthGroupDivision to the LengthGroupDivision used for the growth calculation */ @@ -136,22 +145,26 @@ * \brief This is the DoubleMatrix used to store the calculated increase in length on the current timestep * \note The indices for this object are [area][length] */ - DoubleMatrix calcLengthGrowth; +// DoubleMatrix calcLengthGrowth; + Matrix _calcLengthGrowth; /** * \brief This is the DoubleMatrix used to store the calculated increase in weight on the current timestep * \note The indices for this object are [area][length] */ - DoubleMatrix calcWeightGrowth; +// DoubleMatrix calcWeightGrowth; + Matrix _calcWeightGrowth; /** * \brief This is the DoubleMatrixPtrVector used to store the calculated increase in length for each length group on the current timestep * \note The indices for this object are [area][change in length][stock length] */ - DoubleMatrixPtrVector lgrowth; +// DoubleMatrixPtrVector lgrowth; + Matrix* _lgrowth; /** * \brief This is the DoubleMatrixPtrVector used to store the calculated increase in weight for each length group on the current timestep * \note The indices for this object are [area][change in length][stock length] */ - DoubleMatrixPtrVector wgrowth; +// DoubleMatrixPtrVector wgrowth; + Matrix* _wgrowth; /** * \brief This is the dummy DoubleVector used during the growth calculation * \note The values of this vector are set to zero, and never used, unless the growth function depends on the feeding level of the stock (ie. growth is based on consumption of preys)