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] View of /trunk/gadget/agebandmatrixratio.h
[mareframe] / trunk / gadget / agebandmatrixratio.h Repository:
ViewVC logotype

View of /trunk/gadget/agebandmatrixratio.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (download) (annotate)
Mon Feb 10 17:09:07 2014 UTC (10 years, 4 months ago) by agomez
File size: 1639 byte(s)
Initial version based on Gadget 2.2.00
#ifndef agebandmatrixratio_h
#define agebandmatrixratio_h

#include "popratio.h"
#include "lengthgroup.h"
#include "popratiomatrix.h"
#include "popratioindexvector.h"
#include "agebandmatrix.h"
#include "agebandmatrixptrvector.h"
#include "charptrvector.h"
#include "gadget.h"

class Maturity;

class AgeBandMatrixRatio {
public:
  AgeBandMatrixRatio(int age, const IntVector& minl, const IntVector& size);
  AgeBandMatrixRatio(int age, const PopRatioMatrix& initial);
  AgeBandMatrixRatio(int age, const PopRatioIndexVector& initial);
  AgeBandMatrixRatio(const AgeBandMatrixRatio& initial);
  AgeBandMatrixRatio() { minage = 0; nrow = 0; v = 0; };
  ~AgeBandMatrixRatio();
  int minAge() const { return minage; };
  int maxAge() const { return minage + nrow - 1; };
  int Nrow() const { return nrow; };
  int minLength(int age) const { return v[age - minage]->minCol(); };
  int maxLength(int age) const { return v[age - minage]->maxCol(); };
  void IncrementAge(const AgeBandMatrix& Total);
  void Grow(const DoubleMatrix& Lgrowth, const AgeBandMatrix& Total);
  void Grow(const DoubleMatrix& Lgrowth, const AgeBandMatrix& Total, Maturity* const Mat, int area);
  PopRatioIndexVector& operator [] (int age) { return *(v[age - minage]); };
  const PopRatioIndexVector& operator [] (int age) const { return *(v[age - minage]); };
  void updateRatio(const AgeBandMatrix& Total);
  void updateNumbers(const AgeBandMatrix& Total);
  void updateAndTagLoss(const AgeBandMatrix& Total, const DoubleVector& tagloss);
  int numTagExperiments() const;
  void setToZero();
protected:
  int minage;
  int nrow;
  PopRatioIndexVector** v;
};

#endif

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

Powered By FusionForge