rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWBandTriDiagDecomp< TypeT > Class Template Reference
[Decomposition]

Encapsulates a symmetric tridiagonal decomposition of a symmetric banded matrix. More...

#include <rw/lapack/td.h>

Inheritance diagram for RWBandTriDiagDecomp< TypeT >:
RWTriDiagDecomp< TypeT >

List of all members.

Public Types

typedef rw_numeric_traits
< TypeT >::norm_type 
rt

Public Member Functions

 RWBandTriDiagDecomp (const typename rw_linear_algebra_traits< TypeT >::banded_hermitian_type &A, bool keepQ=true)
virtual RWGenMat< TypeT > transform (const RWGenMat< rt > &x) const
virtual RWMathVec< TypeT > transform (const RWMathVec< rt > &x) const

Detailed Description

template<class TypeT>
class RWBandTriDiagDecomp< TypeT >

The class RWBandTriDiagDecomp<T> encapsulates a symmetric tridiagonal decomposition of a symmetric banded matrix A:

$ A = QTQ^\prime $

where Q is orthogonal and T is real tridiagonal symmetric. This class is used internally by the symmetric eigenvalue classes.

Synopsis

 #include <rw/lapack/td.h>

 RWBandTriDiagDecomp<double>(A);  // A is a DoubleSymMat

Examples

 #include <rw/lapack/sbndmat.h>
 #include <rw/lapack/td.h>
 #include <iostream>

 int main()
 {
     RWSymBandMat<double> A;
     std::cin >> A;
     RWSymBandTriDiagDecomp<double> decomp(A);
     std::cout << "T's diagonal is" << decomp.diagonal() << std::endl;
     std::cout << "T's off diagonal is " << decomp.offDiagonal()
                << std::endl;
     return 0;
 }

Member Typedef Documentation

template<class TypeT >
typedef rw_numeric_traits<TypeT>::norm_type RWBandTriDiagDecomp< TypeT >::rt

Typedef for the usual return type of numerical norm-like functions. For more information, see rw_numeric_traits<T>::norm_type.

Reimplemented from RWTriDiagDecomp< TypeT >.


Constructor & Destructor Documentation

template<class TypeT >
RWBandTriDiagDecomp< TypeT >::RWBandTriDiagDecomp ( const typename rw_linear_algebra_traits< TypeT >::banded_hermitian_type &  A,
bool  keepQ = true 
)

Constructs a tridiagonal decomposition of A. By setting the optional boolean parameter keepQ to false, the data necessary to transform via Q is not stored. This can save substantial storage costs, but an exception is thrown if you attempt to use the member function transform.


Member Function Documentation

template<class TypeT >
virtual RWMathVec<TypeT> RWBandTriDiagDecomp< TypeT >::transform ( const RWMathVec< rt > &   )  const [virtual]

Transforms the vector from tridiagonal decomposition space back to the original matrix space. This amounts to multiplying it by the matrix Q.

Reimplemented from RWTriDiagDecomp< TypeT >.

template<class TypeT >
virtual RWGenMat<TypeT> RWBandTriDiagDecomp< TypeT >::transform ( const RWGenMat< rt > &   )  const [virtual]

Transforms the vector from tridiagonal decomposition space back to the original matrix space. This amounts to multiplying it by the matrix Q.

Implements RWTriDiagDecomp< TypeT >.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.