|
Enhanced C#
Language of your choice: library documentation
|
A bidirectional range that can perform operations such as intersection and overlap tests on pairs of ranges of the same type. More...
A bidirectional range that can perform operations such as intersection and overlap tests on pairs of ranges of the same type.
| R | The type that implements this interface |
| T | The type of elements in the range |
| R | : | IBRangeEx | |
| R | : | R | |
| R | : | T | |
| R | : | ICloneable<R> |
Properties | |
| IEnumerable< T > | InnerList [get] |
| Gets the list upon which this range is based. More... | |
| int | SliceStart [get] |
| Index where this range starts within the InnerList. More... | |
Properties inherited from Loyc.Collections.IBRange< out T > | |
| T | Back [get] |
| Returns the value of the last item in the range. More... | |
Properties inherited from Loyc.Collections.IFRange< out T > | |
| T | Front [get] |
| Returns the first value in the range, without popping it. More... | |
Properties inherited from Loyc.Collections.IIsEmpty | |
| bool | IsEmpty [get] |
Public Member Functions | |
| R | Intersect (R other) |
| Gets the region of overlap between two ranges. More... | |
| R | Union (R other) |
| Gets a range just large enough to contain both ranges. More... | |
Public Member Functions inherited from Loyc.Collections.IBRange< out T > | |
| T | PopBack (out bool fail) |
| Removes the last item from the range and returns it. More... | |
Public Member Functions inherited from Loyc.Collections.IFRange< out T > | |
| T | PopFront (out bool fail) |
| Removes the first item from the range and returns it. More... | |
Public Member Functions inherited from Loyc.ICloneable< out T > | |
| T | Clone () |
| R Loyc.Collections.IBRangeEx< R, T >.Intersect | ( | R | other | ) |
Gets the region of overlap between two ranges.
If the ranges do not overlap, an empty range is returned with InnerList set to the same value that this range has.
| R Loyc.Collections.IBRangeEx< R, T >.Union | ( | R | other | ) |
Gets a range just large enough to contain both ranges.
| InvalidOperationException | The two ranges cannot be combined because they have different InnerList values. |
As long as both ranges are based on the same list, this method succeeds. For example, if one range covers 5..6 and the other range covers 10..20, the union covers 5..20.
|
get |
Gets the list upon which this range is based.
The return type is IEnumerable{T} since the available list interfaces may vary, e.g. it might be ICollection{T} or IListSource{T}.
|
get |
Index where this range starts within the InnerList.
1.8.7