28 #ifndef CONSTRAINED_POSE_NETWORK_H
29 #define CONSTRAINED_POSE_NETWORK_H
54 using namespace mrpt::utils;
128 typedef typename MAPS_IMPLEMENTATION::template map<TNodeID,global_pose_t>
global_poses_t;
174 inline void loadFromTextFile(
const std::string &fileName,
bool collapse_dup_edges =
true ) {
176 if (collapse_dup_edges) this->collapseDuplicatedEdges();
220 double getEdgeSquareError(
const TNodeID from_id,
const TNodeID to_id,
bool ignoreCovariances =
true )
const
223 ASSERTMSG_(itEdge!=BASE::edges.
end(),
format(
"Request for edge %u->%u that doesn't exist in graph.",static_cast<unsigned int>(from_id),static_cast<unsigned int>(to_id)));
224 return getEdgeSquareError(itEdge,ignoreCovariances);
232 edges_store_inverse_poses =
false;
238 inline size_t nodeCount()
const {
return nodes.size(); }
251 #define DEFINE_SERIALIZABLE_GRAPH \
253 virtual void writeToStream(CStream &out, int *version) const { \
254 if (version) *version = 0; \
255 else out << nodes << edges << root; \
257 virtual void readFromStream(CStream &in, int version) { \
260 case 0: { in >> nodes >> edges >> root; } break; \
261 default: MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(version) \
295 DEFINE_SERIALIZABLE_GRAPH
304 DEFINE_SERIALIZABLE_GRAPH
313 DEFINE_SERIALIZABLE_GRAPH
322 DEFINE_SERIALIZABLE_GRAPH
331 DEFINE_SERIALIZABLE_GRAPH
340 #include "CNetworkOfPoses_impl.h"