J
jr.freester
I've written a Matrix container class and overloaded the function call
operator to return values at a specified index.
Below is the member function
double operator()(int a , int b)
{
cerr << "Invalid index for Matrix" <<endl;
}
return this->data[(a-1)*this->col + (b-1)];
}
It is invoked
int row, col;
double d;
Matrix M;
d = M(row,col);
My question is thus, can I accomplish the reverse task of assigning a
double d to a Matrix M at power row,col ie.
M(row,col) = d;
Justin
operator to return values at a specified index.
Below is the member function
double operator()(int a , int b)
{
{if((a said:col))
cerr << "Invalid index for Matrix" <<endl;
}
return this->data[(a-1)*this->col + (b-1)];
}
It is invoked
int row, col;
double d;
Matrix M;
d = M(row,col);
My question is thus, can I accomplish the reverse task of assigning a
double d to a Matrix M at power row,col ie.
M(row,col) = d;
Justin