This class implements a dynamic vector of IntVector values.
More...
#include <intmatrix.h>
This class implements a dynamic vector of IntVector values.
◆ IntMatrix() [1/3]
◆ IntMatrix() [2/3]
IntMatrix::IntMatrix |
( |
int |
nr, |
|
|
int |
nc, |
|
|
int |
initial |
|
) |
| |
This is the IntMatrix constructor for a specified size.
- Parameters
-
nr | is the size of the vector to be created |
nc | is the length of each row to be created (ie. the size of the IntVector to be created for each row) |
initial | is the initial value for all the entries of the vector |
◆ IntMatrix() [3/3]
IntMatrix::IntMatrix |
( |
const IntMatrix & |
initial | ) |
|
This is the IntMatrix constructor that creates a copy of an existing IntMatrix.
- Parameters
-
◆ ~IntMatrix()
IntMatrix::~IntMatrix |
( |
| ) |
|
This is the IntMatrix destructor.
- Note
- This will free all the memory allocated to all the elements of the vector
◆ AddRows()
void IntMatrix::AddRows |
( |
int |
add, |
|
|
int |
length, |
|
|
int |
value |
|
) |
| |
This will add new entries to the vector.
- Parameters
-
add | is the number of new entries to the vector |
length | is the number of entries to the IntVector that is created |
value | is the value that will be entered for the new entries |
◆ Delete()
void IntMatrix::Delete |
( |
int |
pos | ) |
|
This will delete an entry from the vector.
- Parameters
-
pos | is the element of the vector to be deleted |
- Note
- This will free the memory allocated to the deleted element of the vector
◆ Ncol()
int IntMatrix::Ncol |
( |
int |
i = 0 | ) |
const |
|
inline |
This will return the number of columns in row i of the vector.
- Parameters
-
i | is the row of the vector to have the number of columns counted |
- Returns
- the number of columns in row i of the vector
- Note
- This is the number of entries in the IntVector that is entry i of the IntMatrix
◆ Nrow()
int IntMatrix::Nrow |
( |
| ) |
const |
|
inline |
This will return the number of rows of the vector.
- Returns
- the number of rows of the vector
◆ operator=()
This operator will set the vector equal to an existing IntMatrix.
- Parameters
-
◆ operator[]() [1/2]
This will return the value of an element of the vector.
- Parameters
-
pos | is the element of the vector to be returned |
- Returns
- the value of the specified element
◆ operator[]() [2/2]
const IntVector& IntMatrix::operator[] |
( |
int |
pos | ) |
const |
|
inline |
This will return the value of an element of the vector.
- Parameters
-
pos | is the element of the vector to be returned |
- Returns
- the value of the specified element
◆ Print()
void IntMatrix::Print |
( |
ofstream & |
outfile | ) |
const |
This function will print the data stored in the vector.
- Parameters
-
outfile | is the ofstream that all the model information gets sent to |
◆ Reset()
void IntMatrix::Reset |
( |
| ) |
|
This will reset the vector.
- Note
- This will delete every entry from the vector and set the number of rows to zero
◆ setToZero()
void IntMatrix::setToZero |
( |
| ) |
|
This function will set all of the entries of the vector to zero.
◆ nrow
This is number of rows of the vector.
The documentation for this class was generated from the following files: