File block_tridiagonal_ldlt.h

namespace sym
template<typename ScalarType, int kFirstBlock, int kBlock, int kNumBlocks>
class BlockTridiagonalLdlt

Public Types

using Scalar = ScalarType
using MatrixType = Eigen::SparseMatrix<Scalar>
using StorageIndex = typename MatrixType::StorageIndex
using CholMatrixType = Eigen::SparseMatrix<Scalar, Eigen::ColMajor, StorageIndex>
using VectorType = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>
using PermutationMatrixType = Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, StorageIndex>
using FirstPanel = Eigen::Matrix<Scalar, kFirstBlock + kBlock, kFirstBlock>
using Panel = Eigen::Matrix<Scalar, 2 * kBlock, kBlock>
using DiagVector = Eigen::Matrix<Scalar, kDim, 1>

Public Functions

inline bool IsInitialized() const
inline void AnalyzeSparsityPattern(const MatrixType &A_lower)
inline bool Factorize(const MatrixType &A_lower)
template<typename Rhs>
inline Eigen::Matrix<Scalar, kDim, Rhs::ColsAtCompileTime> Solve(const Eigen::MatrixBase<Rhs> &b) const
template<typename Rhs>
inline void SolveInPlace(Eigen::MatrixBase<Rhs> &b) const
inline CholMatrixType L() const
inline DiagVector D() const
inline PermutationMatrixType Permutation() const

Public Static Attributes

static int kDim = kFirstBlock + kBlock * (kNumBlocks - 1)

Private Functions

inline Eigen::Map<FirstPanel> FirstFactor()
inline Eigen::Map<const FirstPanel> FirstFactor() const
inline Eigen::Map<Panel> Factor(const int t)
inline Eigen::Map<const Panel> Factor(const int t) const

Private Members

bool is_initialized_ = false
std::vector<int> scatter_destination_
VectorType storage_
DiagVector d_inv_

Private Static Functions

static inline int BlockOf(const int index)
static inline int OffsetInBlock(const int index)
static inline int TopSize(const int block)
static inline int PanelRows(const int block)
static inline int PanelOffset(const int block)
template<typename PanelType>
static inline auto UnitLowerOf(const PanelType &panel)
template<typename PanelType>
static inline void PanelLdlt(PanelType &panel, const int num_rows, Eigen::Ref<Eigen::Matrix<Scalar, PanelType::ColsAtCompileTime, 1>> d, Eigen::Ref<Eigen::Matrix<Scalar, PanelType::ColsAtCompileTime, 1>> d_inv)
template<typename WType, typename DType>
static inline void SchurUpdate(const Eigen::MatrixBase<WType> &w, const Eigen::MatrixBase<DType> &d, Eigen::Map<Panel> next_panel)

Private Static Attributes

static int kFirstPanelSize = (kFirstBlock + kBlock) * kFirstBlock
static int kPanelSize = 2 * kBlock * kBlock
static int kStorageSize = kFirstPanelSize + kPanelSize * (kNumBlocks - 1)