Go to the documentation of this file.
11 #ifndef EIGEN_SUITESPARSEQRSUPPORT_H
12 #define EIGEN_SUITESPARSEQRSUPPORT_H
16 template<
typename MatrixType>
class SPQR;
59 template<
typename _MatrixType>
90 cholmod_l_start(&
m_cc);
107 cholmod_l_start(&
m_cc);
114 cholmod_l_finish(&
m_cc);
118 cholmod_l_free_sparse(&
m_H, &
m_cc);
119 cholmod_l_free_sparse(&
m_cR, &
m_cc);
171 template<
typename Rhs,
typename Dest>
175 eigen_assert(
b.cols()==1 &&
"This method is for vectors only");
178 typename Dest::PlainObject
y, y2;
185 y.topRows(rk) = this->
matrixR().topLeftCorner(rk, rk).template triangularView<Upper>().solve(y2.topRows(rk));
205 m_R = viewAsEigen<Scalar,ColMajor, typename MatrixType::StorageIndex>(*
m_cR);
228 return m_cc.SPQR_istat[4];
264 mutable cholmod_sparse *
m_H;
274 template <
typename SPQRType,
typename Derived>
285 template<
typename ResType>
291 cholmod_common *cc =
m_spqr.cholmodCommon();
293 x_cd = SuiteSparseQR_qmult<Scalar>(method,
m_spqr.m_H,
m_spqr.m_HTau,
m_spqr.m_HPinv, &y_cd, cc);
295 cholmod_l_free_dense(&x_cd, cc);
302 template<
typename SPQRType>
306 template<
typename Derived>
323 template<
typename SPQRType>
326 template<
typename Derived>
cholmod_common * cholmodCommon() const
void compute(const _MatrixType &matrix)
Map< PermutationMatrix< Dynamic, Dynamic, StorageIndex > > PermutationType
Namespace containing all symbols from the Eigen library.
EIGEN_DEVICE_FUNC Derived & setZero()
SPQR_QProduct(const SPQRType &spqr, const Derived &other, bool transpose)
SPQRType::MatrixType ReturnType
SPQRMatrixQReturnType< SPQR > matrixQ() const
Get an expression of the matrix Q.
SPQR_QProduct< SPQRType, Derived > operator*(const MatrixBase< Derived > &other)
void setSPQROrdering(int ord)
Set the fill-reducing ordering method to be used.
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Derived::PlainObject ReturnType
SPQR_QProduct< SPQRType, Derived > operator*(const MatrixBase< Derived > &other)
SPQRMatrixQTransposeReturnType< SPQRType > transpose() const
void setPivotThreshold(const RealScalar &tol)
Set the tolerance tol to treat columns with 2-norm < =tol as zero.
cholmod_sparse viewAsCholmod(Ref< SparseMatrix< _Scalar, _Options, _StorageIndex > > mat)
SparseMatrix< Scalar, ColMajor, StorageIndex > MatrixType
PermutationType colsPermutation() const
Get the permutation that was applied to columns of A.
_MatrixType::Scalar Scalar
_MatrixType::RealScalar RealScalar
SparseSolverBase< SPQR< _MatrixType > > Base
bool m_useDefaultThreshold
ComputationInfo info() const
Reports whether previous computation was successful.
A matrix or vector expression mapping an existing array of data.
static ConstMapType Map(const Scalar *data)
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
const MatrixType matrixR() const
SPQRType::StorageIndex StorageIndex
NumTraits< Scalar >::Real RealScalar
Sparse QR factorization based on SuiteSparseQR library.
A base class for sparse solvers.
SPQRMatrixQTransposeReturnType< SPQRType > adjoint() const
SPQRType::MatrixType ReturnType
SPQRMatrixQTransposeReturnType(const SPQRType &spqr)
SPQR(const _MatrixType &matrix)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
Base class for all dense matrices, vectors, and expressions.
SuiteSparse_long StorageIndex
void evalTo(ResType &res) const
SPQRMatrixQReturnType(const SPQRType &spqr)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
void _solve_impl(const MatrixBase< Rhs > &b, MatrixBase< Dest > &dest) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:03:52