Kokkos Node API and Local Linear Algebra Kernels Version of the Day
TSQR::ApplyType Class Reference

NoTranspose, Transpose, or ConjugateTranspose. More...

`#include <Tsqr_ApplyType.hpp>`

List of all members.

Public Member Functions

ApplyType (const std::string &op)
Constructor.
bool transposed () const
Whether this corresponds to (Q^T or Q^H)
ApplyType (const ApplyType &rhs)
Copy constructor.
ApplyTypeoperator= (const ApplyType &rhs)
Assignment operator.
bool operator== (const ApplyType &rhs) const
Does rhs equal this?
bool operator!= (const ApplyType &rhs) const
Does rhs not equal this?
const std::string & toString () const

Static Public Attributes

static const ApplyType NoTranspose = ApplyType ("N")
Represents applying Q to a matrix.
static const ApplyType Transpose = ApplyType ("T")
Represents applying Q^T (transpose of Q) to a matrix.
static const ApplyType ConjugateTranspose = ApplyType ("C")
Represents applying Q^H (conjugate transpose of Q) to a matrix.

Detailed Description

NoTranspose, Transpose, or ConjugateTranspose.

An ApplyType instance represents one of three ways one can apply an implicitly stored Q factor from a QR factorization to the left of a matrix C: either as Q (NoTranspose), as Q^T (Transpose), or as Q^H (ConjugateTranspose). Transpose and ConjugateTranspose only mean different things in complex arithmetic. This class is a kind of "checked enum" that only allows these three values. It knows how to go from a length-one string to the appropriate ApplyType object: "N" -> NoTranspose, "T" -> Transpose, and "C" or "H" -> ConjugateTranspose (both "C" and "H" mean the same thing).

std::invalid_argument is thrown if an invalid input is given.

Definition at line 69 of file Tsqr_ApplyType.hpp.

Constructor & Destructor Documentation

 TSQR::ApplyType::ApplyType ( const std::string & op )

Constructor.

Parameters:
 op [in] One of "N", "T", "C", or "H". Only the first character of op is read, in a case-insensitive way.

Definition at line 47 of file Tsqr_ApplyType.cpp.

 TSQR::ApplyType::ApplyType ( const ApplyType & rhs )

Copy constructor.

Definition at line 52 of file Tsqr_ApplyType.cpp.

Member Function Documentation

 bool TSQR::ApplyType::transposed ( ) const` [inline]`

Whether this corresponds to (Q^T or Q^H)

If op corresponds to applying Q, return false, else if op corresponds to applying Q^T or Q^H, return true.

Note:
We lump Q^T and Q^H together because they both involve applying the Q factor pieces in the same order as they were computed in factor(), whereas applying Q involves applying those pieces in the reverse order of their computation in factor().

Definition at line 87 of file Tsqr_ApplyType.hpp.

 ApplyType & TSQR::ApplyType::operator= ( const ApplyType & rhs )

Assignment operator.

Definition at line 57 of file Tsqr_ApplyType.cpp.

 bool TSQR::ApplyType::operator== ( const ApplyType & rhs ) const` [inline]`

Does rhs equal this?

Definition at line 96 of file Tsqr_ApplyType.hpp.

 bool TSQR::ApplyType::operator!= ( const ApplyType & rhs ) const` [inline]`

Does rhs not equal this?

Definition at line 101 of file Tsqr_ApplyType.hpp.

 const std::string& TSQR::ApplyType::toString ( ) const` [inline]`

Return a reference to the canonical LAPACK string representing the apply type. Different for each of NoTranspose, Transpose, or ConjugateTranspose.

Note:
This is useful for e.g., calling into LAPACK's Householder QR routines. this->toString().c_str() will return a character array which LAPACK routines such as DORMQR and ZORMQR will understand.

Definition at line 122 of file Tsqr_ApplyType.hpp.

Member Data Documentation

 const ApplyType TSQR::ApplyType::NoTranspose = ApplyType ("N")` [static]`

Represents applying Q to a matrix.

Definition at line 106 of file Tsqr_ApplyType.hpp.

 const ApplyType TSQR::ApplyType::Transpose = ApplyType ("T")` [static]`

Represents applying Q^T (transpose of Q) to a matrix.

Definition at line 109 of file Tsqr_ApplyType.hpp.

 const ApplyType TSQR::ApplyType::ConjugateTranspose = ApplyType ("C")` [static]`

Represents applying Q^H (conjugate transpose of Q) to a matrix.

Definition at line 112 of file Tsqr_ApplyType.hpp.

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