1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
5//
6// This Source Code Form is subject to the terms of the Mozilla
7// Public License v. 2.0. If a copy of the MPL was not distributed
8// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
10#ifndef EIGEN_TRIANGULAR_SOLVER2_H
11#define EIGEN_TRIANGULAR_SOLVER2_H
12
13namespace Eigen {
14
15const unsigned int UnitDiagBit = UnitDiag;
16const unsigned int SelfAdjointBit = SelfAdjoint;
17const unsigned int UpperTriangularBit = Upper;
18const unsigned int LowerTriangularBit = Lower;
19
20const unsigned int UpperTriangular = Upper;
21const unsigned int LowerTriangular = Lower;
22const unsigned int UnitUpperTriangular = UnitUpper;
23const unsigned int UnitLowerTriangular = UnitLower;
24
25template<typename ExpressionType, unsigned int Added, unsigned int Removed>
26template<typename OtherDerived>
27typename ExpressionType::PlainObject
28Flagged<ExpressionType,Added,Removed>::solveTriangular(const MatrixBase<OtherDerived>& other) const
29{
30  return m_matrix.template triangularView<Added>().solve(other.derived());
31}
32
33template<typename ExpressionType, unsigned int Added, unsigned int Removed>
34template<typename OtherDerived>
35void Flagged<ExpressionType,Added,Removed>::solveTriangularInPlace(const MatrixBase<OtherDerived>& other) const
36{
37  m_matrix.template triangularView<Added>().solveInPlace(other.derived());
38}
39
40} // end namespace Eigen
41
42#endif // EIGEN_TRIANGULAR_SOLVER2_H
43