gtsam
Loading...
Searching...
No Matches
FlatGaussianFactor.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2
3 * GTSAM Copyright 2010-2026, Georgia Tech Research Corporation,
4 * Atlanta, Georgia 30332-0415
5 * All Rights Reserved
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8 * See LICENSE for the license information
9
10 * -------------------------------------------------------------------------- */
11
17
18#pragma once
19
20#include <gtsam/base/Matrix.h>
21
22#include <cstddef>
23#include <vector>
24
25namespace gtsam {
26
35class GTSAM_EXPORT FlatGaussianFactor {
36 public:
37 virtual ~FlatGaussianFactor();
38
40 virtual void multiplyHessianAdd(
41 double alpha, const std::vector<size_t>& scalarOffsets, const double* x,
42 double* y) const = 0;
43
45 virtual void gradientAtZeroAdd(const std::vector<size_t>& scalarOffsets,
46 double* gradient) const = 0;
47
50 const std::vector<size_t>& blockSlots,
51 std::vector<Matrix>* diagonalBlocks) const = 0;
52};
53
54} // namespace gtsam
typedef and functions to augment Eigen's MatrixXd
Global functions in a separate testing namespace.
Definition chartTesting.h:28
Optional preindexed kernels for matrix-free Gaussian factors.
Definition FlatGaussianFactor.h:35
virtual void gradientAtZeroAdd(const std::vector< size_t > &scalarOffsets, double *gradient) const =0
Add this factor's zero-point gradient to a flat output vector.
virtual void multiplyHessianAdd(double alpha, const std::vector< size_t > &scalarOffsets, const double *x, double *y) const =0
Add this factor's Hessian-vector product to a flat output vector.
virtual void hessianBlockDiagonalAdd(const std::vector< size_t > &blockSlots, std::vector< Matrix > *diagonalBlocks) const =0
Add this factor's Hessian diagonal to ordered variable blocks.