38 CHMHMapArcPtr CHMHMapArc::Create(
44 CHMHMapArcPtr
obj = CHMHMapArcPtr(
new CHMHMapArc(from,to,hyps,parent));
50 node->onArcAddition(
obj);
52 node->onArcAddition(
obj);
86 CHMHMapArcPtr
obj = CHMHMapArcPtr(
new CHMHMapArc(from,to,hyps,parent));
92 if (from) from->onArcAddition(
obj);
93 if (to) to->onArcAddition(
obj);
107 node->onArcDestruction(
this);
109 node->onArcDestruction(
this);
164 if (it->pointer()==
this)
170 ASSERTMSG_(myPtr.present(),
"I cannot be found in my parent HMT map!")
178 node->onArcAddition(myPtr);
180 node->onArcAddition(myPtr);
195 printf(
"Dumping arcs list: %u elements\n", (
unsigned int)
size());
198 printf(
"\t'%s'\t-> '%s'\n", (*i)->m_parent->getNodeByID( (*i)->getNodeFrom() )->m_label.c_str(),
199 (*i)->m_parent->getNodeByID( (*i)->getNodeTo() )->m_label.c_str() );
218 out << static_cast<uint32_t>(this->
size());
THypothesisIDSet m_hypotheses
The hypothesis IDs under which this arc exists.
void setType(const std::string &type)
Sets the currently selected type.
static CHMHMapArcPtr Create()
void read(utils::CStream &in)
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
utils::CMHPropertiesValuesList m_annotations
The annotations of the arc, see the general description of the class for possible properties and valu...
class HMTSLAM_IMPEXP CHMHMapArc
void readFromStream(mrpt::utils::CStream &in, int version)
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
EIGEN_STRONG_INLINE iterator begin()
EIGEN_STRONG_INLINE void push_back(Scalar val)
Insert an element at the end of the container (for 1D vectors/arrays)
CHMHMapNodePtr getNodeByID(CHMHMapNode::TNodeID id)
Returns the node with the given ID, or NULL if it does not exist.
#define ARC_TYPES
Used in constructor of mrpt::hmtslam::CHMHMapArc.
CHMHMapNode::TNodeID m_nodeTo
const Scalar * const_iterator
utils::CTypeSelector m_arcType
The type of the arc, the possibilities are:
GLsizei GLsizei GLuint * obj
void clear()
Clear the contents of this container.
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const
Introduces a pure virtual method responsible for writing to a CStream.
CHMHMapNode::TNodeID m_nodeFrom
The origin/target nodes for this arc.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps. ...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
uint64_t TNodeID
The type for node IDs in graphs of different types.
virtual ~CHMHMapArc()
Destructor.
void onArcAddition(CHMHMapArcPtr &arc)
Event handler to be called just after an arc has being created: it will be added to the internal list...
GLsizei const GLchar ** string
std::string getType() const
Gets the currently selected type, from the set of posibilities.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model...
CHMHMapArc(const CHMHMapNode::TNodeID &from=0, const CHMHMapNode::TNodeID &to=0, const THypothesisIDSet &hyps=THypothesisIDSet(), CHierarchicalMHMap *parent=NULL)
Private constructor (see ::Create class factory)
TNodeID getID() const
Reads the ID of the node (read-only property)
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map...
unsigned __int32 uint32_t
#define ASSERTMSG_(f, __ERROR_MSG)
GLuint GLuint GLsizei GLenum type
A class for representing a node in a hierarchical, multi-hypothesis map.
mrpt::utils::safe_ptr< CHierarchicalMHMap > m_parent
The hierarchical graph in which this object is into.
mrpt::utils::TNodeID TNodeID
The type of the IDs of nodes.
void onNodeDestruction(CHMHMapNode *node)
Event handler to be called just before a node is being destroyed: it should be called only for nodes ...
void write(utils::CStream &out) const