Struct sym::Linearization#

template<typename MatrixType>
struct Linearization

Class for storing a problem linearization evaluated at a Values (i.e. a residual, jacobian, hessian, and rhs)

MatrixType is expected to be an Eigen MatrixX or SparseMatrix.

Public Types

using Scalar = typename MatrixType::Scalar
using Vector = VectorX<Scalar>
using Matrix = MatrixType

Public Functions

inline void Reset()

Set to invalid

inline bool IsInitialized() const

Returns whether the linearization is currently valid for the corresponding values. Accessing any of the members when this is false could result in unexpected behavior

inline void SetInitialized(const bool initialized = true)
inline Scalar Error() const
inline Scalar LinearDeltaError(const Vector &x_update, const Vector &damping_vector) const

Returns the change in error predicted by the Linearization at the given update

Parameters:
  • x_update – The update to the values

  • damping_vector – The vector added to the diagonal of the hessian during the linear solve

Public Members

Vector residual
Matrix hessian_lower
Matrix jacobian
Vector rhs