39 CHMHMapArc::CHMHMapArc(
64 node->onArcDestruction(
this);
121 if (it->get() ==
this)
127 ASSERTMSG_(myPtr,
"I cannot be found in my parent HMT map!")
136 node->onArcAddition(myPtr);
138 node->onArcAddition(myPtr);
151 printf(
"Dumping arcs list: %u elements\n", (
unsigned int)
size());
156 (*i)->m_parent->getNodeByID((*i)->getNodeFrom())->m_label.c_str(),
157 (*i)->m_parent->getNodeByID((*i)->getNodeTo())->m_label.c_str());
166 for (i = 0; i <
n; i++)
175 out << static_cast<uint32_t>(this->
size());
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
#define ARC_TYPES
Used in constructor of mrpt::hmtslam::CHMHMapArc.
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map.
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const override
Introduces a pure virtual method responsible for writing to a CStream.
utils::CMHPropertiesValuesList m_annotations
The annotations of the arc, see the general description of the class for possible properties and valu...
THypothesisIDSet m_hypotheses
The hypothesis IDs under which this arc exists.
mrpt::utils::safe_ptr< CHierarchicalMHMap > m_parent
The hierarchical graph in which this object is into.
CHMHMapNode::TNodeID m_nodeFrom
The origin/target nodes for this arc.
CHMHMapNode::TNodeID m_nodeTo
std::shared_ptr< CHMHMapArc > Ptr
void onNodeDestruction(CHMHMapNode *node)
Event handler to be called just before a node is being destroyed: it should be called only for nodes ...
virtual ~CHMHMapArc()
Destructor.
void readFromStream(mrpt::utils::CStream &in, int version) override
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
utils::CTypeSelector m_arcType
The type of the arc, the possibilities are:
A class for representing a node in a hierarchical, multi-hypothesis map.
std::shared_ptr< CHMHMapNode > Ptr
TNodeID getID() const
Reads the ID of the node (read-only property)
The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model.
void read(utils::CStream &in)
void write(utils::CStream &out) const
A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
std::string getType() const
Gets the currently selected type, from the set of posibilities.
void setType(const std::string &type)
Sets the currently selected type.
const Scalar * const_iterator
EIGEN_STRONG_INLINE void push_back(Scalar val)
Insert an element at the end of the container (for 1D vectors/arrays)
EIGEN_STRONG_INLINE iterator begin()
GLuint GLuint GLsizei GLenum type
GLsizei const GLchar ** string
uint64_t TNodeID
The type for node IDs in graphs of different types.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
#define ASSERTMSG_(f, __ERROR_MSG)
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
void clear()
Clear the contents of this container.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned __int32 uint32_t