mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add triangular * vector product
This commit is contained in:
@@ -142,13 +142,17 @@ struct ei_traits<TriangularView<MatrixType, _Mode> > : ei_traits<MatrixType>
|
||||
};
|
||||
};
|
||||
|
||||
template<typename MatrixType, unsigned int _Mode> class TriangularView
|
||||
: public TriangularBase<TriangularView<MatrixType, _Mode> >
|
||||
template<typename Lhs,typename Rhs>
|
||||
struct ei_triangular_vector_product_returntype;
|
||||
|
||||
template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
||||
: public TriangularBase<TriangularView<_MatrixType, _Mode> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef TriangularBase<TriangularView> Base;
|
||||
typedef typename ei_traits<TriangularView>::Scalar Scalar;
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef typename MatrixType::PlainMatrixType PlainMatrixType;
|
||||
|
||||
enum {
|
||||
@@ -243,6 +247,13 @@ template<typename MatrixType, unsigned int _Mode> class TriangularView
|
||||
return res;
|
||||
}
|
||||
|
||||
template<typename OtherDerived>
|
||||
ei_triangular_vector_product_returntype<TriangularView,OtherDerived>
|
||||
operator*(const MatrixBase<OtherDerived>& rhs) const
|
||||
{
|
||||
return ei_triangular_vector_product_returntype<TriangularView,OtherDerived>(*this, rhs.derived(), 1);
|
||||
}
|
||||
|
||||
template<typename OtherDerived>
|
||||
typename ei_plain_matrix_type_column_major<OtherDerived>::type
|
||||
solve(const MatrixBase<OtherDerived>& other) const;
|
||||
|
||||
Reference in New Issue
Block a user