PartialPivLU.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2006-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
5 // Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_PARTIALLU_H
12 #define EIGEN_PARTIALLU_H
13 
14 // IWYU pragma: private
15 #include "./InternalHeaderCheck.h"
16 
17 namespace Eigen {
18 
19 namespace internal {
20 template <typename MatrixType_, typename PermutationIndex_>
21 struct traits<PartialPivLU<MatrixType_, PermutationIndex_> > : traits<MatrixType_> {
22  typedef MatrixXpr XprKind;
24  typedef PermutationIndex_ StorageIndex;
26  enum { Flags = BaseTraits::Flags & RowMajorBit, CoeffReadCost = Dynamic };
27 };
28 
29 template <typename T, typename Derived>
31 // {
32 // typedef Derived type;
33 // };
34 
35 template <typename T, typename Derived>
36 struct enable_if_ref<Ref<T>, Derived> {
37  typedef Derived type;
38 };
39 
40 } // end namespace internal
41 
76 template <typename MatrixType_, typename PermutationIndex_>
77 class PartialPivLU : public SolverBase<PartialPivLU<MatrixType_, PermutationIndex_> > {
78  public:
79  typedef MatrixType_ MatrixType;
81  friend class SolverBase<PartialPivLU>;
82 
84  enum {
85  MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
86  MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
87  };
88  using PermutationIndex = PermutationIndex_;
91  typedef typename MatrixType::PlainObject PlainObject;
92 
100 
108 
116  template <typename InputType>
118 
126  template <typename InputType>
128 
129  template <typename InputType>
131  m_lu = matrix.derived();
132  compute();
133  return *this;
134  }
135 
142  inline const MatrixType& matrixLU() const {
143  eigen_assert(m_isInitialized && "PartialPivLU is not initialized.");
144  return m_lu;
145  }
146 
149  inline const PermutationType& permutationP() const {
150  eigen_assert(m_isInitialized && "PartialPivLU is not initialized.");
151  return m_p;
152  }
153 
154 #ifdef EIGEN_PARSED_BY_DOXYGEN
172  template <typename Rhs>
173  inline const Solve<PartialPivLU, Rhs> solve(const MatrixBase<Rhs>& b) const;
174 #endif
175 
179  inline RealScalar rcond() const {
180  eigen_assert(m_isInitialized && "PartialPivLU is not initialized.");
182  }
183 
191  inline const Inverse<PartialPivLU> inverse() const {
192  eigen_assert(m_isInitialized && "PartialPivLU is not initialized.");
193  return Inverse<PartialPivLU>(*this);
194  }
195 
210 
212 
213  EIGEN_CONSTEXPR inline Index rows() const EIGEN_NOEXCEPT { return m_lu.rows(); }
214  EIGEN_CONSTEXPR inline Index cols() const EIGEN_NOEXCEPT { return m_lu.cols(); }
215 
216 #ifndef EIGEN_PARSED_BY_DOXYGEN
217  template <typename RhsType, typename DstType>
218  EIGEN_DEVICE_FUNC void _solve_impl(const RhsType& rhs, DstType& dst) const {
219  /* The decomposition PA = LU can be rewritten as A = P^{-1} L U.
220  * So we proceed as follows:
221  * Step 1: compute c = Pb.
222  * Step 2: replace c by the solution x to Lx = c.
223  * Step 3: replace c by the solution x to Ux = c.
224  */
225 
226  // Step 1
227  dst = permutationP() * rhs;
228 
229  // Step 2
230  m_lu.template triangularView<UnitLower>().solveInPlace(dst);
231 
232  // Step 3
233  m_lu.template triangularView<Upper>().solveInPlace(dst);
234  }
235 
236  template <bool Conjugate, typename RhsType, typename DstType>
237  EIGEN_DEVICE_FUNC void _solve_impl_transposed(const RhsType& rhs, DstType& dst) const {
238  /* The decomposition PA = LU can be rewritten as A^T = U^T L^T P.
239  * So we proceed as follows:
240  * Step 1: compute c as the solution to L^T c = b
241  * Step 2: replace c by the solution x to U^T x = c.
242  * Step 3: update c = P^-1 c.
243  */
244 
245  eigen_assert(rhs.rows() == m_lu.cols());
246 
247  // Step 1
248  dst = m_lu.template triangularView<Upper>().transpose().template conjugateIf<Conjugate>().solve(rhs);
249  // Step 2
250  m_lu.template triangularView<UnitLower>().transpose().template conjugateIf<Conjugate>().solveInPlace(dst);
251  // Step 3
252  dst = permutationP().transpose() * dst;
253  }
254 #endif
255 
256  protected:
258 
259  void compute();
260 
265  signed char m_det_p;
267 };
268 
269 template <typename MatrixType, typename PermutationIndex>
271  : m_lu(), m_p(), m_rowsTranspositions(), m_l1_norm(0), m_det_p(0), m_isInitialized(false) {}
272 
273 template <typename MatrixType, typename PermutationIndex>
276 
277 template <typename MatrixType, typename PermutationIndex>
278 template <typename InputType>
280  : m_lu(matrix.rows(), matrix.cols()),
281  m_p(matrix.rows()),
282  m_rowsTranspositions(matrix.rows()),
283  m_l1_norm(0),
284  m_det_p(0),
285  m_isInitialized(false) {
286  compute(matrix.derived());
287 }
288 
289 template <typename MatrixType, typename PermutationIndex>
290 template <typename InputType>
292  : m_lu(matrix.derived()),
293  m_p(matrix.rows()),
294  m_rowsTranspositions(matrix.rows()),
295  m_l1_norm(0),
296  m_det_p(0),
297  m_isInitialized(false) {
298  compute();
299 }
300 
301 namespace internal {
302 
304 template <typename Scalar, int StorageOrder, typename PivIndex, int SizeAtCompileTime = Dynamic>
306  static constexpr int UnBlockedBound = 16;
307  static constexpr bool UnBlockedAtCompileTime = SizeAtCompileTime != Dynamic && SizeAtCompileTime <= UnBlockedBound;
308  static constexpr int ActualSizeAtCompileTime = UnBlockedAtCompileTime ? SizeAtCompileTime : Dynamic;
309  // Remaining rows and columns at compile-time:
310  static constexpr int RRows = SizeAtCompileTime == 2 ? 1 : Dynamic;
311  static constexpr int RCols = SizeAtCompileTime == 2 ? 1 : Dynamic;
316 
327  static Index unblocked_lu(MatrixTypeRef& lu, PivIndex* row_transpositions, PivIndex& nb_transpositions) {
328  typedef scalar_score_coeff_op<Scalar> Scoring;
329  typedef typename Scoring::result_type Score;
330  const Index rows = lu.rows();
331  const Index cols = lu.cols();
332  const Index size = (std::min)(rows, cols);
333  // For small compile-time matrices it is worth processing the last row separately:
334  // speedup: +100% for 2x2, +10% for others.
335  const Index endk = UnBlockedAtCompileTime ? size - 1 : size;
336  nb_transpositions = 0;
337  Index first_zero_pivot = -1;
338  for (Index k = 0; k < endk; ++k) {
339  int rrows = internal::convert_index<int>(rows - k - 1);
340  int rcols = internal::convert_index<int>(cols - k - 1);
341 
342  Index row_of_biggest_in_col;
343  Score biggest_in_corner = lu.col(k).tail(rows - k).unaryExpr(Scoring()).maxCoeff(&row_of_biggest_in_col);
344  row_of_biggest_in_col += k;
345 
346  row_transpositions[k] = PivIndex(row_of_biggest_in_col);
347 
348  if (!numext::is_exactly_zero(biggest_in_corner)) {
349  if (k != row_of_biggest_in_col) {
350  lu.row(k).swap(lu.row(row_of_biggest_in_col));
351  ++nb_transpositions;
352  }
353 
354  lu.col(k).tail(fix<RRows>(rrows)) /= lu.coeff(k, k);
355  } else if (first_zero_pivot == -1) {
356  // the pivot is exactly zero, we record the index of the first pivot which is exactly 0,
357  // and continue the factorization such we still have A = PLU
358  first_zero_pivot = k;
359  }
360 
361  if (k < rows - 1)
362  lu.bottomRightCorner(fix<RRows>(rrows), fix<RCols>(rcols)).noalias() -=
363  lu.col(k).tail(fix<RRows>(rrows)) * lu.row(k).tail(fix<RCols>(rcols));
364  }
365 
366  // special handling of the last entry
368  Index k = endk;
369  row_transpositions[k] = PivIndex(k);
370  if (numext::is_exactly_zero(Scoring()(lu(k, k))) && first_zero_pivot == -1) first_zero_pivot = k;
371  }
372 
373  return first_zero_pivot;
374  }
375 
391  static Index blocked_lu(Index rows, Index cols, Scalar* lu_data, Index luStride, PivIndex* row_transpositions,
392  PivIndex& nb_transpositions, Index maxBlockSize = 256) {
393  MatrixTypeRef lu = MatrixType::Map(lu_data, rows, cols, OuterStride<>(luStride));
394 
395  const Index size = (std::min)(rows, cols);
396 
397  // if the matrix is too small, no blocking:
399  return unblocked_lu(lu, row_transpositions, nb_transpositions);
400  }
401 
402  // automatically adjust the number of subdivisions to the size
403  // of the matrix so that there is enough sub blocks:
404  Index blockSize;
405  {
406  blockSize = size / 8;
407  blockSize = (blockSize / 16) * 16;
408  blockSize = (std::min)((std::max)(blockSize, Index(8)), maxBlockSize);
409  }
410 
411  nb_transpositions = 0;
412  Index first_zero_pivot = -1;
413  for (Index k = 0; k < size; k += blockSize) {
414  Index bs = (std::min)(size - k, blockSize); // actual size of the block
415  Index trows = rows - k - bs; // trailing rows
416  Index tsize = size - k - bs; // trailing size
417 
418  // partition the matrix:
419  // A00 | A01 | A02
420  // lu = A_0 | A_1 | A_2 = A10 | A11 | A12
421  // A20 | A21 | A22
422  BlockType A_0 = lu.block(0, 0, rows, k);
423  BlockType A_2 = lu.block(0, k + bs, rows, tsize);
424  BlockType A11 = lu.block(k, k, bs, bs);
425  BlockType A12 = lu.block(k, k + bs, bs, tsize);
426  BlockType A21 = lu.block(k + bs, k, trows, bs);
427  BlockType A22 = lu.block(k + bs, k + bs, trows, tsize);
428 
429  PivIndex nb_transpositions_in_panel;
430  // recursively call the blocked LU algorithm on [A11^T A21^T]^T
431  // with a very small blocking size:
432  Index ret = blocked_lu(trows + bs, bs, &lu.coeffRef(k, k), luStride, row_transpositions + k,
433  nb_transpositions_in_panel, 16);
434  if (ret >= 0 && first_zero_pivot == -1) first_zero_pivot = k + ret;
435 
436  nb_transpositions += nb_transpositions_in_panel;
437  // update permutations and apply them to A_0
438  for (Index i = k; i < k + bs; ++i) {
439  Index piv = (row_transpositions[i] += internal::convert_index<PivIndex>(k));
440  A_0.row(i).swap(A_0.row(piv));
441  }
442 
443  if (trows) {
444  // apply permutations to A_2
445  for (Index i = k; i < k + bs; ++i) A_2.row(i).swap(A_2.row(row_transpositions[i]));
446 
447  // A12 = A11^-1 A12
448  A11.template triangularView<UnitLower>().solveInPlace(A12);
449 
450  A22.noalias() -= A21 * A12;
451  }
452  }
453  return first_zero_pivot;
454  }
455 };
456 
459 template <typename MatrixType, typename TranspositionType>
460 void partial_lu_inplace(MatrixType& lu, TranspositionType& row_transpositions,
461  typename TranspositionType::StorageIndex& nb_transpositions) {
462  // Special-case of zero matrix.
463  if (lu.rows() == 0 || lu.cols() == 0) {
464  nb_transpositions = 0;
465  return;
466  }
467  eigen_assert(lu.cols() == row_transpositions.size());
468  eigen_assert(row_transpositions.size() < 2 ||
469  (&row_transpositions.coeffRef(1) - &row_transpositions.coeffRef(0)) == 1);
470 
471  partial_lu_impl<typename MatrixType::Scalar, MatrixType::Flags & RowMajorBit ? RowMajor : ColMajor,
472  typename TranspositionType::StorageIndex,
473  internal::min_size_prefer_fixed(MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime)>::
474  blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0, 0), lu.outerStride(), &row_transpositions.coeffRef(0),
475  nb_transpositions);
476 }
477 
478 } // end namespace internal
479 
480 template <typename MatrixType, typename PermutationIndex>
483 
484  if (m_lu.cols() > 0)
485  m_l1_norm = m_lu.cwiseAbs().colwise().sum().maxCoeff();
486  else
487  m_l1_norm = RealScalar(0);
488 
489  eigen_assert(m_lu.rows() == m_lu.cols() && "PartialPivLU is only for square (and moreover invertible) matrices");
490  const Index size = m_lu.rows();
491 
492  m_rowsTranspositions.resize(size);
493 
494  typename TranspositionType::StorageIndex nb_transpositions;
495  internal::partial_lu_inplace(m_lu, m_rowsTranspositions, nb_transpositions);
496  m_det_p = (nb_transpositions % 2) ? -1 : 1;
497 
498  m_p = m_rowsTranspositions;
499 
500  m_isInitialized = true;
501 }
502 
503 template <typename MatrixType, typename PermutationIndex>
505  const {
506  eigen_assert(m_isInitialized && "PartialPivLU is not initialized.");
507  return Scalar(m_det_p) * m_lu.diagonal().prod();
508 }
509 
513 template <typename MatrixType, typename PermutationIndex>
515  eigen_assert(m_isInitialized && "LU is not initialized.");
516  // LU
517  MatrixType res = m_lu.template triangularView<UnitLower>().toDenseMatrix() * m_lu.template triangularView<Upper>();
518 
519  // P^{-1}(LU)
520  res = m_p.inverse() * res;
521 
522  return res;
523 }
524 
525 /***** Implementation details *****************************************************/
526 
527 namespace internal {
528 
529 /***** Implementation of inverse() *****************************************************/
530 template <typename DstXprType, typename MatrixType, typename PermutationIndex>
531 struct Assignment<
532  DstXprType, Inverse<PartialPivLU<MatrixType, PermutationIndex> >,
533  internal::assign_op<typename DstXprType::Scalar, typename PartialPivLU<MatrixType, PermutationIndex>::Scalar>,
534  Dense2Dense> {
537  static void run(DstXprType& dst, const SrcXprType& src,
539  dst = src.nestedExpression().solve(MatrixType::Identity(src.rows(), src.cols()));
540  }
541 };
542 } // end namespace internal
543 
544 /******** MatrixBase methods *******/
545 
552 template <typename Derived>
553 template <typename PermutationIndex>
554 inline const PartialPivLU<typename MatrixBase<Derived>::PlainObject, PermutationIndex>
557 }
558 
567 template <typename Derived>
568 template <typename PermutationIndex>
571 }
572 
573 } // end namespace Eigen
574 
575 #endif // EIGEN_PARTIALLU_H
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
Definition: Macros.h:1149
#define EIGEN_NOEXCEPT
Definition: Macros.h:1267
#define EIGEN_CONSTEXPR
Definition: Macros.h:758
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define eigen_assert(x)
Definition: Macros.h:910
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE)
Definition: StaticAssert.h:74
int rows
Definition: Tutorial_commainit_02.cpp:1
int cols
Definition: Tutorial_commainit_02.cpp:1
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
Scalar * b
Definition: benchVecAdd.cpp:17
SCALAR Scalar
Definition: bench_gemm.cpp:45
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:46
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
Expression of the inverse of another expression.
Definition: Inverse.h:43
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: Inverse.h:55
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: Inverse.h:54
EIGEN_DEVICE_FUNC const XprTypeNestedCleaned & nestedExpression() const
Definition: Inverse.h:57
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
const PartialPivLU< PlainObject, PermutationIndex > lu() const
const PartialPivLU< PlainObject, PermutationIndex > partialPivLu() const
Convenience specialization of Stride to specify only an outer stride See class Map for some examples.
Definition: Stride.h:104
LU decomposition of a matrix with partial pivoting, and related features.
Definition: PartialPivLU.h:77
bool m_isInitialized
Definition: PartialPivLU.h:266
SolverBase< PartialPivLU > Base
Definition: PartialPivLU.h:80
MatrixType_ MatrixType
Definition: PartialPivLU.h:79
PartialPivLU(Index size)
Default Constructor with memory preallocation.
Definition: PartialPivLU.h:274
RealScalar m_l1_norm
Definition: PartialPivLU.h:264
EIGEN_DEVICE_FUNC void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const
Definition: PartialPivLU.h:237
TranspositionType m_rowsTranspositions
Definition: PartialPivLU.h:263
PermutationType m_p
Definition: PartialPivLU.h:262
PartialPivLU & compute(const EigenBase< InputType > &matrix)
Definition: PartialPivLU.h:130
MatrixType::PlainObject PlainObject
Definition: PartialPivLU.h:91
MatrixType reconstructedMatrix() const
Definition: PartialPivLU.h:514
const PermutationType & permutationP() const
Definition: PartialPivLU.h:149
signed char m_det_p
Definition: PartialPivLU.h:265
MatrixType m_lu
Definition: PartialPivLU.h:261
void compute()
Definition: PartialPivLU.h:481
PermutationIndex_ PermutationIndex
Definition: PartialPivLU.h:88
RealScalar rcond() const
Definition: PartialPivLU.h:179
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: PartialPivLU.h:213
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: PartialPivLU.h:214
PartialPivLU(const EigenBase< InputType > &matrix)
Definition: PartialPivLU.h:279
PartialPivLU()
Default Constructor.
Definition: PartialPivLU.h:270
Transpositions< RowsAtCompileTime, MaxRowsAtCompileTime, PermutationIndex > TranspositionType
Definition: PartialPivLU.h:90
@ MaxRowsAtCompileTime
Definition: PartialPivLU.h:85
@ MaxColsAtCompileTime
Definition: PartialPivLU.h:86
const Inverse< PartialPivLU > inverse() const
Definition: PartialPivLU.h:191
PartialPivLU(EigenBase< InputType > &matrix)
Definition: PartialPivLU.h:291
EIGEN_DEVICE_FUNC void _solve_impl(const RhsType &rhs, DstType &dst) const
Definition: PartialPivLU.h:218
const MatrixType & matrixLU() const
Definition: PartialPivLU.h:142
Scalar determinant() const
Definition: PartialPivLU.h:504
PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime, PermutationIndex > PermutationType
Definition: PartialPivLU.h:89
InverseReturnType transpose() const
Definition: PermutationMatrix.h:177
NumTraits< Scalar >::Real RealScalar
Definition: PlainObjectBase.h:130
static ConstMapType Map(const Scalar *data)
Definition: PlainObjectBase.h:595
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:264
Pseudo expression representing a solving operation.
Definition: Solve.h:62
A base class for matrix decomposition and solvers.
Definition: SolverBase.h:72
internal::traits< Derived >::Scalar Scalar
Definition: SolverBase.h:75
const Solve< PartialPivLU< MatrixType_, PermutationIndex_ >, Rhs > solve(const MatrixBase< Rhs > &b) const
Definition: SolverBase.h:106
IndicesType::Scalar StorageIndex
Definition: Transpositions.h:147
cout<< "Here is the matrix m:"<< endl<< m<< endl;Eigen::FullPivLU< Matrix5x3 > lu(m)
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor >, 0, Eigen::OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: common.h:85
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
@ ColMajor
Definition: Constants.h:318
@ RowMajor
Definition: Constants.h:320
const unsigned int RowMajorBit
Definition: Constants.h:70
Eigen::DenseIndex ret
Definition: level1_cplx_impl.h:43
char char char int int * k
Definition: level2_impl.h:374
void partial_lu_inplace(MatrixType &lu, TranspositionType &row_transpositions, typename TranspositionType::StorageIndex &nb_transpositions)
Definition: PartialPivLU.h:460
constexpr int min_size_prefer_fixed(A a, B b)
Definition: Meta.h:683
Decomposition::RealScalar rcond_estimate_helper(typename Decomposition::RealScalar matrix_norm, const Decomposition &dec)
Reciprocal condition number estimator.
Definition: ConditionEstimator.h:157
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool is_exactly_zero(const X &x)
Definition: Meta.h:592
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
const int Dynamic
Definition: Constants.h:25
Extend namespace for flags.
Definition: fsi_chan_precond_driver.cc:56
Definition: Eigen_Colamd.h:49
internal::nested_eval< T, 1 >::type eval(const T &xpr)
Definition: sparse_permutations.cpp:47
Definition: EigenBase.h:33
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:43
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition: EigenBase.h:64
Definition: Constants.h:534
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
Definition: Constants.h:525
static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op< typename DstXprType::Scalar, typename LuType::Scalar > &)
Definition: PartialPivLU.h:537
Definition: AssignEvaluator.h:773
Definition: AssignEvaluator.h:756
Template functor for scalar/packet assignment.
Definition: AssignmentFunctors.h:25
Derived type
Definition: PartialPivLU.h:37
Definition: PartialPivLU.h:30
Definition: PartialPivLU.h:305
static constexpr int RCols
Definition: PartialPivLU.h:311
Matrix< Scalar, ActualSizeAtCompileTime, ActualSizeAtCompileTime, StorageOrder > MatrixType
Definition: PartialPivLU.h:312
static Index blocked_lu(Index rows, Index cols, Scalar *lu_data, Index luStride, PivIndex *row_transpositions, PivIndex &nb_transpositions, Index maxBlockSize=256)
Definition: PartialPivLU.h:391
static constexpr int UnBlockedBound
Definition: PartialPivLU.h:306
Ref< Matrix< Scalar, Dynamic, Dynamic, StorageOrder > > BlockType
Definition: PartialPivLU.h:314
Ref< MatrixType > MatrixTypeRef
Definition: PartialPivLU.h:313
static constexpr int RRows
Definition: PartialPivLU.h:310
static constexpr bool UnBlockedAtCompileTime
Definition: PartialPivLU.h:307
static constexpr int ActualSizeAtCompileTime
Definition: PartialPivLU.h:308
static Index unblocked_lu(MatrixTypeRef &lu, PivIndex *row_transpositions, PivIndex &nb_transpositions)
Definition: PartialPivLU.h:327
MatrixType::RealScalar RealScalar
Definition: PartialPivLU.h:315
Template functor to compute the score of a scalar, to chose a pivot.
Definition: functors/UnaryFunctors.h:63
traits< MatrixType_ > BaseTraits
Definition: PartialPivLU.h:25
PermutationIndex_ StorageIndex
Definition: PartialPivLU.h:24
Definition: ForwardDeclarations.h:21