51 template<
typename TERMS>
63 template<
typename KEYS>
101 for (
size_t pos = 0; pos <
size(); ++pos)
114 for (
size_t k = 0; k <
D; ++k) {
117 column_k =
model_->whiten(column_k);
118 dj(k) =
dot(column_k, column_k);
120 dj(k) =
Ab_(
j).col(k).squaredNorm();
123 DMap(d + D *
j) += dj;
149 for (
size_t k = 0; k <
D; ++k) {
151 dj(k) = -1.0 *
dot(b, column_k);
153 DMap(d + D *
j) += dj;
double dot(const V1 &a, const V2 &b)
noiseModel::Diagonal::shared_ptr model
A matrix or vector expression mapping an existing array of data.
noiseModel::Diagonal::shared_ptr model_
void multiplyHessianAdd(double alpha, const VectorValues &x, VectorValues &y) const override
KeyVector keys_
The keys involved in this factor.
VectorValues hessianDiagonal() const
Return the diagonal of the Hessian for this factor.
ptrdiff_t DenseIndex
The index type for Eigen objects.
void multiplyHessianAdd(double alpha, const VectorValues &x, VectorValues &y) const override
VectorValues gradientAtZero() const override
Expose base class gradientAtZero.
const constBVector getb() const
Array< double, 1, 3 > e(1./3., 0.5, 2.)
RegularJacobianFactor()
Default constructor.
bool empty() const override
Eigen::Matrix< double, D, 1 > DVector
noiseModel::Diagonal::shared_ptr SharedDiagonal
Eigen::Map< const DVector > ConstDMap
RegularJacobianFactor(const KEYS &keys, const VerticalBlockMatrix &augmentedMatrix, const SharedDiagonal &sigmas=SharedDiagonal())
const KeyVector & keys() const
Access the factor's involved variable keys.
Eigen::Map< DVector > DMap
void multiplyHessianAdd(double alpha, const double *x, double *y) const
double* Hessian-vector multiply, i.e. y += A'*(A*x) RAW memory access! Assumes keys start at 0 and go...
void gradientAtZero(double *d) const override
Raw memory access version of gradientAtZero.
Vector operator*(const double *x) const
double* Matrix-vector multiply, i.e. y = A*x RAW memory access! Assumes keys start at 0 and go to M-1...
void transposeMultiplyAdd(double alpha, const Vector &e, double *x) const
double* Transpose Matrix-vector multiply, i.e. x += A'*e RAW memory access! Assumes keys start at 0 a...
VectorValues gradientAtZero() const override
A'*b for Jacobian.
The matrix class, also used for vectors and row-vectors.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
RegularJacobianFactor(const TERMS &terms, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
void hessianDiagonal(double *d) const override
Raw memory access version of hessianDiagonal.
DenseIndex rows() const
Row size.