dalicious.region

Defines a Region and common operation with these. A Region is a set of tagged intervals where differently tagged intervals are distinct.

Members

Classes

EmptyRegionException
class EmptyRegionException

Thrown if regions is unexpectedly empty.

MismatchingTagsException
class MismatchingTagsException(Tag)

Thrown if two operands require the same tag but different were provided.

Functions

clusterByDistance
void clusterByDistance(R region, N mergeDistance)
Undocumented in source. Be warned that the author may not have intended to support it.
convexHull
auto convexHull(R region)

Returns the minimum/supremum point or convex hull of the intervals. Both minimum and supremum are undefined for empty regions but the convex hull is not.

empty
bool empty(T thing)

Returns true iff thing is empty

enforceMatchingTags
void enforceMatchingTags(Taggable taggableA, Taggable taggableB)
Undocumented in source. Be warned that the author may not have intended to support it.
enforceNonEmpty
void enforceNonEmpty(R region)
Undocumented in source. Be warned that the author may not have intended to support it.
filterIntervals
void filterIntervals(R region)
Undocumented in source. Be warned that the author may not have intended to support it.
findTilings
auto findTilings(T[] elements, N maxLocalOverlap, N maxGlobalOverlap)
Undocumented in source. Be warned that the author may not have intended to support it.
min
auto min(R region)
sup
auto sup(R region)

Returns the minimum/supremum point or convex hull of the intervals. Both minimum and supremum are undefined for empty regions but the convex hull is not.

union_
auto union_(Range regions)

Returns the union of all elements.

Structs

Region
struct Region(Number, Tag, string tagAlias = null, Tag emptyTag = Tag.init)

A Region is a set of tagged intervals where differently tagged intervals are distinct.

Tiling
struct Tiling(R, N, T)
Undocumented in source.

Templates

TagType
template TagType(T)

Returns the type of the property tag of T.

isTaggable
template isTaggable(T)

Checks if T has a property tag implicitly convertible to Tag – if given.

taggedRegionAliases
template taggedRegionAliases(string regionName, Number, Tag, string tagAlias = null, Tag emptyTag = Tag.init)

Create aliases for Region, TaggedInterval and TaggedPoint with given name. This creates three aliases NameRegion, NameInterval and NameCoordinate with Name replaced by given regionName. The remaining template arguments are passed to Region except for tagAlias. If omitted it will be derived from regionName by lowering the first character and appending Id, e.g. nameId.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE file.

Authors

Arne Ludwig <arne.ludwig@posteo.de>