26 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
39 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
45 DoubleStarStar& DoubleStarStar::operator=(
const DoubleStarStar& y)
56 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
65 std::vector<double> old_data;
67 if (
m_nrows > 0 && m_ncols > 0) {
75 if (n >=
m_nrows && m >= m_ncols) {
76 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
77 for (
size_t irow = 0; irow <
m_nrows; irow++) {
78 m_data[jcol*n + irow] = old_data[jcol*m_nrows + irow];
80 for (
size_t irow = m_nrows; irow < n; irow++) {
84 for (
size_t jcol = m_ncols; jcol < m; jcol++) {
85 for (
size_t irow = 0; irow < n; irow++) {
91 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
92 for (
size_t irow = 0; irow <
m_nrows; irow++) {
93 m_data[jcol*n + irow] = old_data[jcol*m_nrows + irow];
102 for (
size_t jcol = 0; jcol <
m_ncols; jcol++) {
125 return (
double const*
const*) &(
m_colAddr[0]);
DoubleStarStar()
Default constructor. Create an empty array.
size_t nColumns() const
Number of columns.
double *const * baseDataAddr()
Returns a double** pointer to the base address.
Header file for class DoubleStarStar.
void resize(size_t mcol, size_t nrow, double v=0.0)
Resize the array, and fill the new entries with v
std::vector< double * > m_colAddr
Vector of addresses for the top of the columns.
double * operator[](size_t jcol)
Pointer to the top of the column.
size_t m_ncols
number of columns
double const *const * constBaseDataAddr() const
Returns a const double** pointer to the base address.
size_t m_nrows
number of rows
size_t nRows() const
Number of rows.
A class for 2D double arrays stored in column-major (Fortran-compatible) form.
std::vector< double > m_data
Storage area.