// marMatrix.cpp: implementation of the marMatrix class. // ////////////////////////////////////////////////////////////////////// #include "marMatrix.h" #include ////////////////////////////////////////////////////////////////////// // Construction ////////////////////////////////////////////////////////////////////// marMatrix::marMatrix(size_t size1, size_t size2) :shallowCopy(false) { _size1=size1; _size2=size2; _data=new double[_size1*_size2]; } marMatrix::marMatrix(double *data, size_t size1, size_t size2) :shallowCopy(true) { if (size1==0 || size2==0) { assert(false); } else { _size1=size1; _size2=size2; _data=data; // PS -> size_t iMax=_size1*_size2; // PS -> _data=new double[iMax]; // PS -> // PS -> for (int i=0;i { // PS -> _data[i]=data[i]; // PS -> } } } marMatrix::marMatrix(const marMatrix &m) :shallowCopy(false) { if (m._size1==0 || m._size2==0) { assert(false); } else { _size1=m._size1; _size2=m._size2; size_t iMax=_size1*_size2; _data=new double[iMax]; int i; for (i=0;i