gtsam  3.2.1
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
linearExceptions.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 #pragma once
19 
20 #include <gtsam/global_includes.h>
21 #include <boost/lexical_cast.hpp>
22 #include <exception>
23 
24 namespace gtsam {
25 
95  class GTSAM_EXPORT IndeterminantLinearSystemException : public ThreadsafeException<IndeterminantLinearSystemException> {
96  Key j_;
97  public:
98  IndeterminantLinearSystemException(Key j) throw() : j_(j) {}
99  virtual ~IndeterminantLinearSystemException() throw() {}
100  Key nearbyVariable() const { return j_; }
101  virtual const char* what() const throw();
102  };
103 
104  /* ************************************************************************* */
107  class GTSAM_EXPORT InvalidNoiseModel : public ThreadsafeException<InvalidNoiseModel> {
108  public:
111 
112  InvalidNoiseModel(DenseIndex factorDims, DenseIndex noiseModelDims) :
113  factorDims(factorDims), noiseModelDims(noiseModelDims) {}
114  virtual ~InvalidNoiseModel() throw() {}
115 
116  virtual const char* what() const throw();
117 
118  private:
119  mutable std::string description_;
120  };
121 
122  /* ************************************************************************* */
126  public:
129 
130  InvalidMatrixBlock(DenseIndex factorRows, DenseIndex blockRows) :
131  factorRows(factorRows), blockRows(blockRows) {}
132  virtual ~InvalidMatrixBlock() throw() {}
133 
134  virtual const char* what() const throw();
135 
136  private:
137  mutable std::string description_;
138  };
139 
140  /* ************************************************************************* */
142  public:
143  InvalidDenseElimination(const char *message) : ThreadsafeException<InvalidDenseElimination>(message) {}
144  };
145 
146  }
Definition: linearExceptions.h:141
const DenseIndex noiseModelDims
The dimensionality of the noise model.
Definition: linearExceptions.h:110
Base exception type that uses tbb_exception if GTSAM is compiled with TBB.
Definition: types.h:154
Included from all GTSAM files.
const DenseIndex blockRows
The dimensionality of the noise model.
Definition: linearExceptions.h:128
An exception indicating that the noise model dimension passed into a JacobianFactor has a different d...
Definition: linearExceptions.h:107
size_t Key
Integer nonlinear key type.
Definition: types.h:59
const DenseIndex factorDims
The dimensionality of the factor.
Definition: linearExceptions.h:109
const DenseIndex factorRows
The dimensionality of the factor.
Definition: linearExceptions.h:127
Thrown when a linear system is ill-posed.
Definition: linearExceptions.h:95
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition: types.h:74
An exception indicating that a matrix block passed into a JacobianFactor has a different dimensionali...
Definition: linearExceptions.h:125