gtsam
Loading...
Searching...
No Matches
HessianFactor-inl.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2
3 * GTSAM Copyright 2010, 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
18
19#pragma once
20
21namespace gtsam {
22
23 /* ************************************************************************* */
24 inline void HessianFactor::CheckAugmentedInformation(
25 size_t keyCount, const SymmetricBlockMatrix& augmentedInformation) {
26 const DenseIndex numBlocks = augmentedInformation.nBlocks();
27 if (numBlocks < 1 || static_cast<DenseIndex>(keyCount) != numBlocks - 1) {
28 throw std::invalid_argument(
29 "Error in HessianFactor constructor input. Number of provided keys plus\n"
30 "one for the information vector must equal the number of provided matrix blocks. ");
31 }
32
33 if (augmentedInformation.getDim(numBlocks - 1) != 1) {
34 throw std::invalid_argument(
35 "Error in HessianFactor constructor input. The last provided matrix block\n"
36 "must be the information vector, but the last provided block had more than one column.");
37 }
38 }
39
40 /* ************************************************************************* */
41 template<typename KEYS>
47
48 /* ************************************************************************* */
49 template <typename KEYS>
55
56}
STL namespace.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition types.h:49
This class stores a dense matrix and allows it to be accessed as a collection of blocks.
Definition SymmetricBlockMatrix.h:80
const KeyVector & keys() const
Access the factor's involved variable keys.
Definition Factor.h:143
KeyVector keys_
The keys involved in this factor.
Definition Factor.h:88
size_t size() const
Definition Factor.h:160
GaussianFactor()
Default constructor creates empty factor.
Definition GaussianFactor.h:49
Matrix augmentedInformation() const override
Return the augmented information matrix represented by this GaussianFactor.
Definition HessianFactor.cpp:338
SymmetricBlockMatrix info_
The full augmented information matrix, s.t. the quadratic error is 0.5*[x -1]'H[x -1].
Definition HessianFactor.h:104
HessianFactor()
default constructor for I/O
Definition HessianFactor.cpp:75