24 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
38 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
44 IntStarStar& IntStarStar::operator=(
const IntStarStar& y)
55 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
64 std::vector<int> old_data;
66 if (
m_nrows > 0 && m_ncols > 0) {
74 if (n >=
m_nrows && m >= m_ncols) {
75 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
76 for (
size_t irow = 0; irow <
m_nrows; irow++) {
77 m_data[jcol*m + irow] = old_data[jcol*m_ncols + irow];
79 for (
size_t irow = m_nrows; irow < n; irow++) {
83 for (
size_t jcol = m_ncols; jcol < m; jcol++) {
84 for (
size_t irow = 0; irow < n; irow++) {
90 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
91 for (
size_t irow = 0; irow <
m_nrows; irow++) {
92 m_data[jcol*m + irow] = old_data[jcol*m_ncols + irow];
100 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
size_t m_ncols
number of columns
Header file for class IntStarStar.
std::vector< int > m_data
Storage area for the matrix, layed out in Fortran style, row-inner, column outer format.
int * operator[](size_t jcol)
Pointer to the top of the column.
void resize(size_t mcol, size_t nrow, int v=0)
Resize the array, and fill the new entries with 'v'.
size_t nRows() const
Number of rows.
size_t m_nrows
number of rows
A class for 2D int arrays stored in column-major (Fortran-compatible) form.
size_t nColumns() const
Number of columns.
std::vector< int * > m_colAddr
Vector of column addresses.
int *const * baseDataAddr()
Returns a int** pointer to the base address.
IntStarStar()
Default constructor. Create an empty array.