2#include "optimization_algorithm.h"
4#include "optimizable_graph.h"
5#include "sparse_optimizer.h"
13 template<
class t_solver>
32 solver.optimizer().addVertex(v);
38 solver.optimizer().addEdge(e);
53 bool init(
bool online =
false)
55 bool useSchur =
false;
58 if (v->marginalized())
66 if (
solver.supportsSchur())
71 if (
solver.supportsSchur())
75 bool initState =
solver.init(online);
84 return solver.buildStructure(
false, scratch);
99 return solver.updateStructure(vset, edges);
The equivelent of std::vector but with a bit more control.
abstract Vertex, your types must derive from that one
A general case Vertex for optimization.
OptimizationAlgorithmWithHessian()
Default constructor.
bool init(bool online=false)
Initializes the solver, detecting whether Schur complement should be used.
void updateLinearSystem()
Rebuilds the linear system (Hessian and gradient) from the current graph state.
void addVertex(HyperGraph::HGVertex &v)
Adds a vertex to the optimizer.
void clear()
Clears the solver state.
const SparseOptimizer & optimizer() const
Returns a const reference to the underlying sparse optimizer.
t_solver solver
The underlying solver instance.
bool buildLinearStructure(IndexScratch &scratch)
Builds the linear system structure.
bool updateStructure(const Buffer< HyperGraph::HGVertex * > &vset, const Set< HyperGraph::HGVertex * > &edges)
Updates the linear system structure after graph topology changes.
SparseOptimizer & optimizer()
Returns a mutable reference to the underlying sparse optimizer.
void addEdge(HyperGraph::HGEdge *e)
Adds an edge to the optimizer.
Generic interface for a non-linear solver operating on a graph.
Container that stores unique elements in no particular order, and which allow for fast retrieval or i...
Generic interface for a sparse solver operating on a graph which solves one iteration of the lineariz...
Sparse optimizer that manages active vertices and edges for graph-based optimization.
The primary namespace for the NDEVR SDK.
Scratch buffers for block index assignments during structure building.