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

View of /trunk/gadget/agebandmatrixptrmatrix.h

Parent Directory Parent Directory | Revision Log Revision Log


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

#include "agebandmatrixptrvector.h"

/**
 * \class AgeBandMatrixPtrMatrix
 * \brief This class implements a dynamic vector of AgeBandMatrixPtrVector values
 */
class AgeBandMatrixPtrMatrix {
public:
  /**
   * \brief This is the default AgeBandMatrixPtrMatrix constructor
   */
  AgeBandMatrixPtrMatrix() { nrow = 0; v = 0; };
  /**
   * \brief This is the AgeBandMatrixPtrMatrix destructor
   * \note This will free all the memory allocated to all the elements of the vector
   */
  ~AgeBandMatrixPtrMatrix();
  /**
   * \brief This will add one new entry to the vector
   * \param value is the value that will be entered for the new entry
   */
  void resize(AgeBandMatrixPtrVector* value);
  /**
   * \brief This will delete an entry from the vector
   * \param pos is the element of the vector to be deleted
   * \note This will free the memory allocated to the deleted element of the vector
   */
  void Delete(int pos);
  /**
   * \brief This will return the number of columns in row i of the vector
   * \param i is the row of the vector to have the number of columns counted
   * \return the number of columns in row i of the vector
   * \note This is the number of entries in the AgeBandMatrixPtrVector that is entry i of the AgeBandMatrixPtrMatrix
   */
  int Ncol(int i = 0) const { return v[i]->Size(); };
  /**
   * \brief This will return the number of rows of the vector
   * \return the number of rows of the vector
   */
  int Nrow() const { return nrow; };
  /**
   * \brief This will return the value of an element of the vector
   * \param pos is the element of the vector to be returned
   * \return the value of the specified element
   */
  AgeBandMatrixPtrVector*& operator [] (int pos) { return v[pos]; };
  /**
   * \brief This will return the value of an element of the vector
   * \param pos is the element of the vector to be returned
   * \return the value of the specified element
   */
  AgeBandMatrixPtrVector* const& operator [] (int pos) const { return v[pos]; };
protected:
  /**
   * \brief This is number of rows of the vector
   */
  int nrow;
  /**
   * \brief This is the vector of AgeBandMatrixPtrVector values
   */
  AgeBandMatrixPtrVector** v;
};

#endif

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

Powered By FusionForge