Skip to content

Commit ffd2926

Browse files
author
Mykyta Zotov
committed
Feature: Update README to enhance structure and clarity of RangeData documentation
1 parent a28da1b commit ffd2926

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,9 +1603,9 @@ public void ValidateCoordinates(double lat, double lon)
16031603

16041604
</details>
16051605

1606-
# RangeData Library
1606+
## RangeData Library
16071607

1608-
## RangeData Overview
1608+
### RangeData Overview
16091609

16101610
`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.
16111611

@@ -1638,7 +1638,7 @@ public void ValidateCoordinates(double lat, double lon)
16381638
</details>
16391639

16401640

1641-
## Overview
1641+
### Overview
16421642

16431643
`RangeData<TRange, TData, TDomain>` is an abstraction that couples:
16441644

@@ -1652,7 +1652,7 @@ This abstraction allows working with **large or dynamic sequences** without imme
16521652

16531653
---
16541654

1655-
## Core Design Principles
1655+
### Core Design Principles
16561656

16571657
- **Immutability:** All operations return new `RangeData` instances; originals remain unchanged.
16581658
- **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
16631663
<details>
16641664
<summary>Extension Methods Details</summary>
16651665

1666-
### Intersection (`Intersect`)
1666+
#### Intersection (`Intersect`)
16671667
- Returns the intersection of two `RangeData` objects.
16681668
- Data is **sourced from the right range** (fresh data).
16691669
- Returns `null` if there is no overlap.
16701670
- Lazy, O(n) for skip/take on the data sequence.
16711671

1672-
### Union (`Union`)
1672+
#### Union (`Union`)
16731673
- Combines two ranges if they are **overlapping or adjacent**.
16741674
- In overlapping regions, **right range data takes priority**.
16751675
- Returns `null` if ranges are completely disjoint.
@@ -1678,12 +1678,12 @@ This abstraction allows working with **large or dynamic sequences** without imme
16781678
2. Partial overlap → left non-overlapping portion + right data.
16791679
3. Left wraps around right → left non-overlapping left + right + left non-overlapping right.
16801680

1681-
### TrimStart / TrimEnd
1681+
#### TrimStart / TrimEnd
16821682
- Trim the range from the start or end.
16831683
- Returns new `RangeData` with sliced data.
16841684
- Returns `null` if the trim removes the entire range.
16851685

1686-
### Containment & Adjacency Checks
1686+
#### Containment & Adjacency Checks
16871687
- `Contains(value)` / `Contains(range)` check range membership.
16881688
- `IsTouching`, `IsBeforeAndAdjacentTo`, `IsAfterAndAdjacentTo` verify **overlap or adjacency**.
16891689
- Useful for merging sequences or building ordered chains.

0 commit comments

Comments
 (0)