1 /* 2 *_________________________________________________________________________* 3 * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * 4 * DESCRIPTION: SEE READ-ME * 5 * FILE NAME: rowmatrix.h * 6 * AUTHORS: See Author List * 7 * GRANTS: See Grants List * 8 * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * 9 * LICENSE: Please see License Agreement * 10 * DOWNLOAD: Free at www.rpi.edu/~anderk5 * 11 * ADMINISTRATOR: Prof. Kurt Anderson * 12 * Computational Dynamics Lab * 13 * Rensselaer Polytechnic Institute * 14 * 110 8th St. Troy NY 12180 * 15 * CONTACT: anderk5@rpi.edu * 16 *_________________________________________________________________________*/ 17 18 19 #ifndef ROWMATRIX_H 20 #define ROWMATRIX_H 21 22 #include "virtualrowmatrix.h" 23 24 class RowMatrix : public VirtualRowMatrix { 25 double* elements; 26 public: 27 RowMatrix(); 28 ~RowMatrix(); 29 RowMatrix(const RowMatrix& A); // copy constructor 30 RowMatrix(const VirtualRowMatrix& A); // copy constructor 31 RowMatrix(const VirtualMatrix& A); // copy constructor 32 RowMatrix(int n); // size constructor 33 34 void Const(double value); 35 double& operator_1int (int i); // array access 36 double Get_1int(int i) const; 37 void Set_1int(int i, double value); 38 double BasicGet_1int(int i) const; 39 void BasicSet_1int(int i, double value); 40 void BasicIncrement_1int(int i, double value); 41 void Dim(int n); 42 MatrixType GetType() const; 43 std::istream& ReadData(std::istream& c); 44 std::ostream& WriteData(std::ostream& c) const; 45 46 void AssignVM(const VirtualMatrix& A); 47 RowMatrix& operator=(const RowMatrix& A); // assignment operator 48 RowMatrix& operator=(const VirtualRowMatrix& A); // overloaded = 49 RowMatrix& operator=(const VirtualMatrix& A); // overloaded = 50 RowMatrix& operator*=(double b); 51 }; 52 53 #endif 54