10 #ifndef EIGEN_BAND_TRIANGULARSOLVER_H
11 #define EIGEN_BAND_TRIANGULARSOLVER_H
18 template<
typename Index,
int Mode,
typename LhsScalar,
bool ConjLhs,
typename RhsScalar,
int StorageOrder>
22 template<
typename Index,
int Mode,
typename LhsScalar,
bool ConjLhs,
typename RhsScalar>
25 typedef Map<const Matrix<LhsScalar,Dynamic,Dynamic,RowMajor>, 0, OuterStride<> >
LhsMap;
26 typedef Map<Matrix<RhsScalar,Dynamic,1> >
RhsMap;
27 enum { IsLower = (Mode&
Lower) ? 1 : 0 };
30 const LhsMap lhs(_lhs,
size,k+1,OuterStride<>(lhsStride));
32 typename internal::conditional<
34 const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>,
LhsMap>,
40 for(
int ii=0; ii<
size; ++ii)
42 int i = IsLower ? ii :
size-ii-1;
44 int actual_start = IsLower ? k-actual_k : 1;
47 other.coeffRef(
i,
col) -= cjLhs.row(
i).segment(actual_start,actual_k).transpose()
48 .cwiseProduct(
other.col(
col).segment(IsLower ?
i-actual_k :
i+1,actual_k)).sum();
51 other.coeffRef(
i,
col) /= cjLhs(
i,IsLower ? k : 0);
58 template<
typename Index,
int Mode,
typename LhsScalar,
bool ConjLhs,
typename RhsScalar>
61 typedef Map<const Matrix<LhsScalar,Dynamic,Dynamic,ColMajor>, 0, OuterStride<> >
LhsMap;
62 typedef Map<Matrix<RhsScalar,Dynamic,1> >
RhsMap;
63 enum { IsLower = (Mode&
Lower) ? 1 : 0 };
66 const LhsMap lhs(_lhs,k+1,
size,OuterStride<>(lhsStride));
68 typename internal::conditional<
70 const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>,
LhsMap>,
76 for(
int ii=0; ii<
size; ++ii)
78 int i = IsLower ? ii :
size-ii-1;
80 int actual_start = IsLower ? 1 : k-actual_k;
83 other.coeffRef(
i,
col) /= cjLhs(IsLower ? 0 : k,
i);
86 other.col(
col).segment(IsLower ?
i+1 :
i-actual_k, actual_k)
87 -=
other.coeff(
i,
col) * cjLhs.col(
i).segment(actual_start,actual_k);
97 #endif // EIGEN_BAND_TRIANGULARSOLVER_H