mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
PR 567: makes all dense solvers inherit SoverBase (LU,Cholesky,QR,SVD).
This changeset also includes: * add HouseholderSequence::conjugateIf * define int as the StorageIndex type for all dense solvers * dedicated unit tests, including assertion checking * _check_solve_assertion(): this method can be implemented in derived solver classes to implement custom checks * CompleteOrthogonalDecompositions: add applyZOnTheLeftInPlace, fix scalar type in applyZAdjointOnTheLeftInPlace(), add missing assertions * Cholesky: add missing assertions * FullPivHouseholderQR: Corrected Scalar type in _solve_impl() * BDCSVD: Unambiguous return type for ternary operator * SVDBase: Corrected Scalar type in _solve_impl()
This commit is contained in:
@@ -156,6 +156,12 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS
|
||||
Side
|
||||
> TransposeReturnType;
|
||||
|
||||
typedef HouseholderSequence<
|
||||
typename internal::add_const<VectorsType>::type,
|
||||
typename internal::add_const<CoeffsType>::type,
|
||||
Side
|
||||
> ConstHouseholderSequence;
|
||||
|
||||
/** \brief Constructor.
|
||||
* \param[in] v %Matrix containing the essential parts of the Householder vectors
|
||||
* \param[in] h Vector containing the Householder coefficients
|
||||
@@ -244,6 +250,18 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS
|
||||
.setShift(m_shift);
|
||||
}
|
||||
|
||||
/** \returns an expression of the complex conjugate of \c *this if Cond==true,
|
||||
* returns \c *this otherwise.
|
||||
*/
|
||||
template<bool Cond>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline typename internal::conditional<Cond,ConjugateReturnType,ConstHouseholderSequence>::type
|
||||
conjugateIf() const
|
||||
{
|
||||
typedef typename internal::conditional<Cond,ConjugateReturnType,ConstHouseholderSequence>::type ReturnType;
|
||||
return ReturnType(m_vectors.template conjugateIf<Cond>(), m_coeffs.template conjugateIf<Cond>());
|
||||
}
|
||||
|
||||
/** \brief Adjoint (conjugate transpose) of the Householder sequence. */
|
||||
AdjointReturnType adjoint() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user