<commit_before>#ifndef RTREE_H
#define RTREE_H

#include <stdbool.h>
#include <stdint.h>

typedef struct rtree_node_t {
  uint32_t len;
  bool red;
  void *data;
  double fit, tot;
  double link_sum[2];
  struct rtree_node_t *link[2];
} rtree_node_t;

typedef struct {
  rtree_node_t *root;
} rtree_t;

rtree_t *rtree_create();
void rtree_destroy(rtree_t *rt);

void rtree_add(rtree_t *rt, void *elt_ptr, double fitness);

void *rtree_rget(rtree_t *rt);
void *rtree_rpop(rtree_t *rt);

uint32_t rtree_length(rtree_t *rt);
double rtree_total_fitness(rtree_t *rt);

#ifdef RTREE_DEBUG

int rb_check(rtree_node_t *root);
double total_fit_check(rtree_t *rt);
double fit_check(rtree_node_t *root);

#endif

#endif

<commit_msg>Whoops, add preorder debug printer to header.<commit_after>#ifndef RTREE_H
#define RTREE_H

#include <stdbool.h>
#include <stdint.h>

typedef struct rtree_node_t {
  uint32_t len;
  bool red;
  void *data;
  double fit, tot;
  double link_sum[2];
  struct rtree_node_t *link[2];
} rtree_node_t;

typedef struct {
  rtree_node_t *root;
} rtree_t;

rtree_t *rtree_create();
void rtree_destroy(rtree_t *rt);

void rtree_add(rtree_t *rt, void *elt_ptr, double fitness);

void *rtree_rget(rtree_t *rt);
void *rtree_rpop(rtree_t *rt);

uint32_t rtree_length(rtree_t *rt);
double rtree_total_fitness(rtree_t *rt);

#ifdef RTREE_DEBUG

int rb_check(rtree_node_t *root);
double total_fit_check(rtree_t *rt);
double fit_check(rtree_node_t *root);

void rtree_preorder(rtree_t *rt);

#endif

#endif


{'fraction_non_alphanumeric': 0.11250827266710788, 'fraction_numerical': 0.007941760423560556, 'mean_word_length': 6.132075471698113, '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': '4069069', 'n_tokens_mistral': 668, 'n_tokens_neox': 654, 'n_words': 145}