atlas  0.6
Public Member Functions | Protected Types | List of all members
atlas::matrix::Matrix< C > Class Template Reference

#include <Atlas.h>

Inheritance diagram for atlas::matrix::Matrix< C >:
Inheritance graph
[legend]
Collaboration diagram for atlas::matrix::Matrix< C >:
Collaboration graph
[legend]

Public Member Functions

 Matrix ()
 
 Matrix (const base &M)
 
 Matrix (base &&M)
 
 Matrix (size_t m, size_t n)
 
 Matrix (size_t m, size_t n, const C &c)
 
 Matrix (const std::vector< Vector< C > > &cols, size_t n_rows)
 
template<typename I >
 Matrix (I begin, I end, size_t n_rows, tags::IteratorTag)
 
 Matrix (size_t n)
 : Construct the identity matrix of size n. More...
 
Matrix transposed () const
 
Matrix negative_transposed () const
 
template<typename C1 >
Vector< C1 > operator* (const Vector< C1 > &) const
 
template<typename C1 >
Vector< C1 > right_prod (const Vector< C1 > &) const
 
template<typename C1 >
void apply_to (Vector< C1 > &v) const
 
template<typename C1 >
void right_mult (Vector< C1 > &v) const
 
Matrix operator* (const Matrix &) const
 
Matrixoperator+= (const Matrix &)
 
Matrixoperator-= (const Matrix &)
 
Matrixoperator*= (const Matrix &Q)
 
MatrixleftMult (const Matrix &P)
 
Matrixnegate ()
 
Matrixtranspose ()
 
void rowOperation (size_t, size_t, const C &)
 
void columnOperation (size_t j, size_t k, const C &c)
 
void rowMultiply (size_t i, C f)
 
void columnMultiply (size_t j, C f)
 
void swapColumns (size_t, size_t)
 Interchange columns. More...
 
void swapRows (size_t, size_t)
 Interchanges rows. More...
 
- Public Member Functions inherited from atlas::matrix::Matrix_base< C >
 Matrix_base ()
 
 Matrix_base (size_t m, size_t n)
 
 Matrix_base (size_t m, size_t n, const C &c)
 
 Matrix_base (const std::vector< Vector< C > > &, size_t n_rows)
 This constructor constructs a matrix from a list of vectors, column-wise. It is assumed that all elements of |b| (possibly none) have size |n_rows|. More...
 
template<typename I >
 Matrix_base (I begin, I end, size_t n_rows, tags::IteratorTag)
 
void swap (Matrix_base &)
 
size_t numRows () const
 
size_t numColumns () const
 
size_t rowSize () const
 
size_t columnSize () const
 
const C & operator() (size_t i, size_t j) const
 
void get_row (Vector< C > &, size_t) const
 
void get_column (Vector< C > &, size_t) const
 
Vector< C > row (size_t i) const
 
std::vector< Vector< C > > rows () const
 
Vector< C > column (size_t j) const
 
std::vector< Vector< C > > columns () const
 
bool operator== (const Matrix_base< C > &) const
 
bool operator!= (const Matrix_base< C > &m) const
 
bool is_zero () const
 
bool isEmpty () const
 
C & operator() (size_t i, size_t j)
 
void set_row (size_t, const Vector< C > &)
 Puts v in the i-th row of the matrix. More...
 
void set_column (size_t, const Vector< C > &)
 Puts v in the j-th column of the matrix. More...
 
void add_row (const Vector< C > &)
 
void add_column (const Vector< C > &)
 
void eraseColumn (size_t)
 
void eraseRow (size_t)
 
void reset ()
 

Protected Types

typedef Matrix_base< C > base
 

Additional Inherited Members

- Protected Member Functions inherited from atlas::matrix::Matrix_base< C >
const C * at (size_t i, size_t j) const
 
C * at (size_t i, size_t j)
 
- Protected Attributes inherited from atlas::matrix::Matrix_base< C >
Vector< C > d_data
 

Member Typedef Documentation

template<typename C>
typedef Matrix_base<C> atlas::matrix::Matrix< C >::base
protected

Constructor & Destructor Documentation

template<typename C>
atlas::matrix::Matrix< C >::Matrix ( )
inline
template<typename C>
atlas::matrix::Matrix< C >::Matrix ( const base M)
inline
template<typename C>
atlas::matrix::Matrix< C >::Matrix ( base &&  M)
inline
template<typename C>
atlas::matrix::Matrix< C >::Matrix ( size_t  m,
size_t  n 
)
inline
template<typename C>
atlas::matrix::Matrix< C >::Matrix ( size_t  m,
size_t  n,
const C &  c 
)
inline
template<typename C>
atlas::matrix::Matrix< C >::Matrix ( const std::vector< Vector< C > > &  cols,
size_t  n_rows 
)
inline
template<typename C>
template<typename I >
atlas::matrix::Matrix< C >::Matrix ( begin,
end,
size_t  n_rows,
tags::IteratorTag   
)
inline
template<typename C >
atlas::matrix::Matrix< C >::Matrix ( size_t  n)
explicit

: Construct the identity matrix of size n.

Member Function Documentation

template<typename C>
template<typename C1 >
void atlas::matrix::Matrix< C >::apply_to ( Vector< C1 > &  v) const
inline
template<typename C >
void atlas::matrix::Matrix< C >::columnMultiply ( size_t  j,
f 
)

Changes the sign of all the entries in column j.

template<typename C >
void atlas::matrix::Matrix< C >::columnOperation ( size_t  j0,
size_t  j1,
const C &  c 
)

Carries out the column operation consisting of adding c times column k to column j.

template<typename C>
Matrix& atlas::matrix::Matrix< C >::leftMult ( const Matrix< C > &  P)
inline
template<typename C>
Matrix& atlas::matrix::Matrix< C >::negate ( )
inline
template<typename C>
Matrix atlas::matrix::Matrix< C >::negative_transposed ( ) const
inline
template<typename C >
template<typename C1 >
Vector< C1 > atlas::matrix::Matrix< C >::operator* ( const Vector< C1 > &  w) const
template<typename C >
Matrix< C > atlas::matrix::Matrix< C >::operator* ( const Matrix< C > &  m) const
template<typename C>
Matrix& atlas::matrix::Matrix< C >::operator*= ( const Matrix< C > &  Q)
inline
template<typename C >
Matrix< C > & atlas::matrix::Matrix< C >::operator+= ( const Matrix< C > &  m)
template<typename C >
Matrix< C > & atlas::matrix::Matrix< C >::operator-= ( const Matrix< C > &  m)
template<typename C>
template<typename C1 >
void atlas::matrix::Matrix< C >::right_mult ( Vector< C1 > &  v) const
inline
template<typename C >
template<typename C1 >
template Vector< Num > atlas::matrix::Matrix< C >::right_prod ( const Vector< C1 > &  ) const
template<typename C >
void atlas::matrix::Matrix< C >::rowMultiply ( size_t  i,
f 
)

Changes the sign of all the entries in row i.

template<typename C >
void atlas::matrix::Matrix< C >::rowOperation ( size_t  i0,
size_t  i1,
const C &  c 
)

Carries out the row operation consisting of adding c times row j to row i.

template<typename C >
void atlas::matrix::Matrix< C >::swapColumns ( size_t  j0,
size_t  j1 
)

Interchange columns.

template<typename C >
void atlas::matrix::Matrix< C >::swapRows ( size_t  i0,
size_t  i1 
)

Interchanges rows.

template<typename C >
Matrix< C > & atlas::matrix::Matrix< C >::transpose ( )

Transposes the matrix. We allow ourselves a temporary vector if the matrix is not square; it could likely be done in-place, but the permutation is rather complicated!

template<typename C >
Matrix< C > atlas::matrix::Matrix< C >::transposed ( ) const

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