1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #ifndef CERES_INTERNAL_SUBSET_PRECONDITIONER_H_
- #define CERES_INTERNAL_SUBSET_PRECONDITIONER_H_
- #include <memory>
- #include "ceres/internal/disable_warnings.h"
- #include "ceres/internal/export.h"
- #include "ceres/preconditioner.h"
- namespace ceres::internal {
- class BlockSparseMatrix;
- class SparseCholesky;
- class InnerProductComputer;
- class CERES_NO_EXPORT SubsetPreconditioner
- : public BlockSparseMatrixPreconditioner {
- public:
- SubsetPreconditioner(Preconditioner::Options options,
- const BlockSparseMatrix& A);
- ~SubsetPreconditioner() override;
-
- void RightMultiplyAndAccumulate(const double* x, double* y) const final;
- int num_rows() const final { return num_cols_; }
- int num_cols() const final { return num_cols_; }
- private:
- bool UpdateImpl(const BlockSparseMatrix& A, const double* D) final;
- const Preconditioner::Options options_;
- const int num_cols_;
- std::unique_ptr<SparseCholesky> sparse_cholesky_;
- std::unique_ptr<InnerProductComputer> inner_product_computer_;
- };
- }
- #include "ceres/internal/reenable_warnings.h"
- #endif
|