LLVM API Documentation
#include <PBQP.h>
Public Member Functions | |
| PBQPMatrix (unsigned rows, unsigned cols) | |
| Construct a PBQP Matrix with the given dimensions. | |
| PBQPMatrix (const PBQPMatrix &m) | |
| Copy construct a PBQP matrix. | |
| ~PBQPMatrix () | |
| PBQPMatrix & | operator= (const PBQPMatrix &m) |
| Assignment operator. | |
| unsigned | getRows () const throw () |
| Return the number of rows in this matrix. | |
| unsigned | getCols () const throw () |
| Return the number of cols in this matrix. | |
| PBQPNum * | operator[] (unsigned r) |
| Matrix element access. | |
| const PBQPNum * | operator[] (unsigned r) const |
| Matrix element access. | |
| PBQPVector | getRowAsVector (unsigned r) const |
| Returns the given row as a vector. | |
| PBQPMatrix & | reset (PBQPNum val=0) |
| Reset the matrix to the given value. | |
| PBQPMatrix & | setRow (unsigned r, PBQPNum val) |
| Set a single row of this matrix to the given value. | |
| PBQPMatrix & | setCol (unsigned c, PBQPNum val) |
| Set a single column of this matrix to the given value. | |
| PBQPMatrix | transpose () const |
| Matrix transpose. | |
| PBQPVector | diagonalize () const |
| Returns the diagonal of the matrix as a vector. | |
| PBQPMatrix & | operator+= (const PBQPMatrix &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. | |
| PBQPMatrix & | subFromRow (unsigned r, PBQPNum val) |
| Subtracts the given scalar from the elements of the given row. | |
| PBQPMatrix & | 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 102 of file PBQP.h.
| llvm::PBQPMatrix::PBQPMatrix | ( | const PBQPMatrix & | m | ) | [inline] |
| PBQPMatrix& llvm::PBQPMatrix::operator= | ( | const PBQPMatrix & | m | ) | [inline] |
| unsigned llvm::PBQPMatrix::getRows | ( | ) | const throw () [inline] |
Return the number of rows in this matrix.
Definition at line 129 of file PBQP.h.
Referenced by llvm::check_pbqp(), and llvm::normalize_matrix().
| unsigned llvm::PBQPMatrix::getCols | ( | ) | const throw () [inline] |
Return the number of cols in this matrix.
Definition at line 132 of file PBQP.h.
Referenced by llvm::check_pbqp(), and llvm::normalize_matrix().
| PBQPVector llvm::PBQPMatrix::getRowAsVector | ( | unsigned | r | ) | const [inline] |
Returns the given row as a vector.
Definition at line 147 of file PBQP.h.
References c.
Referenced by llvm::determine_solution(), and llvm::disconnect_trivialnode().
| PBQPMatrix& llvm::PBQPMatrix::reset | ( | PBQPNum | val = 0 |
) | [inline] |
| PBQPMatrix& llvm::PBQPMatrix::setRow | ( | unsigned | r, | |
| PBQPNum | val | |||
| ) | [inline] |
Set a single row of this matrix to the given value.
Definition at line 161 of file PBQP.h.
Referenced by llvm::normalize_matrix().
| PBQPMatrix& llvm::PBQPMatrix::setCol | ( | unsigned | c, | |
| PBQPNum | val | |||
| ) | [inline] |
Set a single column of this matrix to the given value.
Definition at line 168 of file PBQP.h.
Referenced by llvm::normalize_matrix().
| PBQPMatrix llvm::PBQPMatrix::transpose | ( | ) | const [inline] |
Matrix transpose.
Definition at line 176 of file PBQP.h.
References c.
Referenced by llvm::add_pbqp_edgecosts(), and llvm::pbqp_get_costmatrix().
| PBQPVector llvm::PBQPMatrix::diagonalize | ( | ) | const [inline] |
Returns the diagonal of the matrix as a vector.
Matrix must be square.
Definition at line 187 of file PBQP.h.
Referenced by llvm::add_pbqp_edgecosts().
| PBQPMatrix& llvm::PBQPMatrix::operator+= | ( | const PBQPMatrix & | m | ) | [inline] |
Returns the minimum of the given row.
Definition at line 206 of file PBQP.h.
Referenced by llvm::normalize_matrix().
Returns the minimum of the given column.
Definition at line 212 of file PBQP.h.
Referenced by llvm::normalize_matrix().
| PBQPMatrix& llvm::PBQPMatrix::subFromRow | ( | unsigned | r, | |
| PBQPNum | val | |||
| ) | [inline] |
Subtracts the given scalar from the elements of the given row.
Definition at line 220 of file PBQP.h.
Referenced by llvm::normalize_matrix().
| PBQPMatrix& llvm::PBQPMatrix::subFromCol | ( | unsigned | c, | |
| PBQPNum | val | |||
| ) | [inline] |
Subtracts the given scalar from the elements of the given column.
Definition at line 229 of file PBQP.h.
Referenced by llvm::normalize_matrix().
| bool llvm::PBQPMatrix::isZero | ( | ) | const [inline] |
Returns true if this is a zero matrix.
Definition at line 236 of file PBQP.h.
Referenced by llvm::normalize_matrix().