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;
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...
bool empty() const
Whether the factor is empty (involves zero variables).
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...
double dot(const V1 &a, const V2 &b)
noiseModel::Diagonal::shared_ptr model
void multiplyHessianAdd(double alpha, const VectorValues &x, VectorValues &y) const override
A matrix or vector expression mapping an existing array of data.
DenseIndex rows() const
Row size.
noiseModel::Diagonal::shared_ptr model_
void multiplyHessianAdd(double alpha, const VectorValues &x, VectorValues &y) const override
KeyVector keys_
The keys involved in this factor.
ptrdiff_t DenseIndex
The index type for Eigen objects.
VectorValues hessianDiagonal() const
Return the diagonal of the Hessian for this factor.
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.
Eigen::Matrix< double, D, 1 > DVector
noiseModel::Diagonal::shared_ptr SharedDiagonal
VectorValues gradientAtZero() const override
A'*b for Jacobian.
Eigen::Map< const DVector > ConstDMap
RegularJacobianFactor(const KEYS &keys, const VerticalBlockMatrix &augmentedMatrix, const SharedDiagonal &sigmas=SharedDiagonal())
Eigen::Map< DVector > DMap
const KeyVector & keys() const
Access the factor's involved variable keys.
void gradientAtZero(double *d) const override
Raw memory access version of gradientAtZero.
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
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...
RegularJacobianFactor(const TERMS &terms, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
void hessianDiagonal(double *d) const override
Raw memory access version of hessianDiagonal.