MRPT
1.9.9
|
A class for representing a node in a hierarchical, multi-hypothesis map.
The node itself will be considered only if some given hypothesisID matchs its own ID.
Definition at line 34 of file CHMHMapNode.h.
#include <mrpt/hmtslam/CHMHMapNode.h>
Public Types | |
using | TNodeID = mrpt::graphs::TNodeID |
The type of the IDs of nodes. More... | |
Public Member Functions | |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void | operator delete (void *ptr) noexcept |
void | operator delete[] (void *ptr) noexcept |
void | operator delete (void *memory, void *ptr) noexcept |
void * | operator new (size_t size, const std::nothrow_t &) noexcept |
void | operator delete (void *ptr, const std::nothrow_t &) noexcept |
CHMHMapNode (CHierarchicalMHMap *parent=nullptr, const THypothesisIDSet &hyps=THypothesisIDSet()) | |
Constructor. More... | |
virtual | ~CHMHMapNode () |
Destructor. More... | |
TNodeID | getID () const |
Reads the ID of the node (read-only property) More... | |
unsigned int | getLevelInTheHierarchy () |
Returns the level of this node in the hierarchy of arcs "arcType_Belongs", where level=0 is the ground level, 1=its parents, etc. More... | |
unsigned int | getRelatedArcsCount () |
Returns the number of arcs starting from/ending into this node. More... | |
void | getArcs (TArcList &out) const |
Returns a list with the arcs from/to this node. More... | |
void | getArcs (TArcList &out, const THypothesisID &hyp_id) const |
Returns a list with the arcs from/to this node existing in a given hypothesis ID. More... | |
void | getArcs (TArcList &out, const char *arcType, const THypothesisID &hyp_id) const |
Returns a list with the arcs from/to this node existing in a given hypothesis ID and of a given type. More... | |
bool | isNeighbor (const TNodeID &otherArea, const THypothesisID &hyp_id) const |
Check whether an arc exists towards the given area. More... | |
virtual mxArray * | writeToMatlab () const |
Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More... | |
RTTI classes and functions for polymorphic hierarchies | |
mrpt::rtti::CObject::Ptr | duplicateGetSmartPtr () const |
Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). More... | |
Static Public Member Functions | |
static void * | operator new (size_t size, void *ptr) |
Public Attributes | |
THypothesisIDSet | m_hypotheses |
The hypothesis IDs under which this node exists. More... | |
CMHPropertiesValuesList | m_annotations |
The annotations of the node, see the general description of the class for possible properties and values. More... | |
std::string | m_nodeType |
The type of the node, the possibilities are: More... | |
std::string | m_label |
The label of the node, only for display it to the user. More... | |
Protected Member Functions | |
void | onArcDestruction (CHMHMapArc *arc) |
Event handler for arc destruction: It should be only called for arcs from/to this node, altought other case must be handled without effects. More... | |
void | onArcAddition (const std::shared_ptr< CHMHMapArc > &arc) |
Event handler for arc addition: It should be only called for arcs from/to this node, although other cases have no effects. More... | |
CSerializable virtual methods | |
uint8_t | serializeGetVersion () const override |
Must return the current versioning number of the object. More... | |
void | serializeTo (mrpt::serialization::CArchive &out) const override |
Pure virtual method for writing (serializing) to an abstract archive. More... | |
void | serializeFrom (mrpt::serialization::CArchive &in, uint8_t serial_version) override |
Pure virtual method for reading (deserializing) from an abstract archive. More... | |
Protected Attributes | |
TNodeID | m_ID |
An unique identifier for the node: it is randomly generated at construction or read from stream when loaded. More... | |
TArcList | m_arcs |
The list of all arcs from/to this node: More... | |
mrpt::safe_ptr< CHierarchicalMHMap > | m_parent |
The hierarchical graph in which this object is into. More... | |
Friends | |
class | CHierarchicalMHMap |
class | CHierarchicalMHMapPartition |
class | CHMHMapArc |
RTTI stuff | |
using | Ptr = std::shared_ptr< CHMHMapNode > |
using | ConstPtr = std::shared_ptr< const CHMHMapNode > |
using | UniquePtr = std::unique_ptr< CHMHMapNode > |
using | ConstUniquePtr = std::unique_ptr< const CHMHMapNode > |
static mrpt::rtti::CLASSINIT | _init_CHMHMapNode |
static const mrpt::rtti::TRuntimeClassId | runtimeClassId |
static constexpr const char * | className = "CHMHMapNode" |
static const mrpt::rtti::TRuntimeClassId * | _GetBaseClass () |
static constexpr auto | getClassName () |
static const mrpt::rtti::TRuntimeClassId & | GetRuntimeClassIdStatic () |
static mrpt::rtti::CObject * | CreateObject () |
template<typename... Args> | |
static Ptr | Create (Args &&... args) |
template<typename... Args> | |
static UniquePtr | CreateUnique (Args &&... args) |
virtual const mrpt::rtti::TRuntimeClassId * | GetRuntimeClass () const override |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::rtti::CObject * | clone () const override |
Returns a deep copy (clone) of the object, indepently of its class. More... | |
using mrpt::hmtslam::CHMHMapNode::ConstPtr = std::shared_ptr<const CHMHMapNode > |
Definition at line 40 of file CHMHMapNode.h.
using mrpt::hmtslam::CHMHMapNode::ConstUniquePtr = std::unique_ptr<const CHMHMapNode > |
Definition at line 40 of file CHMHMapNode.h.
A type for the associated smart pointer
Definition at line 40 of file CHMHMapNode.h.
The type of the IDs of nodes.
Definition at line 45 of file CHMHMapNode.h.
using mrpt::hmtslam::CHMHMapNode::UniquePtr = std::unique_ptr< CHMHMapNode > |
Definition at line 40 of file CHMHMapNode.h.
CHMHMapNode::CHMHMapNode | ( | CHierarchicalMHMap * | parent = nullptr , |
const THypothesisIDSet & | hyps = THypothesisIDSet() |
||
) |
Constructor.
Definition at line 23 of file CHMHMapNode.cpp.
|
virtual |
Destructor.
Definition at line 55 of file CHMHMapNode.cpp.
|
staticprotected |
|
overridevirtual |
Returns a deep copy (clone) of the object, indepently of its class.
Implements mrpt::rtti::CObject.
|
inlinestatic |
Definition at line 40 of file CHMHMapNode.h.
|
static |
|
inlinestatic |
Definition at line 40 of file CHMHMapNode.h.
|
inlineinherited |
Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).
Definition at line 168 of file CObject.h.
References mrpt::rtti::CObject::clone().
Referenced by mrpt::obs::CRawlog::addActions(), and mrpt::obs::CRawlog::addObservations().
Returns a list with the arcs from/to this node.
Definition at line 121 of file CHMHMapNode.h.
References m_arcs.
void CHMHMapNode::getArcs | ( | TArcList & | out, |
const THypothesisID & | hyp_id | ||
) | const |
Returns a list with the arcs from/to this node existing in a given hypothesis ID.
Definition at line 169 of file CHMHMapNode.cpp.
void CHMHMapNode::getArcs | ( | TArcList & | out, |
const char * | arcType, | ||
const THypothesisID & | hyp_id | ||
) | const |
Returns a list with the arcs from/to this node existing in a given hypothesis ID and of a given type.
Definition at line 179 of file CHMHMapNode.cpp.
|
inlinestatic |
Definition at line 40 of file CHMHMapNode.h.
CHMHMapNode::TNodeID CHMHMapNode::getID | ( | ) | const |
Reads the ID of the node (read-only property)
Definition at line 133 of file CHMHMapNode.cpp.
Referenced by mrpt::hmtslam::CHierarchicalMHMap::onNodeDestruction(), and mrpt::hmtslam::CHMHMapArc::onNodeDestruction().
unsigned int CHMHMapNode::getLevelInTheHierarchy | ( | ) |
Returns the level of this node in the hierarchy of arcs "arcType_Belongs", where level=0 is the ground level, 1=its parents, etc.
Definition at line 137 of file CHMHMapNode.cpp.
unsigned int CHMHMapNode::getRelatedArcsCount | ( | ) |
Returns the number of arcs starting from/ending into this node.
Definition at line 161 of file CHMHMapNode.cpp.
|
overridevirtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::serialization::CSerializable.
|
static |
bool CHMHMapNode::isNeighbor | ( | const TNodeID & | otherArea, |
const THypothesisID & | hyp_id | ||
) | const |
Check whether an arc exists towards the given area.
Definition at line 191 of file CHMHMapNode.cpp.
|
protected |
Event handler for arc addition: It should be only called for arcs from/to this node, although other cases have no effects.
Definition at line 116 of file CHMHMapNode.cpp.
References MRPT_END, and MRPT_START.
|
protected |
Event handler for arc destruction: It should be only called for arcs from/to this node, altought other case must be handled without effects.
Definition at line 95 of file CHMHMapNode.cpp.
References mrpt::hmtslam::CHMHMapArc::m_nodeFrom, mrpt::hmtslam::CHMHMapArc::m_nodeTo, MRPT_END, and MRPT_START.
|
inlinenoexcept |
Definition at line 40 of file CHMHMapNode.h.
Definition at line 40 of file CHMHMapNode.h.
Definition at line 40 of file CHMHMapNode.h.
Definition at line 40 of file CHMHMapNode.h.
|
inline |
Definition at line 40 of file CHMHMapNode.h.
Definition at line 40 of file CHMHMapNode.h.
|
inlinenoexcept |
Definition at line 40 of file CHMHMapNode.h.
|
inline |
Definition at line 40 of file CHMHMapNode.h.
|
overrideprotectedvirtual |
Pure virtual method for reading (deserializing) from an abstract archive.
Users don't call this method directly. Instead, use stream >> object;
.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 74 of file CHMHMapNode.cpp.
References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION.
|
overrideprotectedvirtual |
Must return the current versioning number of the object.
Start in zero for new classes, and increments each time there is a change in the stored format.
Implements mrpt::serialization::CSerializable.
Definition at line 65 of file CHMHMapNode.cpp.
|
overrideprotectedvirtual |
Pure virtual method for writing (serializing) to an abstract archive.
Users don't call this method directly. Instead, use stream << object;
.
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 66 of file CHMHMapNode.cpp.
|
inlinevirtualinherited |
Introduces a pure virtual method responsible for writing to a mxArray
Matlab object, typically a MATLAB struct
whose contents are documented in each derived class.
mxArray
(caller is responsible of memory freeing) or nullptr is class does not support conversion to MATLAB. Definition at line 68 of file CSerializable.h.
|
friend |
Definition at line 36 of file CHMHMapNode.h.
|
friend |
Definition at line 37 of file CHMHMapNode.h.
|
friend |
Definition at line 38 of file CHMHMapNode.h.
|
staticprotected |
Definition at line 40 of file CHMHMapNode.h.
|
static |
Definition at line 40 of file CHMHMapNode.h.
CMHPropertiesValuesList mrpt::hmtslam::CHMHMapNode::m_annotations |
The annotations of the node, see the general description of the class for possible properties and values.
Definition at line 92 of file CHMHMapNode.h.
|
protected |
The list of all arcs from/to this node:
Definition at line 59 of file CHMHMapNode.h.
Referenced by getArcs().
THypothesisIDSet mrpt::hmtslam::CHMHMapNode::m_hypotheses |
The hypothesis IDs under which this node exists.
Definition at line 49 of file CHMHMapNode.h.
|
protected |
An unique identifier for the node: it is randomly generated at construction or read from stream when loaded.
Definition at line 55 of file CHMHMapNode.h.
std::string mrpt::hmtslam::CHMHMapNode::m_label |
The label of the node, only for display it to the user.
Definition at line 108 of file CHMHMapNode.h.
std::string mrpt::hmtslam::CHMHMapNode::m_nodeType |
The type of the node, the possibilities are:
Definition at line 100 of file CHMHMapNode.h.
|
protected |
The hierarchical graph in which this object is into.
Definition at line 76 of file CHMHMapNode.h.
|
staticprotected |
Definition at line 40 of file CHMHMapNode.h.
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |