16 CoefAccess() : patternID_(-1), numRowIDs_(0), rowIDs_(NULL),
17 numColIDsPerRow_(0), colIDs_(NULL), numRowCoefs_(0), numColCoefs_(0),
20 CoefAccess(
const CoefAccess& src)
25 CoefAccess& operator=(
const CoefAccess& src)
27 patternID_ = src.patternID_;
29 numRowIDs_ = src.numRowIDs_;
30 numColIDsPerRow_ = src.numColIDsPerRow_;
31 numRowCoefs_ = src.numRowCoefs_;
32 numColCoefs_ = src.numColCoefs_;
35 rowIDs_ =
new GlobalID[numRowIDs_];
36 for(
int i=0; i<numRowIDs_; i++) rowIDs_[i] = src.rowIDs_[i];
39 if (numColIDsPerRow_ > 0 && numRowIDs_ > 0) {
40 int len = numRowIDs_*numColIDsPerRow_;
41 colIDs_ =
new GlobalID[len];
42 for(
int i=0; i<len; i++) colIDs_[i] = src.colIDs_[i];
45 if (numRowCoefs_ > 0 && numColCoefs_ > 0) {
46 int len = numRowCoefs_*numColCoefs_;
47 coefs_ =
new double[len];
48 for(
int i=0; i<len; i++) coefs_[i] = src.coefs_[i];
56 delete [] rowIDs_;
delete [] colIDs_;
delete [] coefs_;
57 numRowIDs_ = 0; numColIDsPerRow_ = 0; numRowCoefs_ = 0; numColCoefs_ = 0;
74 #endif // _CoefAccess_h_