Reference documentation for deal.II version 8.1.0
Public Types | Public Member Functions | Private Attributes | List of all members
Householder< number > Class Template Reference

#include <householder.h>

Inheritance diagram for Householder< number >:
[legend]

Public Types

typedef types::global_dof_index size_type
 

Public Member Functions

 Householder ()
 
template<typename number2 >
 Householder (const FullMatrix< number2 > &)
 
template<typename number2 >
void initialize (const FullMatrix< number2 > &)
 
template<typename number2 >
double least_squares (Vector< number2 > &dst, const Vector< number2 > &src) const
 
template<typename number2 >
double least_squares (BlockVector< number2 > &dst, const BlockVector< number2 > &src) const
 
template<class VECTOR >
void vmult (VECTOR &dst, const VECTOR &src) const
 
template<class VECTOR >
void Tvmult (VECTOR &dst, const VECTOR &src) const
 

Private Attributes

std::vector< number > diagonal
 
- Private Attributes inherited from TableBase< N, T >
std::vector< T > values
 
TableIndices< N > table_size
 

Additional Inherited Members

- Private Types inherited from FullMatrix< number >
typedef unsigned int size_type
 
typedef number value_type
 
typedef numbers::NumberTraits< number >::real_type real_type
 
- Private Member Functions inherited from FullMatrix< number >
 DeclException0 (ExcEmptyMatrix)
 
 DeclException1 (ExcNotRegular, number,<< "The maximal pivot is "<< arg1<< ", which is below the threshold. The matrix may be singular.")
 
 DeclException3 (ExcInvalidDestination, size_type, size_type, size_type,<< "Target region not in matrix: size in this direction="<< arg1<< ", size of new matrix="<< arg2<< ", offset="<< arg3)
 
 DeclException0 (ExcSourceEqualsDestination)
 
 DeclException0 (ExcMatrixNotPositiveDefinite)
 
 FullMatrix (const size_type n=0)
 
 FullMatrix (const size_type rows, const size_type cols)
 
 FullMatrix (const FullMatrix &)
 
 FullMatrix (const size_type rows, const size_type cols, const number *entries)
 
 FullMatrix (const IdentityMatrix &id)
 
FullMatrix< number > & operator= (const FullMatrix< number > &)
 
template<typename number2 >
FullMatrix< number > & operator= (const FullMatrix< number2 > &)
 
FullMatrix< number > & operator= (const number d)
 
FullMatrix< number > & operator= (const IdentityMatrix &id)
 
template<typename number2 >
FullMatrix< number > & operator= (const LAPACKFullMatrix< number2 > &)
 
template<class MATRIX >
void copy_from (const MATRIX &)
 
template<class MATRIX >
void copy_transposed (const MATRIX &)
 
template<int dim>
void copy_from (const Tensor< 2, dim > &T, const size_type src_r_i=0, const size_type src_r_j=dim-1, const size_type src_c_i=0, const size_type src_c_j=dim-1, const size_type dst_r=0, const size_type dst_c=0)
 
template<int dim>
void copy_to (Tensor< 2, dim > &T, const size_type src_r_i=0, const size_type src_r_j=dim-1, const size_type src_c_i=0, const size_type src_c_j=dim-1, const size_type dst_r=0, const size_type dst_c=0) const
 
template<typename MatrixType , typename index_type >
void extract_submatrix_from (const MatrixType &matrix, const std::vector< index_type > &row_index_set, const std::vector< index_type > &column_index_set)
 
template<typename MatrixType , typename index_type >
void scatter_matrix_to (const std::vector< index_type > &row_index_set, const std::vector< index_type > &column_index_set, MatrixType &matrix) const
 
template<typename number2 >
void fill (const FullMatrix< number2 > &src, const size_type dst_offset_i=0, const size_type dst_offset_j=0, const size_type src_offset_i=0, const size_type src_offset_j=0)
 
template<typename number2 >
void fill (const number2 *)
 
template<typename number2 >
void fill_permutation (const FullMatrix< number2 > &src, const std::vector< size_type > &p_rows, const std::vector< size_type > &p_cols)
 
void set (const size_type i, const size_type j, const number value)
 
bool operator== (const FullMatrix< number > &) const
 
size_type m () const
 
size_type n () const
 
bool all_zero () const
 
template<typename number2 >
number2 matrix_norm_square (const Vector< number2 > &v) const
 
template<typename number2 >
number2 matrix_scalar_product (const Vector< number2 > &u, const Vector< number2 > &v) const
 
real_type l1_norm () const
 
real_type linfty_norm () const
 
real_type frobenius_norm () const
 
real_type relative_symmetry_norm2 () const
 
number determinant () const
 
number trace () const
 
template<class STREAM >
void print (STREAM &s, const unsigned int width=5, const unsigned int precision=2) const
 
void print_formatted (std::ostream &out, const unsigned int precision=3, const bool scientific=true, const unsigned int width=0, const char *zero_string=" ", const double denominator=1., const double threshold=0.) const
 
std::size_t memory_consumption () const
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator begin (const size_type r) const
 
const_iterator end (const size_type r) const
 
FullMatrixoperator*= (const number factor)
 
FullMatrixoperator/= (const number factor)
 
template<typename number2 >
void add (const number a, const FullMatrix< number2 > &A)
 
template<typename number2 >
void add (const number a, const FullMatrix< number2 > &A, const number b, const FullMatrix< number2 > &B)
 
template<typename number2 >
void add (const number a, const FullMatrix< number2 > &A, const number b, const FullMatrix< number2 > &B, const number c, const FullMatrix< number2 > &C)
 
template<typename number2 >
void add (const FullMatrix< number2 > &src, const number factor, const size_type dst_offset_i=0, const size_type dst_offset_j=0, const size_type src_offset_i=0, const size_type src_offset_j=0)
 
template<typename number2 >
void Tadd (const number s, const FullMatrix< number2 > &B)
 
template<typename number2 >
void Tadd (const FullMatrix< number2 > &src, const number factor, const size_type dst_offset_i=0, const size_type dst_offset_j=0, const size_type src_offset_i=0, const size_type src_offset_j=0)
 
void add (const size_type row, const size_type column, const number value)
 
template<typename number2 , typename index_type >
void add (const size_type row, const unsigned int n_cols, const index_type *col_indices, const number2 *values, const bool elide_zero_values=true, const bool col_indices_are_sorted=false)
 
void add_row (const size_type i, const number s, const size_type j)
 
void add_row (const size_type i, const number s, const size_type j, const number t, const size_type k)
 
void add_col (const size_type i, const number s, const size_type j)
 
void add_col (const size_type i, const number s, const size_type j, const number t, const size_type k)
 
void swap_row (const size_type i, const size_type j)
 
void swap_col (const size_type i, const size_type j)
 
void diagadd (const number s)
 
template<typename number2 >
void equ (const number a, const FullMatrix< number2 > &A)
 
template<typename number2 >
void equ (const number a, const FullMatrix< number2 > &A, const number b, const FullMatrix< number2 > &B)
 
template<typename number2 >
void equ (const number a, const FullMatrix< number2 > &A, const number b, const FullMatrix< number2 > &B, const number c, const FullMatrix< number2 > &C)
 
void symmetrize ()
 
void gauss_jordan ()
 
template<typename number2 >
void invert (const FullMatrix< number2 > &M)
 
template<typename number2 >
void cholesky (const FullMatrix< number2 > &A)
 
template<typename number2 >
void outer_product (const Vector< number2 > &V, const Vector< number2 > &W)
 
template<typename number2 >
void left_invert (const FullMatrix< number2 > &M)
 
template<typename number2 >
void right_invert (const FullMatrix< number2 > &M)
 
template<typename number2 >
void mmult (FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
 
template<typename number2 >
void Tmmult (FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
 
template<typename number2 >
void mTmult (FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
 
template<typename number2 >
void TmTmult (FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
 
void triple_product (const FullMatrix< number > &A, const FullMatrix< number > &B, const FullMatrix< number > &D, const bool transpose_B=false, const bool transpose_D=false, const number scaling=number(1.))
 
template<typename number2 >
void vmult (Vector< number2 > &w, const Vector< number2 > &v, const bool adding=false) const
 
template<typename number2 >
void vmult_add (Vector< number2 > &w, const Vector< number2 > &v) const
 
template<typename number2 >
void Tvmult (Vector< number2 > &w, const Vector< number2 > &v, const bool adding=false) const
 
template<typename number2 >
void Tvmult_add (Vector< number2 > &w, const Vector< number2 > &v) const
 
template<typename somenumber >
void precondition_Jacobi (Vector< somenumber > &dst, const Vector< somenumber > &src, const number omega=1.) const
 
template<typename number2 , typename number3 >
number residual (Vector< number2 > &dst, const Vector< number2 > &x, const Vector< number3 > &b) const
 
template<typename number2 >
void forward (Vector< number2 > &dst, const Vector< number2 > &src) const
 
template<typename number2 >
void backward (Vector< number2 > &dst, const Vector< number2 > &src) const
 
- Private Member Functions inherited from TableBase< N, T >
 TableBase ()
 
 TableBase (const TableIndices< N > &sizes)
 
 TableBase (const TableBase< N, T > &src)
 
template<typename T2 >
 TableBase (const TableBase< N, T2 > &src)
 
 ~TableBase ()
 
TableBase< N, T > & operator= (const TableBase< N, T > &src)
 
template<typename T2 >
TableBase< N, T > & operator= (const TableBase< N, T2 > &src)
 
bool operator== (const TableBase< N, T > &T2) const
 
void reset_values ()
 
void reinit (const TableIndices< N > &new_size, const bool fast=false)
 
unsigned int size (const unsigned int i) const
 
const TableIndices< N > & size () const
 
unsigned int n_elements () const
 
bool empty () const
 
template<typename T2 >
void fill (const T2 *entries)
 
void fill (const T &value)
 
std::vector< T >::reference operator() (const TableIndices< N > &indices)
 
std::vector< T >::const_reference operator() (const TableIndices< N > &indices) const
 
void swap (TableBase< N, T > &v)
 
std::size_t memory_consumption () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
unsigned int position (const TableIndices< N > &indices) const
 
std::vector< T >::reference el (const TableIndices< N > &indices)
 
std::vector< T >::const_reference el (const TableIndices< N > &indices) const
 
std::vector< T >::const_pointer data () const DEAL_II_DEPRECATED
 
- Private Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
void subscribe (const char *identifier=0) const
 
void unsubscribe (const char *identifier=0) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
 DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects.\n"<< "(Additional information: "<< arg3<< ")\n"<< "Note the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "more information on what this error means.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier \""<< arg2<< "\" did subscribe to this object of class "<< arg1)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Detailed Description

template<typename number>
class Householder< number >

QR-decomposition of a full matrix.

Whenever an object of this class is created, it copies the matrix given and computes its QR-decomposition by Householder algorithm. Then, the function least_squares() can be used to compute the vector x minimizing ||Ax-b|| for a given vector b.

Note
Instantiations for this template are provided for <float> and <double>; others can be generated in application programs (see the section on Template instantiations in the manual).
Author
Guido Kanschat, 2005

Definition at line 56 of file householder.h.

Member Typedef Documentation

template<typename number>
typedef types::global_dof_index Householder< number >::size_type

Declare type of container size.

Definition at line 62 of file householder.h.

Constructor & Destructor Documentation

template<typename number>
Householder< number >::Householder ( )

Create an empty object.

template<typename number>
template<typename number2 >
Householder< number >::Householder ( const FullMatrix< number2 > &  )

Create an object holding the QR-decomposition of a matrix.

Member Function Documentation

template<typename number>
template<typename number2 >
void Householder< number >::initialize ( const FullMatrix< number2 > &  )

Compute the QR-decomposition of another matrix.

template<typename number>
template<typename number2 >
double Householder< number >::least_squares ( Vector< number2 > &  dst,
const Vector< number2 > &  src 
) const

Solve the least-squares problem for the right hand side src. The return value is the Euclidean norm of the approximation error.

  • dst contains the solution of the least squares problem on return.
  • src contains the right hand side b of the least squares problem. It will be changed during the algorithm and is unusable on return.
template<typename number>
template<typename number2 >
double Householder< number >::least_squares ( BlockVector< number2 > &  dst,
const BlockVector< number2 > &  src 
) const

This function does the same as the one for BlockVectors.

template<typename number>
template<class VECTOR >
void Householder< number >::vmult ( VECTOR &  dst,
const VECTOR &  src 
) const

A wrapper to least_squares(), implementing the standard MATRIX interface.

Member Data Documentation

template<typename number>
std::vector<number> Householder< number >::diagonal
private

Storage for the diagonal elements of the orthogonal transformation.

Definition at line 131 of file householder.h.


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