SparseLUImpl.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) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 #ifndef SPARSELU_IMPL_H
10 #define SPARSELU_IMPL_H
11 
12 namespace Eigen {
13 namespace internal {
14 
19 template <typename Scalar, typename StorageIndex>
21 {
22  public:
32 
33  protected:
34  template <typename VectorType>
35  Index expand(VectorType& vec, Index& length, Index nbElts, Index keep_prev, Index& num_expansions);
36  Index memInit(Index m, Index n, Index annz, Index lwork, Index fillratio, Index panel_size, GlobalLU_t& glu);
37  template <typename VectorType>
38  Index memXpand(VectorType& vec, Index& maxlen, Index nbElts, MemType memtype, Index& num_expansions);
39  void heap_relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end);
40  void relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end);
41  Index snode_dfs(const Index jcol, const Index kcol,const MatrixType& mat, IndexVector& xprune, IndexVector& marker, GlobalLU_t& glu);
42  Index snode_bmod (const Index jcol, const Index fsupc, ScalarVector& dense, GlobalLU_t& glu);
43  Index pivotL(const Index jcol, const RealScalar& diagpivotthresh, IndexVector& perm_r, IndexVector& iperm_c, Index& pivrow, GlobalLU_t& glu);
44  template <typename Traits>
45  void dfs_kernel(const StorageIndex jj, IndexVector& perm_r,
46  Index& nseg, IndexVector& panel_lsub, IndexVector& segrep,
47  Ref<IndexVector> repfnz_col, IndexVector& xprune, Ref<IndexVector> marker, IndexVector& parent,
48  IndexVector& xplore, GlobalLU_t& glu, Index& nextl_col, Index krow, Traits& traits);
49  void panel_dfs(const Index m, const Index w, const Index jcol, MatrixType& A, IndexVector& perm_r, Index& nseg, ScalarVector& dense, IndexVector& panel_lsub, IndexVector& segrep, IndexVector& repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu);
50 
51  void panel_bmod(const Index m, const Index w, const Index jcol, const Index nseg, ScalarVector& dense, ScalarVector& tempv, IndexVector& segrep, IndexVector& repfnz, GlobalLU_t& glu);
52  Index column_dfs(const Index m, const Index jcol, IndexVector& perm_r, Index maxsuper, Index& nseg, BlockIndexVector lsub_col, IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu);
53  Index column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector& tempv, BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t& glu);
54  Index copy_to_ucol(const Index jcol, const Index nseg, IndexVector& segrep, BlockIndexVector repfnz ,IndexVector& perm_r, BlockScalarVector dense, GlobalLU_t& glu);
55  void pruneL(const Index jcol, const IndexVector& perm_r, const Index pivrow, const Index nseg, const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu);
56  void countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu);
57  void fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu);
58 
59  template<typename , typename >
60  friend struct column_dfs_traits;
61 };
62 
63 } // end namespace internal
64 } // namespace Eigen
65 
66 #endif
Eigen::internal::SparseLUImpl::MatrixType
SparseMatrix< Scalar, ColMajor, StorageIndex > MatrixType
Definition: SparseLUImpl.h:31
w
RowVector3d w
Definition: Matrix_resize_int.cpp:3
Eigen::internal::SparseLUImpl::ScalarMatrix
Matrix< Scalar, Dynamic, Dynamic, ColMajor > ScalarMatrix
Definition: SparseLUImpl.h:25
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::SparseMatrix< Scalar, ColMajor, StorageIndex >
Eigen::internal::SparseLUImpl::fixupL
void fixupL(const Index n, const IndexVector &perm_r, GlobalLU_t &glu)
Fix up the data storage lsub for L-subscripts.
Definition: SparseLU_Utils.h:52
Eigen::PlainObjectBase< Matrix< Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::RealScalar
NumTraits< Scalar >::Real RealScalar
Definition: PlainObjectBase.h:109
Eigen::internal::SparseLUImpl::BlockScalarVector
Ref< Matrix< Scalar, Dynamic, 1 > > BlockScalarVector
Definition: SparseLUImpl.h:28
Eigen::internal::SparseLUImpl::column_dfs
Index column_dfs(const Index m, const Index jcol, IndexVector &perm_r, Index maxsuper, Index &nseg, BlockIndexVector lsub_col, IndexVector &segrep, BlockIndexVector repfnz, IndexVector &xprune, IndexVector &marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu)
Performs a symbolic factorization on column jcol and decide the supernode boundary.
Definition: SparseLU_column_dfs.h:93
Eigen::internal::SparseLUImpl::expand
Index expand(VectorType &vec, Index &length, Index nbElts, Index keep_prev, Index &num_expansions)
Definition: SparseLU_Memory.h:63
Eigen::internal::SparseLUImpl::RealScalar
ScalarVector::RealScalar RealScalar
Definition: SparseLUImpl.h:27
Eigen::internal::SparseLUImpl::heap_relax_snode
void heap_relax_snode(const Index n, IndexVector &et, const Index relax_columns, IndexVector &descendants, IndexVector &relax_end)
Identify the initial relaxed supernodes.
Definition: SparseLU_heap_relax_snode.h:46
mat
MatrixXf mat
Definition: Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
Eigen::internal::SparseLUImpl::copy_to_ucol
Index copy_to_ucol(const Index jcol, const Index nseg, IndexVector &segrep, BlockIndexVector repfnz, IndexVector &perm_r, BlockScalarVector dense, GlobalLU_t &glu)
Performs numeric block updates (sup-col) in topological order.
Definition: SparseLU_copy_to_ucol.h:50
Eigen::internal::SparseLUImpl::MappedMatrixBlock
Map< ScalarMatrix, 0, OuterStride<> > MappedMatrixBlock
Definition: SparseLUImpl.h:26
n
int n
Definition: BiCGSTAB_simple.cpp:1
Eigen::internal::SparseLUImpl::column_bmod
Index column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector &tempv, BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t &glu)
Performs numeric block updates (sup-col) in topological order.
Definition: SparseLU_column_bmod.h:53
A
Definition: test_numpy_dtypes.cpp:298
Eigen::internal::MemType
MemType
Definition: SparseLU_Structs.h:74
Eigen::internal::SparseLUImpl::snode_bmod
Index snode_bmod(const Index jcol, const Index fsupc, ScalarVector &dense, GlobalLU_t &glu)
Eigen::internal::SparseLUImpl::panel_bmod
void panel_bmod(const Index m, const Index w, const Index jcol, const Index nseg, ScalarVector &dense, ScalarVector &tempv, IndexVector &segrep, IndexVector &repfnz, GlobalLU_t &glu)
Performs numeric block updates (sup-panel) in topological order.
Definition: SparseLU_panel_bmod.h:56
Eigen::internal::SparseLUImpl::dfs_kernel
void dfs_kernel(const StorageIndex jj, IndexVector &perm_r, Index &nseg, IndexVector &panel_lsub, IndexVector &segrep, Ref< IndexVector > repfnz_col, IndexVector &xprune, Ref< IndexVector > marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu, Index &nextl_col, Index krow, Traits &traits)
Definition: SparseLU_panel_dfs.h:62
Eigen::internal::SparseLUImpl::snode_dfs
Index snode_dfs(const Index jcol, const Index kcol, const MatrixType &mat, IndexVector &xprune, IndexVector &marker, GlobalLU_t &glu)
Eigen::internal::SparseLUImpl::IndexVector
Matrix< StorageIndex, Dynamic, 1 > IndexVector
Definition: SparseLUImpl.h:24
Eigen::internal::column_dfs_traits
Definition: SparseLU_column_dfs.h:39
m
Matrix3f m
Definition: AngleAxis_mimic_euler.cpp:1
Eigen::Map
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:94
Eigen::internal::SparseLUImpl::memXpand
Index memXpand(VectorType &vec, Index &maxlen, Index nbElts, MemType memtype, Index &num_expansions)
Expand the existing storage.
Definition: SparseLU_Memory.h:209
Eigen::internal::SparseLUImpl::pruneL
void pruneL(const Index jcol, const IndexVector &perm_r, const Index pivrow, const Index nseg, const IndexVector &segrep, BlockIndexVector repfnz, IndexVector &xprune, GlobalLU_t &glu)
Prunes the L-structure.
Definition: SparseLU_pruneL.h:53
Eigen::Ref
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:281
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::internal::SparseLUImpl::memInit
Index memInit(Index m, Index n, Index annz, Index lwork, Index fillratio, Index panel_size, GlobalLU_t &glu)
Allocate various working space for the numerical factorization phase.
Definition: SparseLU_Memory.h:151
Eigen::internal::SparseLUImpl::GlobalLU_t
LU_GlobalLU_t< IndexVector, ScalarVector > GlobalLU_t
Definition: SparseLUImpl.h:30
Eigen::internal::SparseLUImpl::ScalarVector
Matrix< Scalar, Dynamic, 1 > ScalarVector
Definition: SparseLUImpl.h:23
Eigen::internal::SparseLUImpl::BlockIndexVector
Ref< Matrix< StorageIndex, Dynamic, 1 > > BlockIndexVector
Definition: SparseLUImpl.h:29
Eigen::internal::SparseLUImpl
Definition: SparseLUImpl.h:20
Eigen::Matrix< Scalar, Dynamic, 1 >
internal
Definition: BandTriangularSolver.h:13
VectorType
Definition: FFTW.cpp:65
Eigen::internal::SparseLUImpl::relax_snode
void relax_snode(const Index n, IndexVector &et, const Index relax_columns, IndexVector &descendants, IndexVector &relax_end)
Identify the initial relaxed supernodes.
Definition: SparseLU_relax_snode.h:47
Eigen::internal::SparseLUImpl::pivotL
Index pivotL(const Index jcol, const RealScalar &diagpivotthresh, IndexVector &perm_r, IndexVector &iperm_c, Index &pivrow, GlobalLU_t &glu)
Performs the numerical pivotin on the current column of L, and the CDIV operation.
Definition: SparseLU_pivotL.h:60
Eigen::internal::LU_GlobalLU_t
Definition: SparseLU_Structs.h:77
Eigen::internal::SparseLUImpl::countnz
void countnz(const Index n, Index &nnzL, Index &nnzU, GlobalLU_t &glu)
Count Nonzero elements in the factors.
Definition: SparseLU_Utils.h:21
Eigen::internal::SparseLUImpl::panel_dfs
void panel_dfs(const Index m, const Index w, const Index jcol, MatrixType &A, IndexVector &perm_r, Index &nseg, ScalarVector &dense, IndexVector &panel_lsub, IndexVector &segrep, IndexVector &repfnz, IndexVector &xprune, IndexVector &marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu)
Performs a symbolic factorization on a panel of columns [jcol, jcol+w)
Definition: SparseLU_panel_dfs.h:219
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74


gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:05:48