LLVM API Documentation

llvm::PBQPMatrix Class Reference

PBQP Matrix class. More...

#include <PBQP.h>

Collaboration diagram for llvm::PBQPMatrix:
[legend]

List of all members.

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.


Detailed Description

PBQP Matrix class.

Definition at line 102 of file PBQP.h.


Constructor & Destructor Documentation

llvm::PBQPMatrix::PBQPMatrix ( unsigned  rows,
unsigned  cols 
) [inline]

Construct a PBQP Matrix with the given dimensions.

Definition at line 106 of file PBQP.h.

llvm::PBQPMatrix::PBQPMatrix ( const PBQPMatrix &  m  )  [inline]

Copy construct a PBQP matrix.

Definition at line 112 of file PBQP.h.

References data.

llvm::PBQPMatrix::~PBQPMatrix (  )  [inline]

Definition at line 117 of file PBQP.h.


Member Function Documentation

PBQPMatrix& llvm::PBQPMatrix::operator= ( const PBQPMatrix &  m  )  [inline]

Assignment operator.

Definition at line 120 of file PBQP.h.

References cols, data, and rows.

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().

PBQPNum* llvm::PBQPMatrix::operator[] ( unsigned  r  )  [inline]

Matrix element access.

Definition at line 135 of file PBQP.h.

const PBQPNum* llvm::PBQPMatrix::operator[] ( unsigned  r  )  const [inline]

Matrix element access.

Definition at line 141 of file PBQP.h.

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]

Reset the matrix to the given value.

Definition at line 155 of file PBQP.h.

References val.

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]

Add the given matrix to this one.

Definition at line 197 of file PBQP.h.

References cols, data, and rows.

PBQPNum llvm::PBQPMatrix::getRowMin ( unsigned  r  )  const [inline]

Returns the minimum of the given row.

Definition at line 206 of file PBQP.h.

Referenced by llvm::normalize_matrix().

PBQPNum llvm::PBQPMatrix::getColMin ( unsigned  c  )  const [inline]

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().


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