We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75c063c commit f9b64beCopy full SHA for f9b64be
include/a_star.hpp
@@ -14,6 +14,16 @@ namespace utils
14
node(std::weak_ptr<node<Tp>> parent, const Tp &g_cost) noexcept : parent_node(std::move(parent)), g(g_cost) {}
15
virtual ~node() = default;
16
17
+ /**
18
+ * @brief Returns a unique identifier for the node.
19
+ *
20
+ * This function provides a way to uniquely identify each node instance.
21
+ * The identifier is derived from the memory address of the node object.
22
23
+ * @return A uintptr_t representing the unique identifier of the node.
24
+ */
25
+ [[nodiscard]] uintptr_t get_id() const noexcept { return reinterpret_cast<uintptr_t>(this); }
26
+
27
/**
28
* @brief Returns a shared pointer to the parent node.
29
*
0 commit comments