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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:42:31