10 #ifndef EIGEN_SOLVEWITHGUESS_H 11 #define EIGEN_SOLVEWITHGUESS_H 15 template<
typename Decomposition,
typename RhsType,
typename GuessType>
class SolveWithGuess;
32 template<
typename Decomposition,
typename RhsType,
typename GuessType>
34 :
traits<Solve<Decomposition,RhsType> >
40 template<
typename Decomposition,
typename RhsType,
typename GuessType>
49 SolveWithGuess(
const Decomposition &dec,
const RhsType &rhs,
const GuessType &guess)
50 : m_dec(dec), m_rhs(rhs), m_guess(guess)
53 EIGEN_DEVICE_FUNC
Index rows()
const {
return m_dec.cols(); }
54 EIGEN_DEVICE_FUNC
Index cols()
const {
return m_rhs.cols(); }
56 EIGEN_DEVICE_FUNC
const Decomposition& dec()
const {
return m_dec; }
57 EIGEN_DEVICE_FUNC
const RhsType& rhs()
const {
return m_rhs; }
58 EIGEN_DEVICE_FUNC
const GuessType& guess()
const {
return m_guess; }
61 const Decomposition &m_dec;
63 const GuessType &m_guess;
67 Scalar coeff(
Index i)
const;
73 template<
typename Decomposition,
typename RhsType,
typename GuessType>
75 :
public evaluator<typename SolveWithGuess<Decomposition,RhsType,GuessType>::PlainObject>
78 typedef typename SolveType::PlainObject PlainObject;
82 : m_result(solve.rows(), solve.cols())
84 ::new (static_cast<Base*>(
this)) Base(m_result);
85 m_result = solve.guess();
86 solve.dec()._solve_with_guess_impl(solve.rhs(), m_result);
95 template<
typename DstXprType,
typename DecType,
typename RhsType,
typename GuessType,
typename Scalar>
101 Index dstRows = src.rows();
102 Index dstCols = src.cols();
103 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
104 dst.resize(dstRows, dstCols);
107 src.dec()._solve_with_guess_impl(src.rhs(), dst);
115 #endif // EIGEN_SOLVEWITHGUESS_H Pseudo expression representing a solving operation.
Definition: SolveWithGuess.h:15
Definition: CoreEvaluators.h:90
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
Definition: AssignmentFunctors.h:21
Definition: AssignEvaluator.h:753
Definition: AssignEvaluator.h:743
The type used to identify a matrix expression.
Definition: Constants.h:506
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Definition: BandTriangularSolver.h:13
Definition: XprHelper.h:481
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:55
Definition: ForwardDeclarations.h:17