g2o
graph_optimizer_sparse_incremental.h
Go to the documentation of this file.
1 // g2o - General Graph Optimization
2 // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard
3 //
4 // g2o is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published
6 // by the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // g2o is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef G2O_GRAPH_OPTIMIZER_SPARSE_INCREMENTAL_H
18 #define G2O_GRAPH_OPTIMIZER_SPARSE_INCREMENTAL_H
19 
20 #include "g2o_incremental_api.h"
23 
25 
26 namespace g2o {
27 
28  struct CholmodExt;
29 
31  {
32  public:
35 
36  int optimize(int iterations, bool online = false);
37 
38  virtual bool updateInitialization(HyperGraph::VertexSet& vset, HyperGraph::EdgeSet& eset);
39 
40  virtual bool initSolver(int dimension, int batchEveryN);
41 
42  protected:
44  cholmod_common _cholmodCommon;
46  cholmod_factor* _cholmodFactor;
47  cholmod_triplet* _permutedUpdate;
48  cholmod_factor* _L;
50 
52  Eigen::VectorXi _perm;
53  Eigen::VectorXi _cmember;
54 
55  Eigen::VectorXi _tripletWorkspace;
57 
58  bool computeCholeskyUpdate();
59  void convertTripletUpdateToSparse();
60  };
61 
62 }
63 
64 #endif
std::set< Vertex * > VertexSet
Definition: hyper_graph.h:136
Our extension of the CHOLMOD matrix struct.
std::set< Edge * > EdgeSet
Definition: hyper_graph.h:135
#define G2O_INCREMENTAL_API
generic interface for the online solver
SparseBlockMatrix< Eigen::MatrixXd > _updateMat
LinearSolverCholmodOnlineInterface * _solverInterface