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

Annotation of /trunk/gadget/agebandmatrixptrmatrix.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef agebandmatrixptrmatrix_h
2 :     #define agebandmatrixptrmatrix_h
3 :    
4 :     #include "agebandmatrixptrvector.h"
5 :    
6 :     /**
7 :     * \class AgeBandMatrixPtrMatrix
8 :     * \brief This class implements a dynamic vector of AgeBandMatrixPtrVector values
9 :     */
10 :     class AgeBandMatrixPtrMatrix {
11 :     public:
12 :     /**
13 :     * \brief This is the default AgeBandMatrixPtrMatrix constructor
14 :     */
15 :     AgeBandMatrixPtrMatrix() { nrow = 0; v = 0; };
16 :     /**
17 :     * \brief This is the AgeBandMatrixPtrMatrix destructor
18 :     * \note This will free all the memory allocated to all the elements of the vector
19 :     */
20 :     ~AgeBandMatrixPtrMatrix();
21 :     /**
22 :     * \brief This will add one new entry to the vector
23 :     * \param value is the value that will be entered for the new entry
24 :     */
25 :     void resize(AgeBandMatrixPtrVector* value);
26 :     /**
27 :     * \brief This will delete an entry from the vector
28 :     * \param pos is the element of the vector to be deleted
29 :     * \note This will free the memory allocated to the deleted element of the vector
30 :     */
31 :     void Delete(int pos);
32 :     /**
33 :     * \brief This will return the number of columns in row i of the vector
34 :     * \param i is the row of the vector to have the number of columns counted
35 :     * \return the number of columns in row i of the vector
36 :     * \note This is the number of entries in the AgeBandMatrixPtrVector that is entry i of the AgeBandMatrixPtrMatrix
37 :     */
38 :     int Ncol(int i = 0) const { return v[i]->Size(); };
39 :     /**
40 :     * \brief This will return the number of rows of the vector
41 :     * \return the number of rows of the vector
42 :     */
43 :     int Nrow() const { return nrow; };
44 :     /**
45 :     * \brief This will return the value of an element of the vector
46 :     * \param pos is the element of the vector to be returned
47 :     * \return the value of the specified element
48 :     */
49 :     AgeBandMatrixPtrVector*& operator [] (int pos) { return v[pos]; };
50 :     /**
51 :     * \brief This will return the value of an element of the vector
52 :     * \param pos is the element of the vector to be returned
53 :     * \return the value of the specified element
54 :     */
55 :     AgeBandMatrixPtrVector* const& operator [] (int pos) const { return v[pos]; };
56 :     protected:
57 :     /**
58 :     * \brief This is number of rows of the vector
59 :     */
60 :     int nrow;
61 :     /**
62 :     * \brief This is the vector of AgeBandMatrixPtrVector values
63 :     */
64 :     AgeBandMatrixPtrVector** v;
65 :     };
66 :    
67 :     #endif

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

Powered By FusionForge