atlas  0.6
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
atlas::matrix::Matrix_base< C > Class Template Reference

#include <Atlas.h>

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

Public Member Functions

 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 Member Functions

const C * at (size_t i, size_t j) const
 
C * at (size_t i, size_t j)
 

Protected Attributes

Vector< C > d_data
 

Private Attributes

size_t d_rows
 
size_t d_columns
 

Constructor & Destructor Documentation

template<typename C>
atlas::matrix::Matrix_base< C >::Matrix_base ( )
inline
template<typename C>
atlas::matrix::Matrix_base< C >::Matrix_base ( size_t  m,
size_t  n 
)
inline
template<typename C>
atlas::matrix::Matrix_base< C >::Matrix_base ( size_t  m,
size_t  n,
const C &  c 
)
inline
template<typename C >
atlas::matrix::Matrix_base< C >::Matrix_base ( const std::vector< Vector< C > > &  b,
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|.

template<typename C >
template<typename I >
atlas::matrix::Matrix_base< C >::Matrix_base ( first,
last,
size_t  n_rows,
tags::IteratorTag   
)

Here I is a random access iterator type whose value type should be Vector<C> or some other type that can be subscripted giving a value of type C. We read the columns of the matrix from the iterator.

All the vectors obtained from the iterators should have size |n_rows|

Member Function Documentation

template<typename C >
void atlas::matrix::Matrix_base< C >::add_column ( const Vector< C > &  v)
template<typename C >
void atlas::matrix::Matrix_base< C >::add_row ( const Vector< C > &  v)
template<typename C>
const C* atlas::matrix::Matrix_base< C >::at ( size_t  i,
size_t  j 
) const
inlineprotected
template<typename C>
C* atlas::matrix::Matrix_base< C >::at ( size_t  i,
size_t  j 
)
inlineprotected
template<typename C>
Vector<C> atlas::matrix::Matrix_base< C >::column ( size_t  j) const
inline
template<typename C >
std::vector< Vector< C > > atlas::matrix::Matrix_base< C >::columns ( ) const

Returns the list of column vectors of m.

template<typename C>
size_t atlas::matrix::Matrix_base< C >::columnSize ( ) const
inline
template<typename C >
void atlas::matrix::Matrix_base< C >::eraseColumn ( size_t  j)

Removes column |j| altogether, shifting remaining entries to proper place

template<typename C >
void atlas::matrix::Matrix_base< C >::eraseRow ( size_t  i)

Erases row i from the matrix.

template<typename C >
void atlas::matrix::Matrix_base< C >::get_column ( Vector< C > &  v,
size_t  j 
) const
template<typename C >
void atlas::matrix::Matrix_base< C >::get_row ( Vector< C > &  v,
size_t  i 
) const

Puts the i-th row of the matrix in v.

template<typename C >
bool atlas::matrix::Matrix_base< C >::is_zero ( ) const
template<typename C>
bool atlas::matrix::Matrix_base< C >::isEmpty ( ) const
inline
template<typename C>
size_t atlas::matrix::Matrix_base< C >::numColumns ( ) const
inline
template<typename C>
size_t atlas::matrix::Matrix_base< C >::numRows ( ) const
inline
template<typename C>
bool atlas::matrix::Matrix_base< C >::operator!= ( const Matrix_base< C > &  m) const
inline
template<typename C>
const C& atlas::matrix::Matrix_base< C >::operator() ( size_t  i,
size_t  j 
) const
inline
template<typename C>
C& atlas::matrix::Matrix_base< C >::operator() ( size_t  i,
size_t  j 
)
inline
template<typename C >
bool atlas::matrix::Matrix_base< C >::operator== ( const Matrix_base< C > &  m) const
template<typename C>
void atlas::matrix::Matrix_base< C >::reset ( )
inline
template<typename C>
Vector<C> atlas::matrix::Matrix_base< C >::row ( size_t  i) const
inline
template<typename C >
std::vector< Vector< C > > atlas::matrix::Matrix_base< C >::rows ( ) const

Returns the list of row vectors of m.

template<typename C>
size_t atlas::matrix::Matrix_base< C >::rowSize ( ) const
inline
template<typename C >
void atlas::matrix::Matrix_base< C >::set_column ( size_t  j,
const Vector< C > &  v 
)

Puts v in the j-th column of the matrix.

template<typename C >
void atlas::matrix::Matrix_base< C >::set_row ( size_t  i,
const Vector< C > &  v 
)

Puts v in the i-th row of the matrix.

template<typename C >
void atlas::matrix::Matrix_base< C >::swap ( Matrix_base< C > &  m)

Swaps m with the current matrix.

Member Data Documentation

template<typename C>
size_t atlas::matrix::Matrix_base< C >::d_columns
private
template<typename C>
Vector<C> atlas::matrix::Matrix_base< C >::d_data
protected
template<typename C>
size_t atlas::matrix::Matrix_base< C >::d_rows
private

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