123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- #ifndef CERES_INTERNAL_SCHUR_JACOBI_PRECONDITIONER_H_
- #define CERES_INTERNAL_SCHUR_JACOBI_PRECONDITIONER_H_
- #include <memory>
- #include <set>
- #include <utility>
- #include <vector>
- #include "ceres/internal/disable_warnings.h"
- #include "ceres/internal/export.h"
- #include "ceres/preconditioner.h"
- namespace ceres::internal {
- class BlockRandomAccessDiagonalMatrix;
- class BlockSparseMatrix;
- struct CompressedRowBlockStructure;
- class SchurEliminatorBase;
- class CERES_NO_EXPORT SchurJacobiPreconditioner
- : public BlockSparseMatrixPreconditioner {
- public:
-
-
-
-
-
-
- SchurJacobiPreconditioner(const CompressedRowBlockStructure& bs,
- Preconditioner::Options options);
- SchurJacobiPreconditioner(const SchurJacobiPreconditioner&) = delete;
- void operator=(const SchurJacobiPreconditioner&) = delete;
- ~SchurJacobiPreconditioner() override;
-
- void RightMultiplyAndAccumulate(const double* x, double* y) const final;
- int num_rows() const final;
- private:
- void InitEliminator(const CompressedRowBlockStructure& bs);
- bool UpdateImpl(const BlockSparseMatrix& A, const double* D) final;
- Preconditioner::Options options_;
- std::unique_ptr<SchurEliminatorBase> eliminator_;
-
- std::unique_ptr<BlockRandomAccessDiagonalMatrix> m_;
- };
- }
- #include "ceres/internal/reenable_warnings.h"
- #endif
|