gslmm::matrix< complex< double > > Class Template Reference
[Matrices]

#include <matrix_complex_double.hh>

Inheritance diagram for gslmm::matrix< complex< double > >:

Inheritance graph
[legend]
Collaboration diagram for gslmm::matrix< complex< double > >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<>
class gslmm::matrix< complex< double > >

Matrix complex<double> specialisation.


Public Types

typedef size_t size_type
typedef size_t iterator
typedef complex< double > value_type
typedef double element_type
typedef gsl_matrix_complex data_type
typedef gsl_matrix_complex_view view_type
typedef vector< value_typevector_type
typedef type_trait< value_typetrait_type
typedef trait_type::reference_type reference_type

Public Member Functions

 matrix (const _matrix_mult< complex< double > > &p)
 matrix (const _matrix_manip_mult< complex< double > > &p)
 matrix (size_t rows, size_t columns, bool zero=true)
 matrix (const matrix< value_type > &m, bool trans=false, bool conj=false)
 matrix (const matrix< value_type > &m, iterator row_offset, iterator column_offset, size_type rows, size_type columns, size_type tda=0)
 matrix (element_type *array, size_type rows, size_type columns, size_type tda=0)
 matrix (const vector_type &v, size_type rows, size_type columns, size_type tda=0)
virtual ~matrix ()
Swaping data
void swap (const matrix< value_type > &m)
void swap_rows (iterator i, iterator j)
void swap_columns (iterator i, iterator j)
void swap_row_column (iterator i, iterator j)
Information
size_type row_size () const
size_type column_size () const
bool is_owner () const
bool is_null () const
size_type tda () const
Manipulations
void zero ()
void set (value_type x)
void identity ()
void transpose ()
void conjugate ()
Member access
const reference_type operator() (iterator row, iterator column) const
reference_type operator() (iterator row, iterator column)
vector_type operator[] (iterator r)
const vector_type operator[] (iterator r) const
value_typeelement (iterator row, iterator column)
const value_typeelement (iterator row, iterator column) const
Views of all kinds
matrix< complex< double > > operator() (iterator row, iterator column, size_type rows, size_type columns) const
vector_type row (iterator r)
const vector_type row (iterator r) const
vector_type column (iterator c)
const vector_type column (iterator c) const
vector_type diagonal (int d)
const vector_type diagonal (int d) const
vector_type sub_diagonal (int s)
const vector_type sub_diagonal (int s) const
vector_type super_diagonal (int s)
const vector_type super_diagonal (int s) const
Assignment operations
matrix< value_type > & operator= (const matrix< value_type > &m)
matrix< value_type > & operator= (const _matrix_mult< value_type > &m)
matrix< value_type > & operator= (const _matrix_manip_mult< value_type > &m)
matrix< value_type > & operator+= (const matrix< value_type > &o)
matrix< value_type > & operator-= (const matrix< value_type > &o)
matrix< value_type > & operator *= (const matrix< value_type > &o)
matrix< value_type > & operator/= (const matrix< value_type > &o)
matrix< value_type > & operator+= (const value_type &o)
matrix< value_type > & operator-= (const value_type &o)
matrix< value_type > & operator *= (const value_type &o)
matrix< value_type > & operator/= (const value_type &o)

Public Attributes

data_type_matrix

Protected Member Functions

void from_view (view_type &view)
 matrix ()


Member Typedef Documentation

typedef gsl_matrix_complex gslmm::matrix< complex< double > >::data_type
 

Low level data type.

Reimplemented in gslmm::lu_decomposition< complex< double > >.

typedef double gslmm::matrix< complex< double > >::element_type
 

Type of data.

Reimplemented in gslmm::lu_decomposition< complex< double > >.

typedef size_t gslmm::matrix< complex< double > >::iterator
 

Iterator (or indexer) type.

typedef trait_type::reference_type gslmm::matrix< complex< double > >::reference_type
 

Type of reference.

typedef size_t gslmm::matrix< complex< double > >::size_type
 

Size type.

typedef type_trait<value_type> gslmm::matrix< complex< double > >::trait_type
 

Type of traits for elements.

typedef complex<double> gslmm::matrix< complex< double > >::value_type
 

Type of data.

Reimplemented in gslmm::lu_decomposition< complex< double > >.

typedef vector<value_type> gslmm::matrix< complex< double > >::vector_type
 

Type of associated vectors.

Reimplemented in gslmm::lu_decomposition< complex< double > >.

typedef gsl_matrix_complex_view gslmm::matrix< complex< double > >::view_type
 

Low level view type.


Constructor & Destructor Documentation

gslmm::matrix< complex< double > >::matrix const _matrix_mult< complex< double > > &  p  )  [inline]
 

Constructor from a product.

Parameters:
p Product

gslmm::matrix< complex< double > >::matrix const _matrix_manip_mult< complex< double > > &  p  )  [inline]
 

Constructor from a product.

Parameters:
p Product

gslmm::matrix< complex< double > >::matrix size_t  rows,
size_t  columns,
bool  zero = true
[inline]
 

Constructor.

Parameters:
rows Number of rows in matrix.
columns Number of columns in matrix.
zero If true initialise to zero (null) matrix.

gslmm::matrix< complex< double > >::matrix const matrix< value_type > &  m,
bool  trans = false,
bool  conj = false
[inline]
 

Copy constructor.

Parameters:
m The matrix to copy.
trans If true, the transpose of m is copyied to this object.
conj If true, also conjugate the matrix.

gslmm::matrix< complex< double > >::matrix const matrix< value_type > &  m,
iterator  row_offset,
iterator  column_offset,
size_type  rows,
size_type  columns,
size_type  tda = 0
[inline]
 

View constructor.

Parameters:
m Matrix to create view from,
row_offset Offset in row direction,
column_offset Offset in column direction,
rows Rows in view
columns Columns in view.
tda If positive, the physical number of columns in memory.

gslmm::matrix< complex< double > >::matrix element_type array,
size_type  rows,
size_type  columns,
size_type  tda = 0
[inline]
 

View constructor.

Parameters:
array Array to create view from,
rows Rows in view
columns Columns in view.
tda If positive, the physical number of columns in memory.

gslmm::matrix< complex< double > >::matrix const vector_type v,
size_type  rows,
size_type  columns,
size_type  tda = 0
[inline]
 

View constructor.

Parameters:
v Vector to create view from,
rows Rows in view
columns Columns in view.
tda If positive, the physical number of columns in memory.

gslmm::matrix< complex< double > >::~matrix  )  [inline, virtual]
 

Destructor.

gslmm::matrix< complex< double > >::matrix  )  [inline, protected]
 

Constructor.


Member Function Documentation

const matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::column iterator  c  )  const [inline]
 

Get a column (const version).

Parameters:
c The column number to get (starts at 0)
Returns:
the c column of the matrix, as a reference only

matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::column iterator  c  )  [inline]
 

Get a column.

Parameters:
c The column number to get (starts at 0)
Returns:
the c column of the matrix, as a reference only

size_type gslmm::matrix< complex< double > >::column_size  )  const [inline]
 

Get the number of columns.

void gslmm::matrix< complex< double > >::conjugate  )  [inline]
 

Conjugate all elements of the matrix.

const matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::diagonal int  d  )  const [inline]
 

Get the diagonal (const version).

Parameters:
d The diagonal number. Negative are below diagonal, positive above, and zero is the diagonal itself.
Returns:
the diagonal of the matrix, as a reference only

matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::diagonal int  d  )  [inline]
 

Get the diagonal.

Parameters:
d The diagonal number. Negative are below diagonal, positive above, and zero is the diagonal itself.
Returns:
the diagonal of the matrix, as a reference only

const matrix< complex< double > >::value_type * gslmm::matrix< complex< double > >::element iterator  row,
iterator  column
const [inline]
 

Get a pointer to the element at (row, col).

Parameters:
row Row number
column Column number
Returns:
pointer to element (i, j)

matrix< complex< double > >::value_type * gslmm::matrix< complex< double > >::element iterator  row,
iterator  column
[inline]
 

Get a pointer to the element at (row, col).

Parameters:
row Row number
column Column number
Returns:
pointer to element (i, j)

void gslmm::matrix< complex< double > >::from_view view_type view  )  [inline, protected]
 

Construct from a view.

void gslmm::matrix< complex< double > >::identity  )  [inline]
 

Make an identity matrix.

only the $ i,i$ elements are 1, the rest of the elements are zero.

bool gslmm::matrix< complex< double > >::is_null  )  const [inline]
 

Whether this is the null matrix.

bool gslmm::matrix< complex< double > >::is_owner  )  const [inline]
 

Whether this is the owner of the data.

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator *= const value_type o  )  [inline]
 

Multiply all elements by a number.

Parameters:
o The number to multiply to this
Returns:
this matrix, where $ m'_{ij}= m_{ij}o$

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator *= const matrix< value_type > &  o  )  [inline]
 

Multiply by a matrix, element by element.

Parameters:
o The matrix to multiply to this
Returns:
this matrix, where $ m'_{ij}= m_{ij}o_{ij}$

matrix< complex< double > > gslmm::matrix< complex< double > >::operator() iterator  row,
iterator  column,
size_type  rows,
size_type  columns
const [inline]
 

Get a sub-matrix of this matrix.

Parameters:
row Row in this matrix to start at
column Column in this matrix to start at
rows Number of rows in sub-matrix
columns Number of columns in sub-martix.
Returns:
a new matrix object that does not own the data.

matrix< complex< double > >::reference_type gslmm::matrix< complex< double > >::operator() iterator  row,
iterator  column
[inline]
 

Member accessor.

Parameters:
row The row number
column The column number
Returns:
the $ i,j$-th element.

const matrix< complex< double > >::reference_type gslmm::matrix< complex< double > >::operator() iterator  row,
iterator  column
const [inline]
 

Member accessor.

Parameters:
row The row number
column The column number
Returns:
the $ i,j$-th element.

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator+= const value_type o  )  [inline]
 

Add a number to all elements.

Parameters:
o The number to add to this
Returns:
this matrix, where $ m'_{ij}= m_{ij}+o$

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator+= const matrix< value_type > &  o  )  [inline]
 

Add a matrix, element by element.

Parameters:
o The matrix to add to this
Returns:
this matrix, where $ m'_{ij}= m_{ij}+o_{ij}$

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator-= const value_type o  )  [inline]
 

Subtract a number from all elements.

Parameters:
o The number to subtract from this
Returns:
this matrix, where $ m'_{ij}= m_{ij}-o$

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator-= const matrix< value_type > &  o  )  [inline]
 

Subtract a matrix, element by element.

Parameters:
o The matrix to subtract from this
Returns:
this matrix, where $ m'_{ij}= m_{ij}-o_{ij}$

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator/= const value_type o  )  [inline]
 

Divide all elements by a number.

Parameters:
o The number to divide into this
Returns:
this matrix, where $ m'_{ij}= m_{ij}/o$

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator/= const matrix< value_type > &  o  )  [inline]
 

Divide by a matrix, element by element.

Parameters:
o The matrix to divide into this
Returns:
this matrix, where $ m'_{ij}= m_{ij}/o_{ij}$

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator= const _matrix_manip_mult< value_type > &  m  )  [inline]
 

Assignment operator.

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator= const _matrix_mult< value_type > &  m  )  [inline]
 

Assignment operator.

matrix< complex< double > > & gslmm::matrix< complex< double > >::operator= const matrix< value_type > &  m  )  [inline]
 

Assignment operator.

const matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::operator[] iterator  r  )  const [inline]
 

Get a row (const version).

Parameters:
r The row number to get (starts at 0)
Returns:
the r row of the matrix, as a reference only

matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::operator[] iterator  r  )  [inline]
 

Get a row.

Parameters:
r The row number to get (starts at 0)
Returns:
the r row of the matrix, as a reference only

const matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::row iterator  r  )  const [inline]
 

Get a row (const version).

Parameters:
r The row number to get (starts at 0)
Returns:
the r row of the matrix, as a reference only

matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::row iterator  r  )  [inline]
 

Get a row.

Parameters:
r The row number to get (starts at 0)
Returns:
the r row of the matrix, as a reference only

size_type gslmm::matrix< complex< double > >::row_size  )  const [inline]
 

Get the number of rows.

void gslmm::matrix< complex< double > >::set value_type  x  )  [inline]
 

Set all elements to one number.

Parameters:
x the value to set all elements to.

const matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::sub_diagonal int  s  )  const [inline]
 

Get a sub-diagonal (const version).

Parameters:
s The sub-diagonal number to get (0 is the diagonal)
Returns:
the s sub-diagonal of the matrix, as a reference only

matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::sub_diagonal int  s  )  [inline]
 

Get a sub-diagonal.

Parameters:
s The sub-diagonal number to get (0 is diagonal)
Returns:
the s sub-diagonal of the matrix, as a reference only

const matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::super_diagonal int  s  )  const [inline]
 

Get a super-diagonal (const version).

Parameters:
s The super-diagonal number to get (0 is the diagonal)
Returns:
the s super-diagonal of the matrix, as a reference only

matrix< complex< double > >::vector_type gslmm::matrix< complex< double > >::super_diagonal int  s  )  [inline]
 

Get a super-diagonal.

Parameters:
s The super-diagonal number to get (0 is diagonal)
Returns:
the s super-diagonal of the matrix, as a reference only

void gslmm::matrix< complex< double > >::swap const matrix< value_type > &  m  )  [inline]
 

Swap two matricies.

void gslmm::matrix< complex< double > >::swap_columns iterator  i,
iterator  j
[inline]
 

Swap two columns .

void gslmm::matrix< complex< double > >::swap_row_column iterator  i,
iterator  j
[inline]
 

Swap row i for column j.

Matrix must be square.

void gslmm::matrix< complex< double > >::swap_rows iterator  i,
iterator  j
[inline]
 

Swap two rows .

size_type gslmm::matrix< complex< double > >::tda  )  const [inline]
 

Get the physical number of columns in memory.

void gslmm::matrix< complex< double > >::transpose  )  [inline]
 

Make this into the transpose of it self.

This member function only works for square matricies.

void gslmm::matrix< complex< double > >::zero  )  [inline]
 

Reset all elements to zero.


Member Data Documentation

data_type* gslmm::matrix< complex< double > >::_matrix
 

The data.


The documentation for this class was generated from the following file:
Top of page Last update Tue May 9 10:11:37 2006
Christian Holm
Created by DoxyGen 1.4.6