range-0.2.1.0: An efficient and versatile range library.

Safe HaskellSafe
LanguageHaskell98

Data.Range.RangeTree

Description

Deprecated: Use Data.Range.Algebra instead

Synopsis

Documentation

evaluate :: (Ord a, Enum a) => RangeTree a -> [Range a] Source #

Evaluates a Range Tree into the final set of ranges that it compresses down to. Use this whenever you want to finally evaluate your constructed Range Tree.

data RangeTree a Source #

A Range Tree is a construct that can be built and then efficiently evaluated so that you can compress an entire tree of operations on ranges into a single range quickly. The only purpose of this tree is to allow efficient construction of range operations that can be evaluated as is required.

Constructors

RangeNode RangeOperation (RangeTree a) (RangeTree a)

Combine two range trees together with a single operation

RangeNodeInvert (RangeTree a)

Invert a range tree, this is a not operation.

RangeLeaf [Range a]

A leaf with a set of ranges that are collected together.

data RangeOperation Source #

These are the operations that can join two disjunct lists of ranges together.

Constructors

RangeUnion

Represents the set union operation.

RangeIntersection

Represents the set intersection operation.

RangeDifference

Represents the set difference operation.