g2o
Loading...
Searching...
No Matches
batch_stats.h
Go to the documentation of this file.
1// g2o - General Graph Optimization
2// Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard
3// All rights reserved.
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are
7// met:
8//
9// * Redistributions of source code must retain the above copyright notice,
10// this list of conditions and the following disclaimer.
11// * Redistributions in binary form must reproduce the above copyright
12// notice, this list of conditions and the following disclaimer in the
13// documentation and/or other materials provided with the distribution.
14//
15// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
16// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
18// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27#ifndef G2O_BATCH_STATS_H_
28#define G2O_BATCH_STATS_H_
29
30#include <iostream>
31#include <vector>
32
33#include "g2o_core_api.h"
34
35namespace g2o {
36
45 double chi2;
46
48 // nonlinear part
53 // block_solver (constructs Ax=b, plus maybe schur)
55
56 // linear solver (computes Ax=b);
64 double timeUpdate;
66
69
70 // information about the Hessian matrix
73 size_t
75 size_t choleskyNNZ;
76
77 static G2OBatchStatistics* globalStats() { return _globalStats; }
78 static void setGlobalStats(G2OBatchStatistics* b);
79
80 protected:
82};
83
84G2O_CORE_API std::ostream& operator<<(std::ostream&, const G2OBatchStatistics&);
85
86typedef std::vector<G2OBatchStatistics> BatchStatisticsContainer;
87} // namespace g2o
88
89#endif
#define G2O_CORE_API
std::vector< G2OBatchStatistics > BatchStatisticsContainer
Definition batch_stats.h:86
std::ostream & operator<<(std::ostream &os, const G2OBatchStatistics &st)
statistics about the optimization
Definition batch_stats.h:40
size_t hessianLandmarkDimension
dimension of the landmark matrix in Schur
Definition batch_stats.h:74
double timeResiduals
residuals
Definition batch_stats.h:49
static G2OBatchStatistics * globalStats()
Definition batch_stats.h:77
int numVertices
how many vertices are involved
Definition batch_stats.h:43
double timeNumericDecomposition
numeric decomposition (0 if not done)
Definition batch_stats.h:58
double timeSymbolicDecomposition
symbolic decomposition (0 if not done)
Definition batch_stats.h:57
double timeUpdate
time to apply the update
Definition batch_stats.h:64
size_t choleskyNNZ
number of non-zeros in the cholesky factor
Definition batch_stats.h:75
double timeIteration
total time;
Definition batch_stats.h:65
size_t hessianDimension
rows / cols of the Hessian
Definition batch_stats.h:71
int iteration
which iteration
Definition batch_stats.h:42
double chi2
total chi2
Definition batch_stats.h:45
double timeSchurComplement
compute schur complement (0 if not done)
Definition batch_stats.h:54
static G2OBatchStatistics * _globalStats
Definition batch_stats.h:81
double timeLinearize
jacobians
Definition batch_stats.h:50
int levenbergIterations
number of iterations performed by LM
Definition batch_stats.h:52
double timeLinearSolver
time for solving, excluding Schur setup
Definition batch_stats.h:61
size_t hessianPoseDimension
dimension of the pose matrix in Schur
Definition batch_stats.h:72
int numEdges
how many edges
Definition batch_stats.h:44
double timeQuadraticForm
construct the quadratic form in the graph
Definition batch_stats.h:51