LLVM  4.0.0
Public Member Functions | Friends | List of all members
llvm::PBQP::Matrix Class Reference

PBQP Matrix class. More...

#include <Math.h>

Inheritance diagram for llvm::PBQP::Matrix:
[legend]

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 (Matrix &&M)
 Move construct a PBQP matrix. More...
 
bool operator== (const Matrix &M) const
 Comparison 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...
 
PBQPNumoperator[] (unsigned R)
 Matrix element access. More...
 
const PBQPNumoperator[] (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 transpose () const
 Matrix transpose. More...
 
Matrixoperator+= (const Matrix &M)
 Add the given matrix to this one. More...
 
Matrix operator+ (const Matrix &M)
 

Friends

hash_code hash_value (const Matrix &)
 Return a hash_code for the given matrix. More...
 

Detailed Description

PBQP Matrix class.

Definition at line 120 of file Math.h.

Constructor & Destructor Documentation

llvm::PBQP::Matrix::Matrix ( unsigned  Rows,
unsigned  Cols 
)
inline

Construct a PBQP Matrix with the given dimensions.

Definition at line 126 of file Math.h.

llvm::PBQP::Matrix::Matrix ( unsigned  Rows,
unsigned  Cols,
PBQPNum  InitVal 
)
inline

Construct a PBQP Matrix with the given dimensions and initial value.

Definition at line 132 of file Math.h.

llvm::PBQP::Matrix::Matrix ( const Matrix M)
inline

Copy construct a PBQP matrix.

Definition at line 139 of file Math.h.

llvm::PBQP::Matrix::Matrix ( Matrix &&  M)
inline

Move construct a PBQP matrix.

Definition at line 146 of file Math.h.

Member Function Documentation

Vector llvm::PBQP::Matrix::getColAsVector ( unsigned  C) const
inline

Returns the given column as a vector.

Definition at line 195 of file Math.h.

References assert(), and C.

Referenced by llvm::PBQP::backpropagate().

unsigned llvm::PBQP::Matrix::getCols ( ) const
inline

Return the number of cols in this matrix.

Definition at line 166 of file Math.h.

References assert().

Referenced by llvm::PBQP::RegAlloc::MatrixMetadata::MatrixMetadata().

Vector llvm::PBQP::Matrix::getRowAsVector ( unsigned  R) const
inline

Returns the given row as a vector.

Definition at line 186 of file Math.h.

References assert(), and C.

Referenced by llvm::PBQP::backpropagate(), and llvm::PBQP::operator<<().

unsigned llvm::PBQP::Matrix::getRows ( ) const
inline

Return the number of rows in this matrix.

Definition at line 160 of file Math.h.

References assert().

Referenced by llvm::PBQP::applyR2(), llvm::PBQP::RegAlloc::MatrixMetadata::MatrixMetadata(), and llvm::PBQP::operator<<().

Matrix llvm::PBQP::Matrix::operator+ ( const Matrix M)
inline

Definition at line 223 of file Math.h.

References assert().

Matrix& llvm::PBQP::Matrix::operator+= ( const Matrix M)
inline

Add the given matrix to this one.

Definition at line 214 of file Math.h.

References assert(), and llvm::transform().

bool llvm::PBQP::Matrix::operator== ( const Matrix M) const
inline

Comparison operator.

Definition at line 152 of file Math.h.

References assert(), and llvm::lltok::equal.

PBQPNum* llvm::PBQP::Matrix::operator[] ( unsigned  R)
inline

Matrix element access.

Definition at line 172 of file Math.h.

References assert().

const PBQPNum* llvm::PBQP::Matrix::operator[] ( unsigned  R) const
inline

Matrix element access.

Definition at line 179 of file Math.h.

References assert().

Matrix llvm::PBQP::Matrix::transpose ( ) const
inline

Matrix transpose.

Definition at line 204 of file Math.h.

References assert().

Friends And Related Function Documentation

hash_code hash_value ( const Matrix M)
friend

Return a hash_code for the given matrix.

Definition at line 236 of file Math.h.


The documentation for this class was generated from the following file: