Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::Node16 Class Reference
Inheritance diagram for duckdb::Node16:
Collaboration diagram for duckdb::Node16:

Static Public Member Functions

static void InsertChild (ART &art, Node &node, const uint8_t byte, const Node child)
 Insert a child at byte.
static void DeleteChild (ART &art, Node &node, const uint8_t byte)
 Delete the child at byte.
Static Public Member Functions inherited from duckdb::BaseNode< 16, NType::NODE_16 >
static NodeHandle< BaseNode > New (ART &art, Node &node)
 Get a new BaseNode handle and initialize the base node.
static void ReplaceChild (BaseNode &n, const uint8_t byte, const Node child)
 Replace the child at byte.
static unsafe_optional_ptr< Node > GetChild (BaseNode &n, const uint8_t byte, const bool unsafe=false)
 Get the child at byte.
static unsafe_optional_ptr< Node > GetNextChild (BaseNode &n, uint8_t &byte)
 Get the first child greater than or equal to the byte.
static void Iterator (BaseNode< CAPACITY, TYPE > &n, F &&lambda)

Static Public Attributes

static constexpr NType NODE_16 = NType::NODE_16
static constexpr uint8_t CAPACITY = 16

Static Private Member Functions

static void GrowNode4 (ART &art, Node &node16, Node &node4)
static void ShrinkNode48 (ART &art, Node &node16, Node &node48)
 We shrink at < Node48::SHRINK_THRESHOLD.

Friends

class Node4
class Node48

Additional Inherited Members

Public Member Functions inherited from duckdb::BaseNode< 16, NType::NODE_16 >
BaseNode & operator= (const BaseNode &)=delete
NodeChildren ExtractChildren (ArenaAllocator &arena)

Member Function Documentation

◆ InsertChild()

void duckdb::Node16::InsertChild ( ART & art,
Node & node,
const uint8_t byte,
const Node child )
static

Insert a child at byte.

153745 {
153746 {
153747 NodeHandle<Node16> handle(art, node);
153748 auto &n = handle.Get();
153749 if (n.count != CAPACITY) {
153750 InsertChildInternal(n, byte, child);
153751 return;
153752 }
153753 }
153754 // The node is full.
153755 // Grow to Node48.
153756 auto node16 = node;
153757 Node48::GrowNode16(art, node, node16);
153758 Node48::InsertChild(art, node, byte, child);
153759}
static void InsertChild(ART &art, Node &node, const uint8_t byte, const Node child)
Insert a child at byte.
Definition duckdb.cpp:155333
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeleteChild()

void duckdb::Node16::DeleteChild ( ART & art,
Node & node,
const uint8_t byte )
static

Delete the child at byte.

153761 {
153762 {
153763 auto handle = DeleteChildInternal(art, node, byte);
153764 auto &n = handle.Get();
153765 if (n.count >= Node4::CAPACITY) {
153766 return;
153767 }
153768 }
153769 // Shrink node to Node4.
153770 auto node16 = node;
153771 Node4::ShrinkNode16(art, node, node16);
153772}
Here is the caller graph for this function:

◆ GrowNode4()

void duckdb::Node16::GrowNode4 ( ART & art,
Node & node16,
Node & node4 )
staticprivate
153774 {
153775 {
153776 NodeHandle<Node4> n4_handle(art, node4);
153777 auto &n4 = n4_handle.Get();
153778
153779 auto n16_handle = New(art, node16);
153780 auto &n16 = n16_handle.Get();
153781 node16.SetGateStatus(node4.GetGateStatus());
153782
153783 n16.count = n4.count;
153784 for (uint8_t i = 0; i < n4.count; i++) {
153785 n16.key[i] = n4.key[i];
153786 n16.children[i] = n4.children[i];
153787 }
153788 }
153789 Node::FreeNode(art, node4);
153790}
static NodeHandle< BaseNode > New(ART &art, Node &node)
Definition duckdb.cpp:57961
static void FreeNode(ART &art, Node &node)
Free the node.
Definition duckdb.cpp:154622

◆ ShrinkNode48()

void duckdb::Node16::ShrinkNode48 ( ART & art,
Node & node16,
Node & node48 )
staticprivate

We shrink at < Node48::SHRINK_THRESHOLD.

153792 {
153793 {
153794 auto n16_handle = New(art, node16);
153795 auto &n16 = n16_handle.Get();
153796 node16.SetGateStatus(node48.GetGateStatus());
153797
153798 NodeHandle<Node48> n48_handle(art, node48);
153799 auto &n48 = n48_handle.Get();
153800
153801 n16.count = 0;
153802 for (uint16_t i = 0; i < Node256::CAPACITY; i++) {
153803 if (n48.child_index[i] != Node48::EMPTY_MARKER) {
153804 n16.key[n16.count] = UnsafeNumericCast<uint8_t>(i);
153805 n16.children[n16.count] = n48.children[n48.child_index[i]];
153806 n16.count++;
153807 }
153808 }
153809 }
153810 Node::FreeNode(art, node48);
153811}
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: