g2o
Toggle main menu visibility
Loading...
Searching...
No Matches
g2o
examples
g2o_hierarchical
star.h
Go to the documentation of this file.
1
// g2o - General Graph Optimization
2
// Copyright (C) 2011 R. Kuemmerle, G. Grisetti, H. Strasdat, 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_STAR_
28
#define G2O_STAR_
29
30
#include <Eigen/Core>
31
#include <map>
32
#include <set>
33
#include <vector>
34
35
#include "
edge_labeler.h
"
36
#include "
g2o/core/sparse_optimizer.h
"
37
38
namespace
g2o
{
53
54
struct
Star
{
59
Star
(
int
level
,
SparseOptimizer
*
optimizer
);
60
65
bool
labelStarEdges
(
int
iterations,
EdgeLabeler
* labeler);
66
68
inline
int
level
()
const
{
return
_level
; };
70
inline
SparseOptimizer
*
optimizer
() {
return
_optimizer
; }
72
inline
HyperGraph::EdgeSet
&
lowLevelEdges
() {
return
_lowLevelEdges
; }
74
inline
HyperGraph::EdgeSet
&
starEdges
() {
return
_starEdges
; }
76
inline
HyperGraph::EdgeSet
&
starFrontierEdges
() {
return
_starFrontierEdges
; }
78
inline
HyperGraph::VertexSet
&
gauge
() {
return
_gauge
; }
80
inline
HyperGraph::VertexSet
&
lowLevelVertices
() {
return
_lowLevelVertices
; }
81
83
int
_level
;
85
SparseOptimizer
*
_optimizer
;
87
HyperGraph::EdgeSet
_lowLevelEdges
;
89
HyperGraph::EdgeSet
_starEdges
;
91
HyperGraph::EdgeSet
_starFrontierEdges
;
93
HyperGraph::VertexSet
_gauge
;
95
HyperGraph::VertexSet
_lowLevelVertices
;
96
};
97
98
typedef
std::multimap<OptimizableGraph::Vertex*, Star*>
VertexStarMultimap
;
99
typedef
std::map<OptimizableGraph::Vertex*, Star*>
VertexStarMap
;
100
typedef
std::set<Star*>
StarSet
;
101
typedef
std::map<HyperGraph::Edge*, Star*>
EdgeStarMap
;
102
103
}
// namespace g2o
104
#endif
g2o::HyperGraph::EdgeSet
std::set< Edge * > EdgeSet
Definition
hyper_graph.h:141
g2o::HyperGraph::VertexSet
std::set< Vertex * > VertexSet
Definition
hyper_graph.h:142
g2o::SparseOptimizer
Definition
sparse_optimizer.h:42
edge_labeler.h
g2o
Definition
dl_wrapper.cpp:55
g2o::VertexStarMap
std::map< OptimizableGraph::Vertex *, Star * > VertexStarMap
Definition
star.h:99
g2o::StarSet
std::set< Star * > StarSet
Definition
star.h:100
g2o::EdgeStarMap
std::map< HyperGraph::Edge *, Star * > EdgeStarMap
Definition
star.h:101
g2o::VertexStarMultimap
std::multimap< OptimizableGraph::Vertex *, Star * > VertexStarMultimap
Definition
star.h:98
sparse_optimizer.h
g2o::EdgeLabeler
Definition
edge_labeler.h:46
g2o::Star::_level
int _level
level of the star
Definition
star.h:83
g2o::Star::labelStarEdges
bool labelStarEdges(int iterations, EdgeLabeler *labeler)
Definition
star.cpp:37
g2o::Star::starFrontierEdges
HyperGraph::EdgeSet & starFrontierEdges()
edges in the high level that lead to some node owned by a different star
Definition
star.h:76
g2o::Star::_starFrontierEdges
HyperGraph::EdgeSet _starFrontierEdges
edges in the star that lead to some other star
Definition
star.h:91
g2o::Star::_lowLevelVertices
HyperGraph::VertexSet _lowLevelVertices
vertices that are fixed (center of the star)
Definition
star.h:95
g2o::Star::optimizer
SparseOptimizer * optimizer()
returns the optimizer
Definition
star.h:70
g2o::Star::lowLevelEdges
HyperGraph::EdgeSet & lowLevelEdges()
low level edge set
Definition
star.h:72
g2o::Star::_optimizer
SparseOptimizer * _optimizer
optimizer
Definition
star.h:85
g2o::Star::lowLevelVertices
HyperGraph::VertexSet & lowLevelVertices()
set of all vertices in the low level
Definition
star.h:80
g2o::Star::_gauge
HyperGraph::VertexSet _gauge
vertices that are fixed (center of the star)
Definition
star.h:93
g2o::Star::_starEdges
HyperGraph::EdgeSet _starEdges
edges in the star
Definition
star.h:89
g2o::Star::level
int level() const
returns the level of the lower edges in the star
Definition
star.h:68
g2o::Star::starEdges
HyperGraph::EdgeSet & starEdges()
high level edge set
Definition
star.h:74
g2o::Star::Star
Star(int level, SparseOptimizer *optimizer)
Definition
star.cpp:34
g2o::Star::_lowLevelEdges
HyperGraph::EdgeSet _lowLevelEdges
edges in the lower level
Definition
star.h:87
g2o::Star::gauge
HyperGraph::VertexSet & gauge()
set of nodes to keep fixed in the optimization
Definition
star.h:78
Generated on
for g2o by
1.17.0