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 
19 #pragma once
20 
21 namespace gtsam {
22 
23  /* ************************************************************************* */
24  template<typename KEYS>
25  HessianFactor::HessianFactor(const KEYS& keys, const SymmetricBlockMatrix& augmentedInformation) :
26  GaussianFactor(keys), info_(augmentedInformation)
27  {
28  // Check number of variables
29  if((DenseIndex)Base::keys_.size() != augmentedInformation.nBlocks() - 1)
30  throw std::invalid_argument(
31  "Error in HessianFactor constructor input. Number of provided keys plus\n"
32  "one for the information vector must equal the number of provided matrix blocks. ");
33 
34  // Check RHS dimension
35  if(augmentedInformation.getDim(augmentedInformation.nBlocks() - 1) != 1)
36  throw std::invalid_argument(
37  "Error in HessianFactor constructor input. The last provided matrix block\n"
38  "must be the information vector, but the last provided block had more than one column.");
39  }
40 
41 }
gtsam::HessianFactor::augmentedInformation
Matrix augmentedInformation() const override
Definition: HessianFactor.cpp:276
keys
const KeyVector keys
Definition: testRegularImplicitSchurFactor.cpp:40
gtsam::GaussianFactor
Definition: GaussianFactor.h:38
gtsam::HessianFactor::HessianFactor
HessianFactor()
Definition: HessianFactor.cpp:67
gtsam
traits
Definition: SFMdata.h:40
gtsam::Factor::keys_
KeyVector keys_
The keys involved in this factor.
Definition: Factor.h:88
gtsam::DenseIndex
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition: types.h:103
gtsam::Factor::size
size_t size() const
Definition: Factor.h:160
gtsam::SymmetricBlockMatrix
Definition: SymmetricBlockMatrix.h:53


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:24