Anasazi Version of the Day
Public Types | Public Member Functions
Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV > Class Template Reference

Mixin for out-of-place orthogonalization. More...

#include <AnasaziTsqrOrthoManager.hpp>

Inheritance diagram for Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV >:
Anasazi::TsqrMatOrthoManager< Scalar, MV, OP > Anasazi::TsqrOrthoManager< Scalar, MV >

List of all members.

Public Types

typedef MV multivector_type
 Multivector type with which this class was specialized.

Public Member Functions

virtual int normalizeOutOfPlace (MV &X, MV &Q, mat_ptr B) const =0
 Normalize X into Q*B.
virtual int projectAndNormalizeOutOfPlace (MV &X_in, MV &X_out, Teuchos::Array< mat_ptr > C, mat_ptr B, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const =0
 Project and normalize X_in into X_out.
virtual ~OutOfPlaceNormalizerMixin ()
 Trivial virtual destructor, to silence compiler warnings.

Detailed Description

template<class Scalar, class MV>
class Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV >

Mixin for out-of-place orthogonalization.

Author:
Mark Hoemmen

This class presents an abstract interface for multiple inheritance ("mixin") for special orthogonalization methods that normalize "out-of-place." OrthoManager and MatOrthoManager both normalize (and projectAndNormalize) multivectors "in place," meaning that the input and output multivectors are the same (X, in both cases). Gram-Schmidt (modified or classical) is an example of an orthogonalization method that can normalize (and projectAndNormalize) in place. TSQR (the Tall Skinny QR factorization, see TsqrOrthoManager.hpp for references) is an orthogonalization method which cannot normalize (or projectAndNormalize) in place.

Tsqr(Mat)OrthoManager implements (Mat)OrthoManager's normalize() and projectAndNormalize() methods with scratch space and copying. However, if you handle Tsqr(Mat)OrthoManager through this mixin, you can exploit TSQR's unique interface to avoid copying back and forth between scratch space.

Definition at line 63 of file AnasaziTsqrOrthoManager.hpp.


Member Typedef Documentation

template<class Scalar , class MV >
Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV >::multivector_type

Multivector type with which this class was specialized.

Reimplemented in Anasazi::TsqrOrthoManager< Scalar, MV >, and Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >.

Definition at line 69 of file AnasaziTsqrOrthoManager.hpp.


Constructor & Destructor Documentation

template<class Scalar , class MV >
virtual Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV >::~OutOfPlaceNormalizerMixin ( ) [inline, virtual]

Trivial virtual destructor, to silence compiler warnings.

Definition at line 111 of file AnasaziTsqrOrthoManager.hpp.


Member Function Documentation

template<class Scalar , class MV >
virtual int Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV >::normalizeOutOfPlace ( MV &  X,
MV &  Q,
mat_ptr  B 
) const [pure virtual]

Normalize X into Q*B.

Parameters:
X[in/out] On input: Multivector to normalize. On output: Possibly overwritten with invalid values.
Q[out] On output: Normalized multivector.
B[out] On output: Normalization coefficients.
Returns:
Rank of the input multivector X.

Implemented in Anasazi::TsqrOrthoManager< Scalar, MV >, and Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >.

template<class Scalar , class MV >
virtual int Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV >::projectAndNormalizeOutOfPlace ( MV &  X_in,
MV &  X_out,
Teuchos::Array< mat_ptr C,
mat_ptr  B,
Teuchos::ArrayView< Teuchos::RCP< const MV > >  Q 
) const [pure virtual]

Project and normalize X_in into X_out.

Project X_in against Q, storing projection coefficients in C, and normalize X_in into X_out, storing normalization coefficients in B. On output, X_out has the resulting orthogonal vectors. X_in may be overwritten with invalid values.

Parameters:
X_in[in/out] On input: The vectors to project against Q and normalize. On output: possibly overwritten with invalid values.
X_out[out] The normalized input vectors after projection against Q.
C[out] Projection coefficients
B[out] Normalization coefficients
Q[in] The orthogonal basis against which to project
Returns:
Rank of X_in after projection

Implemented in Anasazi::TsqrOrthoManager< Scalar, MV >, and Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends