linearExceptions.cpp
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 
20 #include <gtsam/inference/Symbol.h>
21 
22 namespace gtsam {
23 
24  /* ************************************************************************* */
25  const char* IndeterminantLinearSystemException::what() const noexcept
26  {
27  if(!description_) {
29  "\nIndeterminant linear system detected while working near variable\n"
30  + std::to_string(j_) +
31  + " (Symbol: " + gtsam::DefaultKeyFormatter(gtsam::Symbol(j_)) + ").\n"
32  "\n\
33 Thrown when a linear system is ill-posed. The most common cause for this\n\
34 error is having underconstrained variables. Mathematically, the system is\n\
35 underdetermined. See the GTSAM Doxygen documentation at\n\
36 http://borg.cc.gatech.edu/ on gtsam::IndeterminantLinearSystemException for\n\
37 more information.");
38  }
39  return description_->c_str();
40  }
41 
42  /* ************************************************************************* */
43  const char* InvalidNoiseModel::what() const noexcept {
44  if(description_->empty())
45  description_ = "A JacobianFactor was attempted to be constructed or modified to use a\n"
46  "noise model of incompatible dimension. The JacobianFactor has\n"
47  "dimensionality (i.e. length of error vector) " + std::to_string(factorDims) +
48  " but the provided noise model has dimensionality " + std::to_string(noiseModelDims) + ".";
49  return description_->c_str();
50  }
51 
52  /* ************************************************************************* */
53  const char* InvalidMatrixBlock::what() const noexcept {
54  if(description_->empty()) {
55  description_ = "A JacobianFactor was attempted to be constructed with a matrix block of\n"
56  "inconsistent dimension. The JacobianFactor has " + std::to_string(factorRows) +
57  " rows (i.e. length of error vector) but the provided matrix block has " +
58  std::to_string(blockRows) + " rows.";
59  }
60  return description_->c_str();
61  }
62 
63  }
std::optional< String > description_
Optional description.
static const KeyFormatter DefaultKeyFormatter
Definition: Key.h:43
const char * what() const noexcept override
const char * what() const noexcept override
Exceptions that may be thrown by linear solver components.
traits
Definition: chartTesting.h:28
const char * what() const noexcept override


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:33