10 #ifndef EIGEN_TRIANGULAR_SOLVER_VECTOR_H 11 #define EIGEN_TRIANGULAR_SOLVER_VECTOR_H 17 template<
typename LhsScalar,
typename RhsScalar,
typename Index,
int Mode,
bool Conjugate,
int StorageOrder>
20 static void run(Index size,
const LhsScalar* _lhs, Index lhsStride, RhsScalar*
rhs)
25 >::run(size, _lhs, lhsStride, rhs);
30 template<
typename LhsScalar,
typename RhsScalar,
typename Index,
int Mode,
bool Conjugate>
36 static void run(Index size,
const LhsScalar* _lhs, Index lhsStride, RhsScalar*
rhs)
46 for(Index pi=IsLower ? 0 : size;
47 IsLower ? pi<size : pi>0;
48 IsLower ? pi+=PanelWidth : pi-=PanelWidth)
50 Index actualPanelWidth = (std::min)(IsLower ? size - pi : pi, PanelWidth);
52 Index r = IsLower ? pi : size - pi;
58 Index startRow = IsLower ? pi : pi-actualPanelWidth;
59 Index startCol = IsLower ? 0 : pi;
63 &lhs.coeffRef(startRow,startCol), lhsStride,
69 for(Index k=0; k<actualPanelWidth; ++k)
71 Index i = IsLower ? pi+k : pi-k-1;
72 Index s = IsLower ? pi : i+1;
84 template<
typename LhsScalar,
typename RhsScalar,
typename Index,
int Mode,
bool Conjugate>
90 static void run(Index size,
const LhsScalar* _lhs, Index lhsStride, RhsScalar*
rhs)
100 for(Index pi=IsLower ? 0 : size;
101 IsLower ? pi<size : pi>0;
102 IsLower ? pi+=PanelWidth : pi-=PanelWidth)
104 Index actualPanelWidth = (std::min)(IsLower ? size - pi : pi, PanelWidth);
105 Index startBlock = IsLower ? pi : pi-actualPanelWidth;
106 Index endBlock = IsLower ? pi + actualPanelWidth : 0;
108 for(Index k=0; k<actualPanelWidth; ++k)
110 Index i = IsLower ? pi+k : pi-k-1;
112 rhs[i] /= cjLhs.coeff(i,i);
114 Index r = actualPanelWidth - k - 1;
115 Index s = IsLower ? i+1 : i-r;
119 Index r = IsLower ? size - endBlock : startBlock;
127 &lhs.coeffRef(endBlock,startBlock), lhsStride,
129 rhs+endBlock, 1, RhsScalar(-1));
139 #endif // EIGEN_TRIANGULAR_SOLVER_VECTOR_H
A matrix or vector expression mapping an existing array of data.
static void run(Index size, const LhsScalar *_lhs, Index lhsStride, RhsScalar *rhs)
iterative scaling algorithm to equilibrate rows and column norms in matrices
static void run(Index size, const LhsScalar *_lhs, Index lhsStride, RhsScalar *rhs)
#define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH
void rhs(const real_t *x, real_t *f)
static void run(Index size, const LhsScalar *_lhs, Index lhsStride, RhsScalar *rhs)
Generic expression where a coefficient-wise unary operator is applied to an expression.
The matrix class, also used for vectors and row-vectors.
Convenience specialization of Stride to specify only an outer stride See class Map for some examples...