|
g2o
|
#include <edge_creator.h>
Classes | |
| struct | EdgeCreatorEntry |
Public Types | |
| typedef std::map< std::string, EdgeCreatorEntry > | EntryMap |
Public Member Functions | |
| bool | addAssociation (const std::string &vertexTypes, const std::string &edgeType) |
| bool | addAssociation (const std::string &vertexTypes, const std::string &edgeType, const std::vector< int > ¶meterIds) |
| bool | removeAssociation (const std::string &vertexTypes) |
| OptimizableGraph::Edge * | createEdge (std::vector< OptimizableGraph::Vertex * > &vertices) |
Protected Attributes | |
| EntryMap | _vertexToEdgeMap |
Class that implements a simple edge_creation, based on the types and the ordes of the vertices passed as argument. Namely, based on an ordered vector of vertices this class implements a method that construct a new edge compatible with the vertices in the vector. The order of the vector matters. This class is heavily based on the Factory, and utilizes strings to identify the edge types.
Definition at line 45 of file edge_creator.h.
| typedef std::map<std::string, EdgeCreatorEntry> g2o::EdgeCreator::EntryMap |
Definition at line 58 of file edge_creator.h.
| bool g2o::EdgeCreator::addAssociation | ( | const std::string & | vertexTypes, |
| const std::string & | edgeType | ||
| ) |
Adds an association to the association map
| vertexTypes | a string containing the tags of the vertices separated by a ";". For instance an edge between a VertexSE2 and and EdgeSE2 is identified by the string "VERTEX_SE2;EDGE_SE2;". The order matters. |
| edgeType | the tag of edge to create |
Definition at line 49 of file edge_creator.cpp.
References addAssociation().
Referenced by addAssociation(), and main().
| bool g2o::EdgeCreator::addAssociation | ( | const std::string & | vertexTypes, |
| const std::string & | edgeType, | ||
| const std::vector< int > & | parameterIds | ||
| ) |
Adds an association to the association map
| vertexTypes | a string containing the tags of the vertices separated by a ";". For instance an edge between a VertexSE2 and and EdgeSE2 is identified by the string "VERTEX_SE2;EDGE_SE2;". The order matters. |
| edgeType | the tag of edge to create |
| parameterIds | the ids of the parameters uses as argument when creating the edge (the same as Edge::_parameterIds) |
Definition at line 37 of file edge_creator.cpp.
References _vertexToEdgeMap.
| OptimizableGraph::Edge * g2o::EdgeCreator::createEdge | ( | std::vector< OptimizableGraph::Vertex * > & | vertices | ) |
constructs an edge based on the verticesVector given as argument The vertices of the newly created edge are set to the parameter @params vertices: the vertices to be connected by the new edge
Definition at line 61 of file edge_creator.cpp.
References _vertexToEdgeMap, g2o::Factory::construct(), g2o::Factory::instance(), g2o::OptimizableGraph::Edge::numParameters(), g2o::OptimizableGraph::Edge::setParameterId(), g2o::Factory::tag(), and g2o::HyperGraph::Edge::vertices().
Referenced by g2o::assignHierarchicalEdges(), and g2o::computeSimpleStars().
| bool g2o::EdgeCreator::removeAssociation | ( | const std::string & | vertexTypes | ) |
Removes an association to the association map. @params vertexTypes: the string of the vertex ids connected by the edge
Definition at line 54 of file edge_creator.cpp.
References _vertexToEdgeMap.
|
protected |
Definition at line 96 of file edge_creator.h.
Referenced by addAssociation(), createEdge(), and removeAssociation().