Go to the documentation of this file.
36 os <<
"PCGSolverParameters:" << endl;
37 preconditioner->print(
os);
47 std::cout <<
s << std::endl;
48 std::ostringstream
os;
50 std::cout <<
os.str() << std::endl;
58 preconditioner_->build(gfg, keyInfo,
lambda);
69 GaussianFactorGraphSystem::GaussianFactorGraphSystem(
71 const KeyInfo &keyInfo,
const std::map<Key, Vector> &
lambda) :
72 gfg_(gfg), preconditioner_(preconditioner), keyInfo_(keyInfo), lambda_(
84 Vector Ax = Vector::Zero(r.rows(), 1);
154 throw invalid_argument(
155 "buildVectorValues: inconsistent ordering and dimensions");
157 const size_t dim = it->second;
168 for (
const KeyInfo::value_type &item: keyInfo ) {
169 result.emplace(item.first,
v.segment(item.second.start, item.second.dim));
void rightPrecondition(const Vector &x, Vector &y) const
const Ordering & ordering() const
Return the ordering.
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
Linear Factor Graph where all factors are Gaussians.
const std::vector< size_t > dimensions
void residual(const Vector &x, Vector &r) const
VectorValues x0() const
Return VectorValues with zeros, of correct dimension.
void multiplyHessianAdd(double alpha, const VectorValues &x, VectorValues &y) const
** y += alpha*A'A*x */
void getb(Vector &b) const
int optimize(const SfmData &db, const NonlinearFactorGraph &graph, const Values &initial, bool separateCalibration=false)
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
double dot(const Vector &x, const Vector &y) const
void multiply(const Vector &x, Vector &y) const
ofstream os("timeSchurFactors.csv")
VectorValues buildVectorValues(const Vector &v, const KeyInfo &keyInfo)
Create VectorValues from a Vector and a KeyInfo class.
void print(const std::string &s) const
virtual VectorValues gradientAtZero() const
V preconditionedConjugateGradient(const S &system, const V &initial, const ConjugateGradientParameters ¶meters)
virtual void solve(const Vector &y, Vector &x) const =0
implement x = L^{-1} y
const GaussianFactorGraph & gfg_
virtual void transposeSolve(const Vector &y, Vector &x) const =0
implement x = L^{-T} y
static enum @1096 ordering
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 y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate offset
const gtsam::Symbol key('X', 0)
void leftPrecondition(const Vector &x, Vector &y) const
ptrdiff_t DenseIndex
The index type for Eigen objects.
void axpy(const double alpha, const Vector &x, Vector &y) const
Array< int, Dynamic, 1 > v
VectorValues buildVectorValues(const Vector &v, const Ordering &ordering, const map< Key, size_t > &dimensions)
Create VectorValues from a Vector.
const Preconditioner & preconditioner_
std::uint64_t Key
Integer nonlinear key type.
void scal(const double alpha, Vector &x) const
std::shared_ptr< Preconditioner > createPreconditioner(const std::shared_ptr< PreconditionerParameters > params)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:33