Gadget
Public Member Functions | Protected Attributes | List of all members
DoubleMatrixPtrVector Class Reference

This class implements a dynamic vector of DoubleMatrix values. More...

#include <doublematrixptrvector.h>

Collaboration diagram for DoubleMatrixPtrVector:
Collaboration graph

Public Member Functions

 DoubleMatrixPtrVector ()
 This is the default DoubleMatrixPtrVector constructor. More...
 
 DoubleMatrixPtrVector (int sz)
 This is the DoubleMatrixPtrVector constructor for a specified size. More...
 
 DoubleMatrixPtrVector (const DoubleMatrixPtrVector &initial)
 This is the DoubleMatrixPtrVector constructor that creates a copy of an existing DoubleMatrixPtrVector. More...
 
 ~DoubleMatrixPtrVector ()
 This is the DoubleMatrixPtrVector destructor. More...
 
void resizeBlank (int addsize)
 This will add new blank (ie. NULL) entries to the vector. More...
 
void resize (DoubleMatrix *value)
 This will add one new entry to the vector. More...
 
void Delete (int pos)
 This will delete an entry from the vector. More...
 
int Size () const
 This will return the size of the vector. More...
 
DoubleMatrix *& operator[] (int pos)
 This will return the value of an element of the vector. More...
 
DoubleMatrix *const & operator[] (int pos) const
 This will return the value of an element of the vector. More...
 

Protected Attributes

DoubleMatrix ** v
 This is the vector of DoubleMatrix values. More...
 
int size
 This is the size of the vector. More...
 

Detailed Description

This class implements a dynamic vector of DoubleMatrix values.

Constructor & Destructor Documentation

◆ DoubleMatrixPtrVector() [1/3]

DoubleMatrixPtrVector::DoubleMatrixPtrVector ( )
inline

This is the default DoubleMatrixPtrVector constructor.

◆ DoubleMatrixPtrVector() [2/3]

DoubleMatrixPtrVector::DoubleMatrixPtrVector ( int  sz)

This is the DoubleMatrixPtrVector constructor for a specified size.

Parameters
szis the size of the vector to be created
Note
The elements of the vector will all be created, and set to zero

◆ DoubleMatrixPtrVector() [3/3]

DoubleMatrixPtrVector::DoubleMatrixPtrVector ( const DoubleMatrixPtrVector initial)

This is the DoubleMatrixPtrVector constructor that creates a copy of an existing DoubleMatrixPtrVector.

Parameters
initialis the DoubleMatrixPtrVector to copy

◆ ~DoubleMatrixPtrVector()

DoubleMatrixPtrVector::~DoubleMatrixPtrVector ( )

This is the DoubleMatrixPtrVector destructor.

Note
This will free all the memory allocated to all the elements of the vector

Member Function Documentation

◆ Delete()

void DoubleMatrixPtrVector::Delete ( int  pos)

This will delete an entry from the vector.

Parameters
posis the element of the vector to be deleted
Note
This will free the memory allocated to the deleted element of the vector

◆ operator[]() [1/2]

DoubleMatrix*& DoubleMatrixPtrVector::operator[] ( int  pos)
inline

This will return the value of an element of the vector.

Parameters
posis the element of the vector to be returned
Returns
the value of the specified element

◆ operator[]() [2/2]

DoubleMatrix* const& DoubleMatrixPtrVector::operator[] ( int  pos) const
inline

This will return the value of an element of the vector.

Parameters
posis the element of the vector to be returned
Returns
the value of the specified element

◆ resize()

void DoubleMatrixPtrVector::resize ( DoubleMatrix value)

This will add one new entry to the vector.

Parameters
valueis the value that will be entered for the new entry

◆ resizeBlank()

void DoubleMatrixPtrVector::resizeBlank ( int  addsize)

This will add new blank (ie. NULL) entries to the vector.

Parameters
addsizeis the number of blank entries that will be entered

◆ Size()

int DoubleMatrixPtrVector::Size ( ) const
inline

This will return the size of the vector.

Returns
the size of the vector

Member Data Documentation

◆ size

int DoubleMatrixPtrVector::size
protected

This is the size of the vector.

◆ v

DoubleMatrix** DoubleMatrixPtrVector::v
protected

This is the vector of DoubleMatrix values.


The documentation for this class was generated from the following files: