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::Node4 Class Reference

Node4 holds up to four children sorted by their key byte. More...

Inheritance diagram for duckdb::Node4:
Collaboration diagram for duckdb::Node4:

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, Node &prefix, const uint8_t byte, const GateStatus status)
 Delete the child at byte.
Static Public Member Functions inherited from duckdb::BaseNode< 4, NType::NODE_4 >
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_4 = NType::NODE_4
static constexpr uint8_t CAPACITY = 4

Static Private Member Functions

static void ShrinkNode16 (ART &art, Node &node4, Node &node16)

Friends

class Node16

Additional Inherited Members

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

Detailed Description

Node4 holds up to four children sorted by their key byte.

Member Function Documentation

◆ InsertChild()

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

Insert a child at byte.

153682 {
153683 {
153684 NodeHandle<Node4> handle(art, node);
153685 auto &n = handle.Get();
153686
153687 if (n.count != CAPACITY) {
153688 InsertChildInternal(n, byte, child);
153689 return;
153690 }
153691 }
153692 // The node is full.
153693 // Grow to Node16.
153694 auto node4 = node;
153695 Node16::GrowNode4(art, node, node4);
153696 Node16::InsertChild(art, node, byte, child);
153697}
static void InsertChild(ART &art, Node &node, const uint8_t byte, const Node child)
Insert a child at byte.
Definition duckdb.cpp:153745
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeleteChild()

void duckdb::Node4::DeleteChild ( ART & art,
Node & node,
Node & prefix,
const uint8_t byte,
const GateStatus status )
static

Delete the child at byte.

153699 {
153700 Node child;
153701 uint8_t remaining_byte;
153702
153703 {
153704 auto handle = DeleteChildInternal(art, node, byte);
153705 auto &n = handle.Get();
153706
153707 if (n.count != 1) {
153708 return;
153709 }
153710
153711 // Compress one-way nodes.
153712 child = n.children[0];
153713 remaining_byte = n.key[0];
153714 }
153715
153716 auto prev_node4_status = node.GetGateStatus();
153717 Node::FreeNode(art, node);
153718 // Propagate both the prev_node_4 status and the general gate status (if the gate was earlier on),
153719 // since the concatenation logic depends on both.
153720 Prefix::Concat(art, parent, node, child, remaining_byte, prev_node4_status, status);
153721}
static void FreeNode(ART &art, Node &node)
Free the node.
Definition duckdb.cpp:154622
static void Concat(ART &art, Node &parent, Node &node4, const Node child, uint8_t byte, const GateStatus node4_status, const GateStatus status)
Concatenates parent -> prev_node4 -> child.
Definition duckdb.cpp:155491
::uint8_t uint8_t
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShrinkNode16()

void duckdb::Node4::ShrinkNode16 ( ART & art,
Node & node4,
Node & node16 )
staticprivate
153723 {
153724 {
153725 auto n4_handle = New(art, node4);
153726 auto &n4 = n4_handle.Get();
153727 node4.SetGateStatus(node16.GetGateStatus());
153728
153729 NodeHandle<Node16> n16_handle(art, node16);
153730 auto &n16 = n16_handle.Get();
153731
153732 n4.count = n16.count;
153733 for (uint8_t i = 0; i < n16.count; i++) {
153734 n4.key[i] = n16.key[i];
153735 n4.children[i] = n16.children[i];
153736 }
153737 }
153738 Node::FreeNode(art, node16);
153739}
static NodeHandle< BaseNode > New(ART &art, Node &node)
Definition duckdb.cpp:57961

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