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 (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 20 of file edge_creator.h.
typedef std::map<std::string, EdgeCreatorEntry> g2o::EdgeCreator::EntryMap |
Definition at line 32 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 18 of file edge_creator.cpp.
Referenced by 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 8 of file edge_creator.cpp.
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 vertices: the vertices to be connected by the new edge
Definition at line 31 of file edge_creator.cpp.
References 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 | ( | std::string | vertexTypes | ) |
Removes an association to the association map. vertexTypes: the string of the vertex ids connected by the edge
Definition at line 22 of file edge_creator.cpp.
|
protected |
Definition at line 63 of file edge_creator.h.