21 #include <gtsam_unstable/dllexport.h> 38 typedef boost::shared_ptr<LinearizedGaussianFactor>
shared_ptr;
63 friend class boost::serialization::access;
64 template<
class ARCHIVE>
66 ar & boost::serialization::make_nvp(
"LinearizedGaussianFactor",
67 boost::serialization::base_object<Base>(*
this));
68 ar & BOOST_SERIALIZATION_NVP(lin_points_);
85 typedef boost::shared_ptr<LinearizedJacobianFactor>
shared_ptr;
128 const constBVector
b()
const {
return Ab_(
size()).col(0); }
129 const constABlock
A()
const {
return Ab_.
range(0,
size()); };
130 const constABlock
A(
Key key)
const {
return Ab_(std::find(begin(),
end(), key) - begin()); }
133 size_t dim()
const override {
return Ab_.
rows(); };
143 boost::shared_ptr<GaussianFactor> linearize(
const Values& c)
const override;
150 friend class boost::serialization::access;
151 template<
class ARCHIVE>
153 ar & boost::serialization::make_nvp(
"LinearizedJacobianFactor",
154 boost::serialization::base_object<Base>(*
this));
155 ar & BOOST_SERIALIZATION_NVP(Ab_);
176 typedef boost::shared_ptr<LinearizedHessianFactor>
shared_ptr;
252 return info_.
block(J1, J2);
264 size_t dim()
const override {
return info_.
rows() - 1; }
274 boost::shared_ptr<GaussianFactor> linearize(
const Values& c)
const override;
278 friend class boost::serialization::access;
279 template<
class ARCHIVE>
281 ar & boost::serialization::make_nvp(
"LinearizedHessianFactor",
282 boost::serialization::base_object<Base>(*
this));
283 ar & BOOST_SERIALIZATION_NVP(info_);
void print(const Matrix &A, const string &s, ostream &stream)
LinearizedHessianFactor This
LinearizedJacobianFactor This
m m block(1, 0, 2, 2)<< 4
Matrix squaredTerm(const_iterator j1, const_iterator j2) const
const Block< const Derived, internal::traits< Derived >::RowsAtCompileTime, 1,!IsRowMajor > ConstColXpr
boost::shared_ptr< LinearizedHessianFactor > shared_ptr
VerticalBlockMatrix::Block ABlock
VerticalBlockMatrix::constBlock::ConstColXpr constBVector
boost::shared_ptr< LinearizedJacobianFactor > shared_ptr
boost::shared_ptr< LinearizedGaussianFactor > shared_ptr
Block< Derived, internal::traits< Derived >::RowsAtCompileTime, 1,!IsRowMajor > ColXpr
size_t dim() const override
static const KeyFormatter DefaultKeyFormatter
ptrdiff_t DenseIndex
The index type for Eigen objects.
LinearizedGaussianFactor Base
const constABlock A(Key key) const
void serialize(ARCHIVE &ar, const unsigned int)
SymmetricBlockMatrix::Block::ColXpr Column
A column containing the linear term h.
gtsam::NonlinearFactor::shared_ptr clone() const override
double constantTerm() const
size_t dim() const override
VerticalBlockMatrix::Block::ColXpr BVector
boost::shared_ptr< This > shared_ptr
constColumn linearTerm() const
boost::shared_ptr< This > shared_ptr
A shared_ptr to this class.
Eigen::SelfAdjointView< constBlock, Eigen::Upper > squaredTerm() const
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Contains the HessianFactor class, a general quadratic factor.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
const constBVector b() const
void serialize(ARCHIVE &ar, const unsigned int)
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Block range(DenseIndex startBlock, DenseIndex endBlock)
Matrix block(DenseIndex I, DenseIndex J) const
VerticalBlockMatrix::constBlock constABlock
constColumn linearTerm(const_iterator j) const
~LinearizedJacobianFactor() override
const constABlock A() const
Non-linear factor base classes.
constBlock aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock, DenseIndex j_startBlock, DenseIndex j_endBlock) const
Get a range [i,j) from the matrix. Indices are in block units.
Expression of a fixed-size or dynamic-size block.
const Values & linearizationPoint() const
void serialize(ARCHIVE &ar, const unsigned int)
Eigen::SelfAdjointView< constBlock, Eigen::Upper > selfadjointView(DenseIndex I, DenseIndex J) const
Return the square sub-matrix that contains blocks(i:j, i:j).
~LinearizedHessianFactor() override
SymmetricBlockMatrix::Block Block
A block from the Hessian matrix.
SymmetricBlockMatrix::constBlock::ColXpr constColumn
A column containing the linear term h (const version)
Eigen::SelfAdjointView< Block, Eigen::Upper > diagonalBlock(DenseIndex J)
Return the J'th diagonal block as a self adjoint view.
KeyVector::const_iterator const_iterator
Const iterator over keys.
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
SymmetricBlockMatrix::constBlock constBlock
A block from the Hessian matrix (const version)
~LinearizedGaussianFactor() override
SymmetricBlockMatrix info_
DenseIndex rows() const
Row size.
std::uint64_t Key
Integer nonlinear key type.
LinearizedGaussianFactor This
LinearizedGaussianFactor Base
LinearizedGaussianFactor()
gtsam::NonlinearFactor::shared_ptr clone() const override
DenseIndex rows() const
Row size.