Go to the documentation of this file.
10 #ifndef EIGEN_SPARSETRIANGULARSOLVER_H
11 #define EIGEN_SPARSETRIANGULARSOLVER_H
17 template<
typename Lhs,
typename Rhs,
int Mode,
18 int UpLo = (Mode &
Lower)
27 template<
typename Lhs,
typename Rhs,
int Mode>
46 lastIndex = it.index();
49 tmp -= lastVal *
other.coeff(lastIndex,
col);
64 template<
typename Lhs,
typename Rhs,
int Mode>
75 for(
Index i=lhs.rows()-1 ;
i>=0 ; --
i)
80 while(it && it.index()<
i)
88 else if (it && it.index() ==
i)
92 tmp -= it.value() *
other.coeff(it.index(),
col);
103 template<
typename Lhs,
typename Rhs,
int Mode>
120 while(it && it.index()<
i)
127 if (it && it.index()==
i)
130 other.coeffRef(it.index(),
col) -= tmp * it.value();
138 template<
typename Lhs,
typename Rhs,
int Mode>
149 for(
Index i=lhs.cols()-1;
i>=0; --
i)
158 while(it && it.index()!=
i)
164 for(; it && it.index()<
i; ++it)
165 other.coeffRef(it.index(),
col) -= tmp * it.value();
174 #ifndef EIGEN_PARSED_BY_DOXYGEN
176 template<
typename ExpressionType,
unsigned int Mode>
177 template<
typename OtherDerived>
178 void TriangularViewImpl<ExpressionType,Mode,Sparse>::solveInPlace(MatrixBase<OtherDerived>&
other)
const
185 typedef typename internal::conditional<
copy,
187 OtherCopy otherCopy(
other.derived());
200 template<
typename Lhs,
typename Rhs,
int Mode,
201 int UpLo = (Mode &
Lower)
210 template<
typename Lhs,
typename Rhs,
int Mode,
int UpLo>
218 const bool IsLower = (UpLo==
Lower);
228 tempVector.
init(.99);
231 for (
typename Rhs::InnerIterator rhsIt(
other,
col); rhsIt; ++rhsIt)
233 tempVector.
coeffRef(rhsIt.index()) = rhsIt.value();
236 for(
Index i=IsLower?0:lhs.cols()-1;
237 IsLower?
i<lhs.cols():
i>=0;
245 typename Lhs::InnerIterator it(lhs,
i);
254 ci /= lhs.coeff(
i,
i);
262 tempVector.
coeffRef(it.index()) -= ci * it.value();
266 for(; it && it.index()<
i; ++it)
267 tempVector.
coeffRef(it.index()) -= ci * it.value();
279 res.insert(it.index(),
col) = it.value();
290 #ifndef EIGEN_PARSED_BY_DOXYGEN
291 template<
typename ExpressionType,
unsigned int Mode>
292 template<
typename OtherDerived>
293 void TriangularViewImpl<ExpressionType,Mode,Sparse>::solveInPlace(SparseMatrixBase<OtherDerived>&
other)
const
313 #endif // EIGEN_SPARSETRIANGULARSOLVER_H
static void run(const Lhs &lhs, Rhs &other)
Namespace containing all symbols from the Eigen library.
const unsigned int RowMajorBit
evaluator< Lhs >::InnerIterator LhsIterator
int EIGEN_BLAS_FUNC() copy(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
static void run(const Lhs &lhs, Rhs &other)
static void run(const Lhs &lhs, Rhs &other)
static void run(const Lhs &lhs, Rhs &other)
evaluator< Lhs >::InnerIterator LhsIterator
void setBounds(Index start, Index end)
Matrix< typename traits< T >::Scalar, Rows, Cols,(MaxRows==1 &&MaxCols!=1) ? RowMajor :ColMajor, MaxRows, MaxCols > type
void init(double estimatedDensity)
evaluator< Lhs >::InnerIterator LhsIterator
Scalar & coeffRef(Index i)
static void run(const Lhs &lhs, Rhs &other)
evaluator< Lhs >::InnerIterator LhsIterator
promote_index_type< typename traits< Lhs >::StorageIndex, typename traits< Rhs >::StorageIndex >::type StorageIndex
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:18:14