Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Public Member Functions | Static Public Attributes
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 56 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 34 of file Tsqr_ApplyType.cpp.

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

Copy constructor.

Definition at line 39 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 74 of file Tsqr_ApplyType.hpp.

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

Assignment operator.

Definition at line 44 of file Tsqr_ApplyType.cpp.

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

Does rhs equal this?

Definition at line 83 of file Tsqr_ApplyType.hpp.

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

Does rhs not equal this?

Definition at line 88 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 109 of file Tsqr_ApplyType.hpp.


Member Data Documentation

Represents applying Q to a matrix.

Definition at line 93 of file Tsqr_ApplyType.hpp.

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

Definition at line 96 of file Tsqr_ApplyType.hpp.

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

Definition at line 99 of file Tsqr_ApplyType.hpp.


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