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 | |
---|
13 | namespace Eigen { |
---|
14 | |
---|
15 | const unsigned int UnitDiagBit = UnitDiag; |
---|
16 | const unsigned int SelfAdjointBit = SelfAdjoint; |
---|
17 | const unsigned int UpperTriangularBit = Upper; |
---|
18 | const unsigned int LowerTriangularBit = Lower; |
---|
19 | |
---|
20 | const unsigned int UpperTriangular = Upper; |
---|
21 | const unsigned int LowerTriangular = Lower; |
---|
22 | const unsigned int UnitUpperTriangular = UnitUpper; |
---|
23 | const unsigned int UnitLowerTriangular = UnitLower; |
---|
24 | |
---|
25 | template<typename ExpressionType, unsigned int Added, unsigned int Removed> |
---|
26 | template<typename OtherDerived> |
---|
27 | typename ExpressionType::PlainObject |
---|
28 | Flagged<ExpressionType,Added,Removed>::solveTriangular(const MatrixBase<OtherDerived>& other) const |
---|
29 | { |
---|
30 | return m_matrix.template triangularView<Added>().solve(other.derived()); |
---|
31 | } |
---|
32 | |
---|
33 | template<typename ExpressionType, unsigned int Added, unsigned int Removed> |
---|
34 | template<typename OtherDerived> |
---|
35 | void 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 |
---|