LLVM API Documentation
#include <Math.h>
Public Member Functions | |
| Matrix (unsigned rows, unsigned cols) | |
| Construct a PBQP Matrix with the given dimensions. More... | |
| Matrix (unsigned rows, unsigned cols, PBQPNum initVal) | |
| Construct a PBQP Matrix with the given dimensions and initial value. More... | |
| Matrix (const Matrix &m) | |
| Copy construct a PBQP matrix. More... | |
| ~Matrix () | |
| Destroy this matrix, return its memory. More... | |
| Matrix & | operator= (const Matrix &m) |
| Assignment operator. More... | |
| unsigned | getRows () const |
| Return the number of rows in this matrix. More... | |
| unsigned | getCols () const |
| Return the number of cols in this matrix. More... | |
| PBQPNum * | operator[] (unsigned r) |
| Matrix element access. More... | |
| const PBQPNum * | operator[] (unsigned r) const |
| Matrix element access. More... | |
| Vector | getRowAsVector (unsigned r) const |
| Returns the given row as a vector. More... | |
| Vector | getColAsVector (unsigned c) const |
| Returns the given column as a vector. More... | |
| Matrix & | reset (PBQPNum val=0) |
| Reset the matrix to the given value. More... | |
| Matrix & | setRow (unsigned r, PBQPNum val) |
| Set a single row of this matrix to the given value. More... | |
| Matrix & | setCol (unsigned c, PBQPNum val) |
| Set a single column of this matrix to the given value. More... | |
| Matrix | transpose () const |
| Matrix transpose. More... | |
| Vector | diagonalize () const |
| Returns the diagonal of the matrix as a vector. More... | |
| Matrix & | operator+= (const Matrix &m) |
| Add the given matrix to this one. More... | |
| PBQPNum | getRowMin (unsigned r) const |
| Returns the minimum of the given row. More... | |
| PBQPNum | getColMin (unsigned c) const |
| Returns the minimum of the given column. More... | |
| Matrix & | subFromRow (unsigned r, PBQPNum val) |
| Subtracts the given scalar from the elements of the given row. More... | |
| Matrix & | subFromCol (unsigned c, PBQPNum val) |
| Subtracts the given scalar from the elements of the given column. More... | |
| bool | isZero () const |
| Returns true if this is a zero matrix. More... | |
|
inline |
|
inline |
|
inline |
|
inline |
Return the number of cols in this matrix.
Definition at line 149 of file Math.h.
Referenced by PBQP::Graph::addEdge(), and PBQP::Graph::dump().
Returns the given row as a vector.
Definition at line 164 of file Math.h.
Referenced by PBQP::operator<<(), and PBQP::Graph::printDot().
|
inline |
Return the number of rows in this matrix.
Definition at line 146 of file Math.h.
Referenced by PBQP::Graph::addEdge(), PBQP::HeuristicSolverImpl< PBQP::Heuristics::Briggs >::applyR2(), PBQP::Graph::dump(), PBQP::operator<<(), and PBQP::Graph::printDot().
|
inline |
|
inline |
Matrix transpose.
Definition at line 201 of file Math.h.
Referenced by PBQP::HeuristicSolverImpl< PBQP::Heuristics::Briggs >::applyR2().