57 :
public SolverBase<HouseholderQR<_MatrixType> >
107 template<
typename InputType>
125 template<
typename InputType>
135 #ifdef EIGEN_PARSED_BY_DOXYGEN
150 template<
typename Rhs>
178 template<
typename InputType>
223 #ifndef EIGEN_PARSED_BY_DOXYGEN
224 template<
typename RhsType,
typename DstType>
227 template<
bool Conjugate,
typename RhsType,
typename DstType>
246template<
typename MatrixType>
250 eigen_assert(m_isInitialized &&
"HouseholderQR is not initialized.");
251 eigen_assert(m_qr.rows() == m_qr.cols() &&
"You can't take the determinant of a non-square matrix!");
252 return abs(m_qr.diagonal().prod());
255template<
typename MatrixType>
258 eigen_assert(m_isInitialized &&
"HouseholderQR is not initialized.");
259 eigen_assert(m_qr.rows() == m_qr.cols() &&
"You can't take the determinant of a non-square matrix!");
260 return m_qr.diagonal().cwiseAbs().array().log().sum();
266template<
typename MatrixQR,
typename HCoeffs>
269 typedef typename MatrixQR::Scalar
Scalar;
270 typedef typename MatrixQR::RealScalar
RealScalar;
291 mat.col(k).tail(
remainingRows).makeHouseholderInPlace(hCoeffs.coeffRef(k), beta);
292 mat.coeffRef(k,k) = beta;
301template<
typename MatrixQR,
typename HCoeffs,
302 typename MatrixQRScalar =
typename MatrixQR::Scalar,
303 bool InnerStrideIsOne = (MatrixQR::InnerStrideAtCompileTime == 1 && HCoeffs::InnerStrideAtCompileTime == 1)>
308 typename MatrixQR::Scalar*
tempData = 0)
310 typedef typename MatrixQR::Scalar
Scalar;
358#ifndef EIGEN_PARSED_BY_DOXYGEN
359template<
typename _MatrixType>
360template<
typename RhsType,
typename DstType>
365 typename RhsType::PlainObject
c(rhs);
367 c.applyOnTheLeft(householderQ().setLength(rank).
adjoint() );
369 m_qr.topLeftCorner(rank, rank)
370 .template triangularView<Upper>()
371 .solveInPlace(
c.topRows(rank));
373 dst.topRows(rank) =
c.topRows(rank);
374 dst.bottomRows(
cols()-rank).setZero();
377template<
typename _MatrixType>
378template<
bool Conjugate,
typename RhsType,
typename DstType>
383 typename RhsType::PlainObject
c(rhs);
385 m_qr.topLeftCorner(rank, rank)
386 .template triangularView<Upper>()
387 .transpose().template conjugateIf<Conjugate>()
388 .solveInPlace(
c.topRows(rank));
390 dst.topRows(rank) =
c.topRows(rank);
391 dst.bottomRows(
rows()-rank).setZero();
393 dst.applyOnTheLeft(householderQ().setLength(rank).
template conjugateIf<!Conjugate>() );
403template<
typename MatrixType>
406 check_template_parameters();
412 m_hCoeffs.resize(
size);
418 m_isInitialized =
true;
425template<
typename Derived>
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
Definition Macros.h:1264
#define eigen_assert(x)
Definition Macros.h:1037
#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE)
Definition StaticAssert.h:187
MatrixXf mat
Definition Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
int rows
Definition Tutorial_commainit_02.cpp:1
int cols
Definition Tutorial_commainit_02.cpp:1
void adjoint(const MatrixType &m)
Definition adjoint.cpp:67
Scalar Scalar * c
Definition benchVecAdd.cpp:17
Scalar * b
Definition benchVecAdd.cpp:17
Scalar Scalar int size
Definition benchVecAdd.cpp:17
SCALAR Scalar
Definition bench_gemm.cpp:46
NumTraits< Scalar >::Real RealScalar
Definition bench_gemm.cpp:47
Householder QR decomposition of a matrix.
Definition HouseholderQR.h:58
const HCoeffsType & hCoeffs() const
Definition HouseholderQR.h:221
HouseholderQR(Index rows, Index cols)
Default Constructor with memory preallocation.
Definition HouseholderQR.h:89
_MatrixType MatrixType
Definition HouseholderQR.h:61
@ MaxColsAtCompileTime
Definition HouseholderQR.h:68
@ MaxRowsAtCompileTime
Definition HouseholderQR.h:67
Index cols() const
Definition HouseholderQR.h:215
void computeInPlace()
Definition HouseholderQR.h:404
HouseholderSequence< MatrixType, typename internal::remove_all< typename HCoeffsType::ConjugateReturnType >::type > HouseholderSequenceType
Definition HouseholderQR.h:73
const MatrixType & matrixQR() const
Definition HouseholderQR.h:172
RowVectorType m_temp
Definition HouseholderQR.h:242
SolverBase< HouseholderQR > Base
Definition HouseholderQR.h:62
internal::plain_diag_type< MatrixType >::type HCoeffsType
Definition HouseholderQR.h:71
HouseholderQR(EigenBase< InputType > &matrix)
Constructs a QR factorization from a given matrix.
Definition HouseholderQR.h:126
HouseholderQR()
Default Constructor.
Definition HouseholderQR.h:81
Index rows() const
Definition HouseholderQR.h:214
bool m_isInitialized
Definition HouseholderQR.h:243
MatrixType::RealScalar absDeterminant() const
Definition HouseholderQR.h:247
static void check_template_parameters()
Definition HouseholderQR.h:233
HouseholderQR & compute(const EigenBase< InputType > &matrix)
Definition HouseholderQR.h:179
void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const
Definition HouseholderQR.h:379
HCoeffsType m_hCoeffs
Definition HouseholderQR.h:241
MatrixType m_qr
Definition HouseholderQR.h:240
void _solve_impl(const RhsType &rhs, DstType &dst) const
Definition HouseholderQR.h:361
internal::plain_row_type< MatrixType >::type RowVectorType
Definition HouseholderQR.h:72
MatrixType::RealScalar logAbsDeterminant() const
Definition HouseholderQR.h:256
HouseholderQR(const EigenBase< InputType > &matrix)
Constructs a QR factorization from a given matrix.
Definition HouseholderQR.h:108
HouseholderSequenceType householderQ() const
Definition HouseholderQR.h:163
Sequence of Householder reflections acting on subspaces with decreasing size.
Definition HouseholderSequence.h:121
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
const HouseholderQR< PlainObject > householderQr() const
Definition HouseholderQR.h:427
The matrix class, also used for vectors and row-vectors.
Definition Matrix.h:180
Pseudo expression representing a solving operation.
Definition Solve.h:63
A base class for matrix decomposition and solvers.
Definition SolverBase.h:69
internal::traits< HouseholderQR< _MatrixType > >::Scalar Scalar
Definition SolverBase.h:73
@ RowsAtCompileTime
Definition SolverBase.h:80
const Solve< HouseholderQR< _MatrixType >, Rhs > solve(const MatrixBase< Rhs > &b) const
Definition SolverBase.h:106
EIGEN_DEVICE_FUNC HouseholderQR< _MatrixType > & derived()
Definition EigenBase.h:46
Definition TensorRef.h:81
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition common.h:110
#define abs(x)
Definition datatypes.h:17
#define min(a, b)
Definition datatypes.h:19
@ ColMajor
Definition Constants.h:319
@ RowMajor
Definition Constants.h:321
const unsigned int RowMajorBit
Definition Constants.h:66
void householder_qr_inplace_unblocked(MatrixQR &mat, HCoeffs &hCoeffs, typename MatrixQR::Scalar *tempData=0)
Definition HouseholderQR.h:267
void apply_block_householder_on_the_left(MatrixType &mat, const VectorsType &vectors, const CoeffsType &hCoeffs, bool forward)
Definition BlockHouseholder.h:86
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition BandTriangularSolver.h:13
internal::nested_eval< T, 1 >::type eval(const T &xpr)
Definition sparse_permutations.cpp:38
Definition EigenBase.h:30
Eigen::Index Index
The interface type of indices.
Definition EigenBase.h:39
Definition Constants.h:522
Definition Constants.h:513
Definition HouseholderQR.h:305
static void run(MatrixQR &mat, HCoeffs &hCoeffs, Index maxBlockSize=32, typename MatrixQR::Scalar *tempData=0)
Definition HouseholderQR.h:307
MatrixXpr XprKind
Definition HouseholderQR.h:21
int StorageIndex
Definition HouseholderQR.h:23
SolverStorage StorageKind
Definition HouseholderQR.h:22
Definition ForwardDeclarations.h:17