21 template <
typename MatrixType_>
58 template <
typename MatrixType_>
107 template <
typename InputType>
123 template <
typename InputType>
132 #ifdef EIGEN_PARSED_BY_DOXYGEN
147 template <
typename Rhs>
173 template <
typename InputType>
257 #ifndef EIGEN_PARSED_BY_DOXYGEN
258 template <
typename RhsType,
typename DstType>
261 template <
bool Conjugate,
typename RhsType,
typename DstType>
279 template <
typename HCoeffs,
typename Scalar,
bool IsComplex>
294 template <
typename HCoeffs,
typename Scalar>
297 bool negated =
false;
309 template <
typename MatrixType>
312 eigen_assert(
m_qr.rows() ==
m_qr.cols() &&
"You can't take the determinant of a non-square matrix!");
315 return m_qr.diagonal().prod() * detQ;
318 template <
typename MatrixType>
322 eigen_assert(
m_qr.rows() ==
m_qr.cols() &&
"You can't take the determinant of a non-square matrix!");
323 return abs(
m_qr.diagonal().prod());
326 template <
typename MatrixType>
329 eigen_assert(
m_qr.rows() ==
m_qr.cols() &&
"You can't take the determinant of a non-square matrix!");
330 return m_qr.diagonal().cwiseAbs().array().log().sum();
333 template <
typename MatrixType>
336 eigen_assert(
m_qr.rows() ==
m_qr.cols() &&
"You can't take the determinant of a non-square matrix!");
339 return detQ *
m_qr.diagonal().array().sign().prod();
345 template <
typename MatrixQR,
typename HCoeffs>
359 tempData = tempVector.data();
367 mat.col(
k).tail(remainingRows).makeHouseholderInPlace(
hCoeffs.coeffRef(
k),
beta);
371 mat.bottomRightCorner(remainingRows, remainingCols)
372 .applyHouseholderOnTheLeft(
mat.col(
k).tail(remainingRows - 1),
hCoeffs.coeffRef(
k), tempData +
k + 1);
385 template <
typename MatrixQR,
typename HCoeffs,
typename VectorQR>
399 mat.col(
k) = newColumn;
405 .applyHouseholderOnTheLeft(
mat.col(
i).tail(remainingRows - 1),
hCoeffs.coeffRef(
i), tempData +
i + 1);
414 template <
typename MatrixQR,
typename HCoeffs,
typename MatrixQRScalar =
typename MatrixQR::Scalar,
415 bool InnerStrideIsOne = (MatrixQR::InnerStrideAtCompileTime == 1 && HCoeffs::InnerStrideAtCompileTime == 1)>
430 tempData = tempVector.data();
436 for (
k = 0;
k <
size;
k += blockSize) {
449 BlockType A11_21 =
mat.block(
k,
k, brows, bs);
455 BlockType A21_22 =
mat.block(
k,
k + bs, brows, tcols);
464 #ifndef EIGEN_PARSED_BY_DOXYGEN
465 template <
typename MatrixType_>
466 template <
typename RhsType,
typename DstType>
470 typename RhsType::PlainObject
c(rhs);
474 m_qr.topLeftCorner(rank, rank).template triangularView<Upper>().solveInPlace(
c.topRows(rank));
476 dst.topRows(rank) =
c.topRows(rank);
477 dst.bottomRows(
cols() - rank).setZero();
480 template <
typename MatrixType_>
481 template <
bool Conjugate,
typename RhsType,
typename DstType>
485 typename RhsType::PlainObject
c(rhs);
487 m_qr.topLeftCorner(rank, rank)
488 .template triangularView<Upper>()
490 .template conjugateIf<Conjugate>()
491 .solveInPlace(
c.topRows(rank));
493 dst.topRows(rank) =
c.topRows(rank);
494 dst.bottomRows(
rows() - rank).setZero();
496 dst.applyOnTheLeft(
householderQ().setLength(rank).
template conjugateIf<!Conjugate>());
506 template <
typename MatrixType>
525 template <
typename Derived>
AnnoyingScalar abs(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:135
AnnoyingScalar conj(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:133
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
Definition: Macros.h:1149
#define eigen_assert(x)
Definition: Macros.h:910
#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE)
Definition: StaticAssert.h:74
Scalar * b
Definition: benchVecAdd.cpp:17
SCALAR Scalar
Definition: bench_gemm.cpp:45
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:46
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:110
Householder QR decomposition of a matrix.
Definition: HouseholderQR.h:59
MatrixType::Scalar signDeterminant() const
Definition: HouseholderQR.h:334
HouseholderQR(Index rows, Index cols)
Default Constructor with memory preallocation.
Definition: HouseholderQR.h:92
HouseholderQR(EigenBase< InputType > &matrix)
Constructs a QR factorization from a given matrix.
Definition: HouseholderQR.h:124
void computeInPlace()
Definition: HouseholderQR.h:507
HouseholderQR(const EigenBase< InputType > &matrix)
Constructs a QR factorization from a given matrix.
Definition: HouseholderQR.h:108
HouseholderSequence< MatrixType, internal::remove_all_t< typename HCoeffsType::ConjugateReturnType > > HouseholderSequenceType
Definition: HouseholderQR.h:76
MatrixType_ MatrixType
Definition: HouseholderQR.h:61
Index rows() const
Definition: HouseholderQR.h:248
MatrixType::Scalar determinant() const
Definition: HouseholderQR.h:310
MatrixType m_qr
Definition: HouseholderQR.h:270
const HCoeffsType & hCoeffs() const
Definition: HouseholderQR.h:255
internal::plain_diag_type< MatrixType >::type HCoeffsType
Definition: HouseholderQR.h:73
HouseholderSequenceType householderQ() const
Definition: HouseholderQR.h:160
HouseholderQR()
Default Constructor.
Definition: HouseholderQR.h:84
HCoeffsType m_hCoeffs
Definition: HouseholderQR.h:271
@ MaxRowsAtCompileTime
Definition: HouseholderQR.h:67
@ MaxColsAtCompileTime
Definition: HouseholderQR.h:68
MatrixType::RealScalar absDeterminant() const
Definition: HouseholderQR.h:319
const MatrixType & matrixQR() const
Definition: HouseholderQR.h:168
bool m_isInitialized
Definition: HouseholderQR.h:273
HouseholderQR & compute(const EigenBase< InputType > &matrix)
Definition: HouseholderQR.h:174
Index cols() const
Definition: HouseholderQR.h:249
SolverBase< HouseholderQR > Base
Definition: HouseholderQR.h:62
internal::plain_row_type< MatrixType >::type RowVectorType
Definition: HouseholderQR.h:74
void _solve_impl(const RhsType &rhs, DstType &dst) const
Definition: HouseholderQR.h:467
RowVectorType m_temp
Definition: HouseholderQR.h:272
MatrixType::RealScalar logAbsDeterminant() const
Definition: HouseholderQR.h:327
void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const
Definition: HouseholderQR.h:482
Sequence of Householder reflections acting on subspaces with decreasing size.
Definition: HouseholderSequence.h:117
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
const HouseholderQR< PlainObject > householderQr() const
Definition: HouseholderQR.h:526
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Definition: PlainObjectBase.h:294
Pseudo expression representing a solving operation.
Definition: Solve.h:62
A base class for matrix decomposition and solvers.
Definition: SolverBase.h:72
internal::traits< HouseholderQR< MatrixType_ > >::Scalar Scalar
Definition: SolverBase.h:75
constexpr EIGEN_DEVICE_FUNC HouseholderQR< MatrixType_ > & derived()
Definition: EigenBase.h:49
const Solve< HouseholderQR< MatrixType_ >, Rhs > solve(const MatrixBase< Rhs > &b) const
Definition: SolverBase.h:106
@ RowsAtCompileTime
Definition: SolverBase.h:82
const AdjointReturnType adjoint() const
Definition: SolverBase.h:136
Index cols() const
Definition: SparseMatrix.h:161
Scalar & coeffRef(Index row, Index col)
Definition: SparseMatrix.h:275
Index rows() const
Definition: SparseMatrix.h:159
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor >, 0, Eigen::OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: common.h:85
#define min(a, b)
Definition: datatypes.h:22
@ ColMajor
Definition: Constants.h:318
@ RowMajor
Definition: Constants.h:320
const unsigned int RowMajorBit
Definition: Constants.h:70
Scalar beta
Definition: level2_cplx_impl.h:36
char char char int int * k
Definition: level2_impl.h:374
void householder_qr_inplace_unblocked(MatrixQR &mat, HCoeffs &hCoeffs, typename MatrixQR::Scalar *tempData=0)
Definition: HouseholderQR.h:346
void householder_qr_inplace_update(MatrixQR &mat, HCoeffs &hCoeffs, const VectorQR &newColumn, typename MatrixQR::Index k, typename MatrixQR::Scalar *tempData)
Definition: HouseholderQR.h:386
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:70
auto run(Kernel kernel, Args &&... args) -> decltype(kernel(args...))
Definition: gpu_test_helper.h:414
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
CleanedUpDerType< DerType >::type() min(const AutoDiffScalar< DerType > &x, const T &y)
Definition: AutoDiffScalar.h:494
Extend namespace for flags.
Definition: fsi_chan_precond_driver.cc:56
int c
Definition: calibrate.py:100
Definition: Eigen_Colamd.h:49
internal::nested_eval< T, 1 >::type eval(const T &xpr)
Definition: sparse_permutations.cpp:47
Definition: EigenBase.h:33
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:43
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition: EigenBase.h:64
Definition: Constants.h:534
Definition: Constants.h:525
static void run(const HCoeffs &hCoeffs, Scalar &out_det)
Definition: HouseholderQR.h:296
Definition: HouseholderQR.h:280
static void run(const HCoeffs &hCoeffs, Scalar &out_det)
Definition: HouseholderQR.h:281
Definition: HouseholderQR.h:416
static void run(MatrixQR &mat, HCoeffs &hCoeffs, Index maxBlockSize=32, typename MatrixQR::Scalar *tempData=0)
Definition: HouseholderQR.h:418
std::conditional_t< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixDiagType, ArrayDiagType > type
Definition: XprHelper.h:797
std::conditional_t< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixRowType, ArrayRowType > type
Definition: XprHelper.h:768
MatrixXpr XprKind
Definition: HouseholderQR.h:23
int StorageIndex
Definition: HouseholderQR.h:25
SolverStorage StorageKind
Definition: HouseholderQR.h:24
Definition: ForwardDeclarations.h:21