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