00001 // g2o - General Graph Optimization 00002 // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 00003 // 00004 // g2o is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU Lesser General Public License as published 00006 // by the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // g2o is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU Lesser General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU Lesser General Public License 00015 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 00017 #ifndef _BATCH_STATS_H_ 00018 #define _BATCH_STATS_H_ 00019 00020 #include <iostream> 00021 00022 namespace g2o { 00023 00027 struct G2OBatchStatistics { 00028 G2OBatchStatistics(); 00029 int iteration; 00030 int numVertices; 00031 int numEdges; 00032 double chi2; 00033 00035 // nonlinear part 00036 double timeResiduals; 00037 double timeLinearize; 00038 double timeQuadraticForm; 00039 int levenbergIterations; 00040 // block_solver (constructs Ax=b, plus maybe schur) 00041 double timeSchurrComplement; 00042 00043 // linear solver (computes Ax=b); 00044 double timeSymbolicDecomposition; 00045 double timeNumericDecomposition; 00046 double timeLinearSolution; 00047 double timeLinearSolver; 00048 int iterationsLinearSolver; 00049 double timeUpdate; 00050 double timeIteration; 00051 00052 double timeMarginals; 00053 00054 // information about the Hessian matrix 00055 size_t hessianDimension; 00056 size_t hessianPoseDimension; 00057 size_t hessianLandmarkDimension; 00058 size_t choleskyNNZ; 00059 }; 00060 00061 std::ostream& operator<<(std::ostream&, const G2OBatchStatistics&); 00062 00063 // this is really ugly: global stat variable to write statistics 00064 extern G2OBatchStatistics * globalStats; 00065 } 00066 00067 #endif