--- trunk/src/math/DynamicRectMatrix.hpp 2009/11/25 20:02:06 1390 +++ branches/development/src/math/DynamicRectMatrix.hpp 2012/10/22 20:42:10 1808 @@ -36,7 +36,8 @@ * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). - * [4] Vardeman & Gezelter, in progress (2009). + * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). + * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ /** @@ -232,7 +233,7 @@ namespace OpenMD { /** * Tests if this matrix is identical to matrix m * @return true if this matrix is equal to the matrix m, return false otherwise - * @m matrix to be compared + * @param m matrix to be compared * * @todo replace operator == by template function equal */ @@ -249,7 +250,7 @@ namespace OpenMD { /** * Tests if this matrix is not equal to matrix m * @return true if this matrix is not equal to the matrix m, return false otherwise - * @m matrix to be compared + * @param m matrix to be compared */ bool operator !=(const DynamicRectMatrix m) { return !(*this == m); @@ -439,19 +440,19 @@ namespace OpenMD { unsigned int nrow_; unsigned int ncol_; private: - void allocate(int nrow, int ncol) { - nrow_ = nrow; - ncol_ = ncol; - data_ = new Real*[nrow_]; - for (int i = 0; i < nrow_; ++i) - data_[i] = new Real[ncol_]; + void allocate( int nrow, int ncol ) { + nrow_ = (unsigned int) nrow; + ncol_ = (unsigned int) ncol; + data_ = new Real*[nrow_]; + for (unsigned int i = 0; i < nrow_; ++i) + data_[i] = new Real[ncol_]; } - + void deallocate() { - for (int i = 0; i < nrow_; ++i) + for (unsigned int i = 0; i < nrow_; ++i) delete data_[i]; delete []data_; - + nrow_ = 0; ncol_ = 0; data_ = NULL;