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

Node7Leaf holds up to seven sorted bytes. More...

Inheritance diagram for duckdb::Node7Leaf:
Collaboration diagram for duckdb::Node7Leaf:

Static Public Member Functions

static void InsertByte (ART &art, Node &node, const uint8_t byte)
 Insert a byte.
static void DeleteByte (ART &art, Node &node, Node &prefix, const uint8_t byte, const ARTKey &row_id)
 Delete a byte.
Static Public Member Functions inherited from duckdb::BaseLeaf< 7, NType::NODE_7_LEAF >
static NodeHandle< BaseLeaf > New (ART &art, Node &node)
 Get a new BaseLeaf and initialize it.

Static Public Attributes

static constexpr NType NODE_7_LEAF = NType::NODE_7_LEAF
static constexpr uint8_t CAPACITY = 7
static constexpr idx_t AND_LAST_BYTE = 0xFFFFFFFFFFFFFF00

Static Private Member Functions

static void ShrinkNode15Leaf (ART &art, Node &node7_leaf, Node &node15_leaf)

Friends

class Node15Leaf

Additional Inherited Members

Public Member Functions inherited from duckdb::BaseLeaf< 7, NType::NODE_7_LEAF >
BaseLeaf & operator= (const BaseLeaf &)=delete
bool HasByte (const uint8_t byte) const
 Returns true, if the byte exists, else false.
array_ptr< uint8_t > GetBytes ()
bool GetNextByte (uint8_t &byte) const

Detailed Description

Node7Leaf holds up to seven sorted bytes.

Member Function Documentation

◆ InsertByte()

void duckdb::Node7Leaf::InsertByte ( ART & art,
Node & node,
const uint8_t byte )
static

Insert a byte.

153489 {
153490 {
153491 NodeHandle<Node7Leaf> handle(art, node);
153492 auto &n7 = handle.Get();
153493
153494 if (n7.count != CAPACITY) {
153495 InsertByteInternal(n7, byte);
153496 return;
153497 }
153498 }
153499 // The node is full. Grow to Node15.
153500 auto node7 = node;
153501 Node15Leaf::GrowNode7Leaf(art, node, node7);
153502 Node15Leaf::InsertByte(art, node, byte);
153503}
static void InsertByte(ART &art, Node &node, const uint8_t byte)
Insert a byte.
Definition duckdb.cpp:153556
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeleteByte()

void duckdb::Node7Leaf::DeleteByte ( ART & art,
Node & node,
Node & prefix,
const uint8_t byte,
const ARTKey & row_id )
static

Delete a byte.

153505 {
153506 idx_t remainder;
153507 {
153508 auto n7_handle = DeleteByteInternal(art, node, byte);
153509 auto &n7 = n7_handle.Get();
153510
153511 if (n7.count != 1) {
153512 return;
153513 }
153514
153515 // Compress one-way nodes.
153516 D_ASSERT(node.GetGateStatus() == GateStatus::GATE_NOT_SET);
153517
153518 // Get the remaining row ID.
153519 remainder = UnsafeNumericCast<idx_t>(row_id.GetRowId()) & AND_LAST_BYTE;
153520 remainder |= UnsafeNumericCast<idx_t>(n7.key[0]);
153521
153522 // Free the prefix (nodes) and inline the remainder.
153523 if (prefix.GetType() == NType::PREFIX) {
153524 Node::FreeTree(art, prefix);
153525 Leaf::New(prefix, UnsafeNumericCast<row_t>(remainder));
153526 return;
153527 }
153528 }
153529 // Free the Node7Leaf and inline the remainder.
153530 Node::FreeNode(art, node);
153531 Leaf::New(node, UnsafeNumericCast<row_t>(remainder));
153532}
static void New(Node &node, const row_t row_id)
Inline a row ID into a node pointer.
Definition duckdb.cpp:154285
static void FreeNode(ART &art, Node &node)
Free the node.
Definition duckdb.cpp:154622
static void FreeTree(ART &art, Node &node)
Free the node and its children.
Definition duckdb.cpp:154628
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShrinkNode15Leaf()

void duckdb::Node7Leaf::ShrinkNode15Leaf ( ART & art,
Node & node7_leaf,
Node & node15_leaf )
staticprivate
153534 {
153535 {
153536 auto n7_handle = New(art, node7_leaf);
153537 auto &n7 = n7_handle.Get();
153538
153539 NodeHandle<Node15Leaf> n15_handle(art, node15_leaf);
153540 auto &n15 = n15_handle.Get();
153541
153542 node7_leaf.SetGateStatus(node15_leaf.GetGateStatus());
153543
153544 n7.count = n15.count;
153545 for (uint8_t i = 0; i < n15.count; i++) {
153546 n7.key[i] = n15.key[i];
153547 }
153548 }
153549 Node::FreeNode(art, node15_leaf);
153550}
static NodeHandle< BaseLeaf > New(ART &art, Node &node)
Definition duckdb.cpp:150900

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