<commit_before>/* node.h
   <NAME> (<EMAIL>), 04 May 2014
   FreeBSD-style copyright and disclaimer apply

   trie node.
*/

#pragma once

#include "key.h"
#include "region/region.h"

// -----------------------------------------------------------------------------
// node
// -----------------------------------------------------------------------------

struct trie_node;<commit_msg>trie: first draft of node interface.<commit_after>/* node.h
   <NAME> (<EMAIL>), 04 May 2014
   FreeBSD-style copyright and disclaimer apply

   trie node.
*/

#pragma once

#include "key.h"
#include "region/region.h"

// -----------------------------------------------------------------------------
// node
// -----------------------------------------------------------------------------

uint64_t trie_node_get(
        struct ilka_region *r, ilka_ptr_t node,
        struct ilka_key_it key);

void trie_node_lb(
        struct ilka_region *r, ilka_ptr_t node,
        struct ilka_key_it key, struct ilka_key_it lb);

void trie_node_ub(
        struct ilka_region *r, ilka_ptr_t node,
        struct ilka_key_it key, struct ilka_key_it ub);

int trie_node_next(
        struct ilka_region *r, ilka_ptr_t node,
        struct ilka_key_it key, struct ilka_key_it prev);

int trie_node_prev(
        struct ilka_region *r, ilka_ptr_t node,
        struct ilka_key_it key, struct ilka_key_it next);

int trie_node_add(
        struct ilka_region *r, ilka_ptr_t node,
        struct ilka_key_it key, uint64_t value);

int trie_node_cmp_xchg(
        struct ilka_region *r, ilka_ptr_t node,
        struct ilka_key_it key, uint64_t *expected, uint64_t desired);

int trie_node_cmp_rmv(
        struct ilka_region *r, ilka_ptr_t node,
        struct ilka_key_it key, uint64_t *expected);
{'fraction_non_alphanumeric': 0.24631936579841449, 'fraction_numerical': 0.01245753114382786, 'mean_word_length': 1.6772727272727272, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5063181', 'n_tokens_mistral': 576, 'n_tokens_neox': 552, 'n_words': 148}