<commit_before>// Copyright ©2012 <NAME> <<EMAIL>>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// Package interval implements an interval tree based on an augmented
// Left-Leaning Red Black tree.
package interval

import (
	"errors"
)

const (
	TD234 = iota
	BU23
)

// Operation mode of the underlying LLRB tree.
const Mode = BU23

func init() {
	if Mode != TD234 && Mode != BU23 {
		panic("interval: unknown mode")
	}
}

// ErrInvertedRange is returned if an Overlapper, o is used where the minimum values is
// greater than the maximum value according to Compare().
var ErrInvertedRange = errors.New("interval: inverted range")

// An Overlapper is a type that can be inserted into a Tree or used as a range
// or equality query on the tree,
type Overlapper interface {
	// Overlap returns a value indicating the sort order relationship between the
	// receiver and the parameter.<commit_msg>Documentation typo fix<commit_after>// Copyright ©2012 <NAME> <<EMAIL>>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// Package interval implements an interval tree based on an augmented
// Left-Leaning Red Black tree.
package interval

import (
	"errors"
)

const (
	TD234 = iota
	BU23
)

// Operation mode of the underlying LLRB tree.
const Mode = BU23

func init() {
	if Mode != TD234 && Mode != BU23 {
		panic("interval: unknown mode")
	}
}

// ErrInvertedRange is returned if an Overlapper is used where the minimum value is
// greater than the maximum value according to Compare().
var ErrInvertedRange = errors.New("interval: inverted range")

// An Overlapper is a type that can be inserted into a Tree or used as a range
// or equality query on the tree,
type Overlapper interface {
	// Overlap returns a value indicating the sort order relationship between the
	// receiver and the parameter.
{'fraction_non_alphanumeric': 0.08009305417082087, 'fraction_numerical': 0.011299435028248588, 'mean_word_length': 3.5195195195195197, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6144776', 'n_tokens_mistral': 806, 'n_tokens_neox': 775, 'n_words': 428}