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

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

#include <agebandmatrixptrvector.h>

Collaboration diagram for AgeBandMatrixPtrVector:
Collaboration graph

Public Member Functions

 AgeBandMatrixPtrVector ()
 This is the default AgeBandMatrixPtrVector constructor. More...
 
 AgeBandMatrixPtrVector (int sz)
 This is the AgeBandMatrixPtrVector constructor for a specified size. More...
 
 AgeBandMatrixPtrVector (int sz, int minage, const IntVector &minl, const IntVector &lsize)
 This is the AgeBandMatrixPtrVector constructor for a specified size with an initial value specified by the minimum age and length of the new AgeBandMatrix created. More...
 
 AgeBandMatrixPtrVector (const AgeBandMatrixPtrVector &initial)
 This is the AgeBandMatrixPtrVector constructor that creates a copy of an existing AgeBandMatrixPtrVector. More...
 
 ~AgeBandMatrixPtrVector ()
 This is the AgeBandMatrixPtrVector destructor. More...
 
void resize (int add, AgeBandMatrix *value)
 This will add new entries to the vector. More...
 
void resize (int add)
 This will add new empty entries to the vector. More...
 
void resize (int add, int minage, const IntVector &minl, const IntVector &lsize)
 This will add new entries to the vector and create new AgeBandMatrix initial values. More...
 
void resize (int add, int minage, int minl, const PopInfoMatrix &matr)
 This will add new entries to the vector and create new AgeBandMatrix initial values. 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...
 
AgeBandMatrixoperator[] (int pos)
 This will return the value of an element of the vector. More...
 
const AgeBandMatrixoperator[] (int pos) const
 This will return the value of an element of the vector. More...
 
void Migrate (const DoubleMatrix &MI, PopInfoVector &tmp)
 This function will implement the migration of entries from one AgeBandMatrix to another within the vector of values. More...
 

Protected Attributes

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

Detailed Description

This class implements a dynamic vector of AgeBandMatrix values.

Constructor & Destructor Documentation

◆ AgeBandMatrixPtrVector() [1/4]

AgeBandMatrixPtrVector::AgeBandMatrixPtrVector ( )
inline

This is the default AgeBandMatrixPtrVector constructor.

◆ AgeBandMatrixPtrVector() [2/4]

AgeBandMatrixPtrVector::AgeBandMatrixPtrVector ( int  sz)

This is the AgeBandMatrixPtrVector 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

◆ AgeBandMatrixPtrVector() [3/4]

AgeBandMatrixPtrVector::AgeBandMatrixPtrVector ( int  sz,
int  minage,
const IntVector minl,
const IntVector lsize 
)

This is the AgeBandMatrixPtrVector constructor for a specified size with an initial value specified by the minimum age and length of the new AgeBandMatrix created.

Parameters
szis the size of the vector to be created
minageis the minimum age of the AgeBandMatrix to be created
minlis the IntVector of minimum lengths of the AgeBandMatrix to be created
lsizeis the IntVector of sizes of the AgeBandMatrix to be created

◆ AgeBandMatrixPtrVector() [4/4]

AgeBandMatrixPtrVector::AgeBandMatrixPtrVector ( const AgeBandMatrixPtrVector initial)

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

Parameters
initialis the AgeBandMatrixPtrVector to copy

◆ ~AgeBandMatrixPtrVector()

AgeBandMatrixPtrVector::~AgeBandMatrixPtrVector ( )

This is the AgeBandMatrixPtrVector destructor.

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

Member Function Documentation

◆ Delete()

void AgeBandMatrixPtrVector::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

◆ Migrate()

void AgeBandMatrixPtrVector::Migrate ( const DoubleMatrix MI,
PopInfoVector tmp 
)

This function will implement the migration of entries from one AgeBandMatrix to another within the vector of values.

Parameters
MIis the DoubleMatrix describing the migration
tmpis the PopInfoVector used to temporarily store the population during migration

◆ operator[]() [1/2]

AgeBandMatrix& AgeBandMatrixPtrVector::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]

const AgeBandMatrix& AgeBandMatrixPtrVector::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() [1/4]

void AgeBandMatrixPtrVector::resize ( int  add)

This will add new empty entries to the vector.

Parameters
addis the number of new entries to the vector
Note
The new elements of the vector will be created, and set to zero

◆ resize() [2/4]

void AgeBandMatrixPtrVector::resize ( int  add,
AgeBandMatrix value 
)

This will add new entries to the vector.

Parameters
addis the number of new entries to the vector
valueis the value that will be entered for the new entries

◆ resize() [3/4]

void AgeBandMatrixPtrVector::resize ( int  add,
int  minage,
const IntVector minl,
const IntVector lsize 
)

This will add new entries to the vector and create new AgeBandMatrix initial values.

Parameters
addis the number of new entries to the vector
minageis the minimum age of the AgeBandMatrix to be created
minlis the IntVector of minimum lengths of the AgeBandMatrix to be created
lsizeis the IntVector of sizes of the AgeBandMatrix to be created

◆ resize() [4/4]

void AgeBandMatrixPtrVector::resize ( int  add,
int  minage,
int  minl,
const PopInfoMatrix matr 
)

This will add new entries to the vector and create new AgeBandMatrix initial values.

Parameters
addis the number of new entries to the vector
minageis the minimum age of the AgeBandMatrix to be created
minlis the minimum length of the AgeBandMatrix to be created
matris the PopInfoMatrix that the initial values are to be copied from

◆ Size()

int AgeBandMatrixPtrVector::Size ( ) const
inline

This will return the size of the vector.

Returns
the size of the vector

Member Data Documentation

◆ size

int AgeBandMatrixPtrVector::size
protected

This is the size of the vector.

◆ v

AgeBandMatrix** AgeBandMatrixPtrVector::v
protected

This is the vector of AgeBandMatrix values.


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