You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1603,9 +1603,9 @@ public void ValidateCoordinates(double lat, double lon)
1603
1603
1604
1604
</details>
1605
1605
1606
-
# RangeData Library
1606
+
##RangeData Library
1607
1607
1608
-
## RangeData Overview
1608
+
###RangeData Overview
1609
1609
1610
1610
`RangeData<TRange, TData, TDomain>` is a lightweight, in-process, **lazy, domain-aware** data structure that combines ranges with associated data sequences. It allows **composable operations** like intersection, union, trimming, and projections while maintaining strict invariants.
1611
1611
@@ -1638,7 +1638,7 @@ public void ValidateCoordinates(double lat, double lon)
1638
1638
</details>
1639
1639
1640
1640
1641
-
## Overview
1641
+
###Overview
1642
1642
1643
1643
`RangeData<TRange, TData, TDomain>` is an abstraction that couples:
1644
1644
@@ -1652,7 +1652,7 @@ This abstraction allows working with **large or dynamic sequences** without imme
1652
1652
1653
1653
---
1654
1654
1655
-
## Core Design Principles
1655
+
###Core Design Principles
1656
1656
1657
1657
-**Immutability:** All operations return new `RangeData` instances; originals remain unchanged.
1658
1658
-**Lazy evaluation:** LINQ operators and iterators are used; data is processed only on enumeration.
@@ -1663,13 +1663,13 @@ This abstraction allows working with **large or dynamic sequences** without imme
1663
1663
<details>
1664
1664
<summary>Extension Methods Details</summary>
1665
1665
1666
-
### Intersection (`Intersect`)
1666
+
####Intersection (`Intersect`)
1667
1667
- Returns the intersection of two `RangeData` objects.
1668
1668
- Data is **sourced from the right range** (fresh data).
1669
1669
- Returns `null` if there is no overlap.
1670
1670
- Lazy, O(n) for skip/take on the data sequence.
1671
1671
1672
-
### Union (`Union`)
1672
+
####Union (`Union`)
1673
1673
- Combines two ranges if they are **overlapping or adjacent**.
1674
1674
- In overlapping regions, **right range data takes priority**.
1675
1675
- Returns `null` if ranges are completely disjoint.
@@ -1678,12 +1678,12 @@ This abstraction allows working with **large or dynamic sequences** without imme
1678
1678
2. Partial overlap → left non-overlapping portion + right data.
1679
1679
3. Left wraps around right → left non-overlapping left + right + left non-overlapping right.
1680
1680
1681
-
### TrimStart / TrimEnd
1681
+
####TrimStart / TrimEnd
1682
1682
- Trim the range from the start or end.
1683
1683
- Returns new `RangeData` with sliced data.
1684
1684
- Returns `null` if the trim removes the entire range.
1685
1685
1686
-
### Containment & Adjacency Checks
1686
+
####Containment & Adjacency Checks
1687
1687
-`Contains(value)` / `Contains(range)` check range membership.
1688
1688
-`IsTouching`, `IsBeforeAndAdjacentTo`, `IsAfterAndAdjacentTo` verify **overlap or adjacency**.
1689
1689
- Useful for merging sequences or building ordered chains.
0 commit comments