Go to the documentation of this file.
38 double alpha = ATA(k, k);
43 }
else if (
alpha < 0.0)
49 const double betainv = 1.0 /
beta;
54 if (k < (order - 1)) {
57 BlockRow
V = ATA.row(k).segment(k + 1, order - (k + 1));
61 ATA.block(k + 1, k + 1, order - (k + 1), order - (k + 1)) -=
V.transpose() *
V;
69 for (
size_t j = k + 1;
j < order; ++
j)
78 assert(ATA.rows() == ATA.cols());
81 const size_t n = ATA.rows();
87 assert(
size_t(order) <=
n);
94 for (
size_t k = 0; k <
size_t(order); ++k) {
96 if (stepResult == 1) {
98 }
else if (stepResult == -1) {
104 return make_pair(maxrank, success);
113 assert(ABC.cols() == ABC.rows());
114 assert(
size_t(ABC.rows()) >= topleft);
115 const size_t n =
static_cast<size_t>(ABC.rows() - topleft);
116 assert(nFrontal <=
size_t(
n));
119 auto A = ABC.block(topleft, topleft, nFrontal, nFrontal);
120 auto B = ABC.block(topleft, topleft + nFrontal, nFrontal,
n - nFrontal);
121 auto C = ABC.block(topleft + nFrontal, topleft + nFrontal,
n - nFrontal,
n - nFrontal);
136 R.transpose().solveInPlace(
B);
142 C.selfadjointView<
Eigen::Upper>().rankUpdate(
B.transpose(), -1.0);
149 (void)frexp(
R(nFrontal - 2, nFrontal - 2), &
exp2);
150 (void)frexp(
R(nFrontal - 1, nFrontal - 1), &exp1);
152 }
else if (nFrontal == 1) {
154 (void)frexp(
R(0, 0), &exp1);
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
static const double zeroPivotThreshold
EIGEN_DONT_INLINE void llt(const Mat &A, const Mat &B, Mat &C)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
VectorBlock< Derived > SegmentReturnType
Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained Cholesky.
static const double negativePivotThreshold
double beta(double a, double b)
pair< size_t, bool > choleskyCareful(Matrix &ATA, int order)
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
static const double underconstrainedPrior
static int choleskyStep(Matrix &ATA, size_t k, size_t order)
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
Matrix< Scalar, Dynamic, Dynamic > C
bool choleskyPartial(Matrix &ABC, size_t nFrontal, size_t topleft)
static const int underconstrainedExponentDifference
Jet< T, N > sqrt(const Jet< T, N > &f)
Rot2 R(Rot2::fromAngle(0.1))
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:14