Reference documentation for deal.II version 8.5.1
|
#include <deal.II/lac/householder.h>
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 |
FullMatrix & | operator*= (const number factor) |
FullMatrix & | operator/= (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 () |
Subscriptor & | operator= (const Subscriptor &) |
Subscriptor & | operator= (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 ::ExceptionBase & | ExcEmptyMatrix () |
static ::ExceptionBase & | ExcNotRegular (number arg1) |
static ::ExceptionBase & | ExcInvalidDestination (size_type arg1, size_type arg2, size_type arg3) |
static ::ExceptionBase & | ExcSourceEqualsDestination () |
static ::ExceptionBase & | ExcMatrixNotPositiveDefinite () |
Static Private Member Functions inherited from Subscriptor | |
static ::ExceptionBase & | ExcInUse (int arg1, char *arg2, std::string &arg3) |
static ::ExceptionBase & | ExcNoSubscriber (char *arg1, char *arg2) |
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.
<float> and <double>
; others can be generated in application programs (see the section on Template instantiations in the manual).Definition at line 56 of file householder.h.
typedef types::global_dof_index Householder< number >::size_type |
Declare type of container size.
Definition at line 62 of file householder.h.
Householder< number >::Householder | ( | ) |
Create an empty object.
Householder< number >::Householder | ( | const FullMatrix< number2 > & | ) |
Create an object holding the QR-decomposition of a matrix.
void Householder< number >::initialize | ( | const FullMatrix< number2 > & | ) |
Compute the QR-decomposition of another matrix.
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. double Householder< number >::least_squares | ( | BlockVector< number2 > & | dst, |
const BlockVector< number2 > & | src | ||
) | const |
This function does the same as the one for BlockVectors.
void Householder< number >::vmult | ( | VectorType & | dst, |
const VectorType & | src | ||
) | const |
A wrapper to least_squares(), implementing the standard MatrixType interface.
|
private |
Storage for the diagonal elements of the orthogonal transformation.
Definition at line 118 of file householder.h.