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

Annotation of /trunk/gadget/doublematrixptrvector.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef doublematrixptrvector_h
2 :     #define doublematrixptrvector_h
3 :    
4 :     class DoubleMatrix;
5 :    
6 :     /**
7 :     * \class DoubleMatrixPtrVector
8 :     * \brief This class implements a dynamic vector of DoubleMatrix values
9 :     */
10 :     class DoubleMatrixPtrVector {
11 :     public:
12 :     /**
13 :     * \brief This is the default DoubleMatrixPtrVector constructor
14 :     */
15 :     DoubleMatrixPtrVector() { size = 0; v = 0; };
16 :     /**
17 :     * \brief This is the DoubleMatrixPtrVector constructor for a specified size
18 :     * \param sz is the size of the vector to be created
19 :     * \note The elements of the vector will all be created, and set to zero
20 :     */
21 :     DoubleMatrixPtrVector(int sz);
22 :     /**
23 :     * \brief This is the DoubleMatrixPtrVector constructor that creates a copy of an existing DoubleMatrixPtrVector
24 :     * \param initial is the DoubleMatrixPtrVector to copy
25 :     */
26 :     DoubleMatrixPtrVector(const DoubleMatrixPtrVector& initial);
27 :     /**
28 :     * \brief This is the DoubleMatrixPtrVector destructor
29 :     * \note This will free all the memory allocated to all the elements of the vector
30 :     */
31 :     ~DoubleMatrixPtrVector();
32 :     /**
33 :     * \brief This will add new blank (ie. NULL) entries to the vector
34 :     * \param addsize is the number of blank entries that will be entered
35 :     */
36 :     void resizeBlank(int addsize);
37 :     /**
38 :     * \brief This will add one new entry to the vector
39 :     * \param value is the value that will be entered for the new entry
40 :     */
41 :     void resize(DoubleMatrix* value);
42 :     /**
43 :     * \brief This will delete an entry from the vector
44 :     * \param pos is the element of the vector to be deleted
45 :     * \note This will free the memory allocated to the deleted element of the vector
46 :     */
47 :     void Delete(int pos);
48 :     /**
49 :     * \brief This will return the size of the vector
50 :     * \return the size of the vector
51 :     */
52 :     int Size() const { return size; };
53 :     /**
54 :     * \brief This will return the value of an element of the vector
55 :     * \param pos is the element of the vector to be returned
56 :     * \return the value of the specified element
57 :     */
58 :     DoubleMatrix*& operator [] (int pos) { return v[pos]; };
59 :     /**
60 :     * \brief This will return the value of an element of the vector
61 :     * \param pos is the element of the vector to be returned
62 :     * \return the value of the specified element
63 :     */
64 :     DoubleMatrix* const& operator [] (int pos) const { return v[pos]; };
65 :     protected:
66 :     /**
67 :     * \brief This is the vector of DoubleMatrix values
68 :     */
69 :     DoubleMatrix** v;
70 :     /**
71 :     * \brief This is the size of the vector
72 :     */
73 :     int size;
74 :     };
75 :    
76 :     #endif

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

Powered By FusionForge