gtsam  4.0.0
gtsam
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 
21 #include <gtsam/base/types.h>
22 
23 namespace gtsam {
24 
94  class GTSAM_EXPORT IndeterminantLinearSystemException : public ThreadsafeException<IndeterminantLinearSystemException> {
95  Key j_;
96  public:
97  IndeterminantLinearSystemException(Key j) throw() : j_(j) {}
98  virtual ~IndeterminantLinearSystemException() throw() {}
99  Key nearbyVariable() const { return j_; }
100  virtual const char* what() const throw();
101  };
102 
103  /* ************************************************************************* */
106  class GTSAM_EXPORT InvalidNoiseModel : public ThreadsafeException<InvalidNoiseModel> {
107  public:
110 
111  InvalidNoiseModel(DenseIndex factorDims, DenseIndex noiseModelDims) :
112  factorDims(factorDims), noiseModelDims(noiseModelDims) {}
113  virtual ~InvalidNoiseModel() throw() {}
114 
115  virtual const char* what() const throw();
116 
117  private:
118  mutable std::string description_;
119  };
120 
121  /* ************************************************************************* */
125  public:
128 
129  InvalidMatrixBlock(DenseIndex factorRows, DenseIndex blockRows) :
130  factorRows(factorRows), blockRows(blockRows) {}
131  virtual ~InvalidMatrixBlock() throw() {}
132 
133  virtual const char* what() const throw();
134 
135  private:
136  mutable std::string description_;
137  };
138 
139  /* ************************************************************************* */
141  public:
143  };
144 
145  }
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition: types.h:63
An exception indicating that the noise model dimension passed into a JacobianFactor has a different d...
Definition: linearExceptions.h:106
Base exception type that uses tbb_exception if GTSAM is compiled with TBB.
Definition: ThreadsafeException.h:39
Definition: linearExceptions.h:140
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:57
Thrown when a linear system is ill-posed.
Definition: linearExceptions.h:94
const DenseIndex blockRows
The dimensionality of the noise model.
Definition: linearExceptions.h:127
const DenseIndex factorDims
The dimensionality of the factor.
Definition: linearExceptions.h:108
const DenseIndex noiseModelDims
The dimensionality of the noise model.
Definition: linearExceptions.h:109
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
An exception indicating that a matrix block passed into a JacobianFactor has a different dimensionali...
Definition: linearExceptions.h:124
const DenseIndex factorRows
The dimensionality of the factor.
Definition: linearExceptions.h:126
Typedefs for easier changing of types.
Base exception type that uses tbb_exception if GTSAM is compiled with TBB.