Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
gauss_newton_solver_qr.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#pragma once
9
14
15#include <Eigen/Core>
16
17namespace momentum {
18
26
27template <typename T>
28class GaussNewtonSolverQRT : public SolverT<T> {
29 public:
35 GaussNewtonSolverQRT& operator=(GaussNewtonSolverQRT&&) noexcept = default;
36
37 [[nodiscard]] std::string_view getName() const override;
38
39 void setOptions(const SolverOptions& options) final;
40
41 protected:
42 void doIteration() final;
43 void initializeSolver() final;
44
45 private:
46 ResizeableMatrix<T> jacobian_;
47 ResizeableMatrix<T> residual_;
48
49 OnlineHouseholderQR<T> qrSolver_;
50
51 float regularization_;
52 bool doLineSearch_;
53};
54
55} // namespace momentum
GaussNewtonSolverQRT(const GaussNewtonSolverQRT &)=delete
GaussNewtonSolverQRT(GaussNewtonSolverQRT &&) noexcept=default
GaussNewtonSolverQRT(const SolverOptions &options, SolverFunctionT< T > *solver)
std::string_view getName() const override
GaussNewtonSolverQRT & operator=(const GaussNewtonSolverQRT &)=delete
void setOptions(const SolverOptions &options) final
Online (incremental) Householder QR solver for tall, column-sparse least-squares problems.
A dense column-major matrix whose underlying storage capacity grows monotonically and is reused acros...
Abstract base class for optimization objective functions.
SolverT(const SolverOptions &options, SolverFunctionT< T > *solver)
Constructor with solver options and function to optimize.
Definition solver.cpp:20
GaussNewtonSolverBaseOptions()=default
Default constructor.
GaussNewtonSolverQROptions(const SolverOptions &baseOptions)
Common options for numerical optimization solvers.
Definition solver.h:19