10 EntryMap::iterator it = _vertexToEdgeMap.find(vertexTypes);
11 if (it!=_vertexToEdgeMap.end())
12 it->second = edgeType;
14 _vertexToEdgeMap.insert(make_pair(vertexTypes,
EdgeCreatorEntry(edgeType, parameterIds)));
19 return addAssociation(vertexTypes, edgeType, std::vector<int>());
23 EntryMap::iterator it = _vertexToEdgeMap.find(vertexTypes);
24 if (it==_vertexToEdgeMap.end())
26 _vertexToEdgeMap.erase(it);
32 std::stringstream key;
34 for (
size_t i=0; i<vertices.size(); i++){
35 key << factory->
tag(vertices[i]) <<
";";
37 EntryMap::iterator it=_vertexToEdgeMap.find(key.str());
38 if (it==_vertexToEdgeMap.end()){
39 cerr <<
"no thing in factory: " << key.str() << endl;
44 cerr <<
"no thing can be created" << endl;
48 assert(it->second._parameterIds.size() == e->
numParameters());
49 for (
size_t i=0; i<it->second._parameterIds.size(); i++){
51 cerr <<
"no thing in good for setting params" << endl;
56 for (
size_t i=0; i<vertices.size(); i++)
static Factory * instance()
return the instance
bool removeAssociation(std::string vertexTypes)
HyperGraph::HyperGraphElement * construct(const std::string &tag) const
Protocol The SLAM executable accepts such as solving the and retrieving or vertices in the explicitly state the reprensentation poses are represented by poses by VERTEX_XYZRPY In the Quaternions and other representations could be but note that it is up to the SLAM algorithm to choose the internal representation of the angles The keyword is followed by a unique vertex ID and an optional initialization of the or edges in the explicitly state the type of the constraint pose constraints are given by pose constraints by EDGE_XYZRPY The keyword is followed by a unique edge the IDs of the referenced vertices
bool setParameterId(int argNum, int paramId)
const VertexContainer & vertices() const
const std::string & tag(const HyperGraph::HyperGraphElement *v) const
return the TAG given a vertex
size_t numParameters() const
create vertices and edges based on TAGs in, for example, a file
OptimizableGraph::Edge * createEdge(std::vector< OptimizableGraph::Vertex * > &vertices)
bool addAssociation(const std::string &vertexTypes, const std::string &edgeType)