Lines Matching refs:Matrix
1 //===------ Math.h - PBQP Vector and Matrix classes -------------*- C++ -*-===//
111 /// \brief PBQP Matrix class
112 class Matrix {
115 /// \brief Construct a PBQP Matrix with the given dimensions.
116 Matrix(unsigned rows, unsigned cols) :
120 /// \brief Construct a PBQP Matrix with the given dimensions and initial
122 Matrix(unsigned rows, unsigned cols, PBQPNum initVal) :
128 Matrix(const Matrix &m) :
134 ~Matrix() { delete[] data; }
137 Matrix& operator=(const Matrix &m) {
151 /// \brief Matrix element access.
157 /// \brief Matrix element access.
180 Matrix& reset(PBQPNum val = 0) {
186 Matrix& setRow(unsigned r, PBQPNum val) {
193 Matrix& setCol(unsigned c, PBQPNum val) {
200 /// \brief Matrix transpose.
201 Matrix transpose() const {
202 Matrix m(cols, rows);
211 /// Matrix must be square.
222 Matrix& operator+=(const Matrix &m) {
224 "Matrix dimensions mismatch.");
245 Matrix& subFromRow(unsigned r, PBQPNum val) {
254 Matrix& subFromCol(unsigned c, PBQPNum val) {
275 OStream& operator<<(OStream &os, const Matrix &m) {