Lines Matching refs:cols
116 Matrix(unsigned rows, unsigned cols) : in Matrix() argument
117 rows(rows), cols(cols), data(new PBQPNum[rows * cols]) { in Matrix()
122 Matrix(unsigned rows, unsigned cols, PBQPNum initVal) : in Matrix() argument
123 rows(rows), cols(cols), data(new PBQPNum[rows * cols]) { in Matrix()
124 std::fill(data, data + (rows * cols), initVal); in Matrix()
129 rows(m.rows), cols(m.cols), data(new PBQPNum[rows * cols]) { in Matrix()
130 std::copy(m.data, m.data + (rows * cols), data); in Matrix()
139 rows = m.rows; cols = m.cols;
140 data = new PBQPNum[rows * cols];
141 std::copy(m.data, m.data + (rows * cols), data);
149 unsigned getCols() const { return cols; } in getCols()
154 return data + (r * cols);
160 return data + (r * cols);
165 Vector v(cols); in getRowAsVector()
166 for (unsigned c = 0; c < cols; ++c) in getRowAsVector()
181 std::fill(data, data + (rows * cols), val);
188 std::fill(data + (r * cols), data + ((r + 1) * cols), val); in setRow()
194 assert(c < cols && "Column out of bounds."); in setCol()
202 Matrix m(cols, rows); in transpose()
204 for (unsigned c = 0; c < cols; ++c) in transpose()
213 assert(rows == cols && "Attempt to diagonalize non-square matrix."); in diagonalize()
223 assert(rows == m.rows && cols == m.cols &&
225 std::transform(data, data + (rows * cols), m.data, data,
233 return *std::min_element(data + (r * cols), data + ((r + 1) * cols)); in getRowMin()
247 std::transform(data + (r * cols), data + ((r + 1) * cols), in subFromRow()
248 data + (r * cols), in subFromRow()
262 return find_if(data, data + (rows * cols), in isZero()
264 data + (rows * cols); in isZero()
268 unsigned rows, cols;