<commit_before>// File created: 2011-08-21 16:17:06

#ifndef MUSHSPACE_BOUNDS_H
#define MUSHSPACE_BOUNDS_H

#include "coords.all.h"
#include "stdlib.any.h"
#include "typenames.any.h"

#define mushbounds MUSHSPACE_NAME(mushbounds)

typedef struct mushbounds {
   mushcoords beg, end;
} mushbounds;

MUSH_DECL_CONST_DYN_ARRAY(mushbounds)

#define mushbounds_clamped_size    MUSHSPACE_CAT(mushbounds,_clamped_size)
#define mushbounds_contains        MUSHSPACE_CAT(mushbounds,_contains)
#define mushbounds_safe_contains   MUSHSPACE_CAT(mushbounds,_safe_contains)
#define mushbounds_safe_contains1  MUSHSPACE_CAT(mushbounds,_safe_contains1)
#define mushbounds_contains_bounds MUSHSPACE_CAT(mushbounds,_contains_bounds)
#define mushbounds_overlaps        MUSHSPACE_CAT(mushbounds,_overlaps)
#define mushbounds_safe_overlaps   MUSHSPACE_CAT(mushbounds,_safe_overlaps)
#define mushbounds_on_same_axis    MUSHSPACE_CAT(mushbounds,_on_same_axis)
#define mushbounds_can_fuse        MUSHSPACE_CAT(mushbounds,_can_fuse)
#define mushbounds_tessellate      MUSHSPACE_CAT(mushbounds,_tessellate)
#define mushbounds_tessellate_unsafe \
   MUSHSPACE_CAT(mushbounds,_tessellate_unsafe)

size_t mushbounds_clamped_size(const mushbounds*);

// The safe versions work even if the bounds have beg > end.
bool mushbounds_contains      (const mushbounds*, mushcoords);
bool mushbounds_safe_contains (const mushbounds*, mushcoords);
bool mushbounds_safe_contains1(const mushbounds*, mushcoords, mushdim);

bool mushbounds_contains_bounds(const mushbounds*, const mushbounds*);
bool mushbounds_overlaps       (const mushbounds*, const mushbounds*);
bool mushbounds_safe_overlaps  (const mushbounds*, const mushbounds*);

#if !MUSHSPACE_93
void mushbounds_get_overlap(const mushbounds*, const mushbounds*, mushbounds*);
#endif

#if MUSHSPACE_DIM > 1
bool mushbounds_on_same_axis(const mushbounds*, const mushbounds*, mushdim);
#endif
<commit_msg>bounds: add missing #define mushbounds_get_overlap<commit_after>// File created: 2011-08-21 16:17:06

#ifndef MUSHSPACE_BOUNDS_H
#define MUSHSPACE_BOUNDS_H

#include "coords.all.h"
#include "stdlib.any.h"
#include "typenames.any.h"

#define mushbounds MUSHSPACE_NAME(mushbounds)

typedef struct mushbounds {
   mushcoords beg, end;
} mushbounds;

MUSH_DECL_CONST_DYN_ARRAY(mushbounds)

#define mushbounds_clamped_size    MUSHSPACE_CAT(mushbounds,_clamped_size)
#define mushbounds_contains        MUSHSPACE_CAT(mushbounds,_contains)
#define mushbounds_safe_contains   MUSHSPACE_CAT(mushbounds,_safe_contains)
#define mushbounds_safe_contains1  MUSHSPACE_CAT(mushbounds,_safe_contains1)
#define mushbounds_contains_bounds MUSHSPACE_CAT(mushbounds,_contains_bounds)
#define mushbounds_overlaps        MUSHSPACE_CAT(mushbounds,_overlaps)
#define mushbounds_safe_overlaps   MUSHSPACE_CAT(mushbounds,_safe_overlaps)
#define mushbounds_get_overlap     MUSHSPACE_CAT(mushbounds,_get_overlap)
#define mushbounds_on_same_axis    MUSHSPACE_CAT(mushbounds,_on_same_axis)
#define mushbounds_can_fuse        MUSHSPACE_CAT(mushbounds,_can_fuse)
#define mushbounds_tessellate      MUSHSPACE_CAT(mushbounds,_tessellate)
#define mushbounds_tessellate_unsafe \
   MUSHSPACE_CAT(mushbounds,_tessellate_unsafe)

size_t mushbounds_clamped_size(const mushbounds*);

// The safe versions work even if the bounds have beg > end.
bool mushbounds_contains      (const mushbounds*, mushcoords);
bool mushbounds_safe_contains (const mushbounds*, mushcoords);
bool mushbounds_safe_contains1(const mushbounds*, mushcoords, mushdim);

bool mushbounds_contains_bounds(const mushbounds*, const mushbounds*);
bool mushbounds_overlaps       (const mushbounds*, const mushbounds*);
bool mushbounds_safe_overlaps  (const mushbounds*, const mushbounds*);

#if !MUSHSPACE_93
void mushbounds_get_overlap(const mushbounds*, const mushbounds*, mushbounds*);
#endif

#if MUSHSPACE_DIM > 1
bool mushbounds_on_same_axis(const mushbounds*, const mushbounds*, mushdim);
#endif

{'fraction_non_alphanumeric': 0.07499366607550038, 'fraction_numerical': 0.010134279199391943, 'mean_word_length': 8.13888888888889, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4063107', 'n_tokens_mistral': 1374, 'n_tokens_neox': 1343, 'n_words': 255}