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

#include <deal.II/lac/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 VectorType >
void vmult (VectorType &dst, const VectorType &src) const
 

Private Attributes

std::vector< number > diagonal
 
- Private Attributes inherited from TableBase< N, T >
AlignedVector< 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 Types inherited from TableBase< N, T >
typedef AlignedVector< T >::size_type size_type
 
- Private Member Functions inherited from FullMatrix< number >
 FullMatrix (const size_type n=0)
 
 FullMatrix (const size_type rows, const size_type cols)
 
 FullMatrix (const size_type rows, const size_type cols, const number *entries)
 
 FullMatrix (const IdentityMatrix &id)
 
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<typename MatrixType >
void copy_from (const MatrixType &)
 
template<typename MatrixType >
void copy_transposed (const MatrixType &)
 
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 StreamType >
void print (StreamType &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)
 
template<typename InputIterator >
 TableBase (const TableIndices< N > &sizes, InputIterator entries, const bool C_style_indexing=true)
 
 TableBase (const TableBase< N, T > &src)
 
template<typename T2 >
 TableBase (const TableBase< N, T2 > &src)
 
 TableBase (TableBase< N, T > &&src)
 
 ~TableBase ()
 
TableBase< N, T > & operator= (const TableBase< N, T > &src)
 
template<typename T2 >
TableBase< N, T > & operator= (const TableBase< N, T2 > &src)
 
TableBase< N, T > & operator= (TableBase< N, T > &&src)
 
bool operator== (const TableBase< N, T > &T2) const
 
void reset_values ()
 
void reinit (const TableIndices< N > &new_size, const bool omit_default_initialization=false)
 
unsigned int size (const unsigned int i) const
 
const TableIndices< N > & size () const
 
size_type n_elements () const
 
bool empty () const
 
template<typename InputIterator >
void fill (InputIterator entries, const bool C_style_indexing=true)
 
void fill (const T &value)
 
AlignedVector< T >::reference operator() (const TableIndices< N > &indices)
 
AlignedVector< 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)
 
size_type position (const TableIndices< N > &indices) const
 
AlignedVector< T >::reference el (const TableIndices< N > &indices)
 
AlignedVector< T >::const_reference el (const TableIndices< N > &indices) const
 
- Private Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&)
 
void subscribe (const char *identifier=0) const
 
void unsubscribe (const char *identifier=0) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
- Static Private Member Functions inherited from FullMatrix< number >
static ::ExceptionBaseExcEmptyMatrix ()
 
static ::ExceptionBaseExcNotRegular (number arg1)
 
static ::ExceptionBaseExcInvalidDestination (size_type arg1, size_type arg2, size_type arg3)
 
static ::ExceptionBaseExcSourceEqualsDestination ()
 
static ::ExceptionBaseExcMatrixNotPositiveDefinite ()
 
- Static Private Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, char *arg2, std::string &arg3)
 
static ::ExceptionBaseExcNoSubscriber (char *arg1, char *arg2)
 

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

◆ size_type

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

◆ Householder() [1/2]

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

Create an empty object.

◆ Householder() [2/2]

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

◆ initialize()

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

Compute the QR-decomposition of another matrix.

◆ least_squares() [1/2]

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.

◆ least_squares() [2/2]

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.

◆ vmult()

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

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

Member Data Documentation

◆ diagonal

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

Storage for the diagonal elements of the orthogonal transformation.

Definition at line 118 of file householder.h.


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