IndexRange
The type that represents a range of indicies meant for indexing into an array or a collection. It has three properties start, stop and step that determine the range of indicies and their skip interval.
graph BT
N1["IndexRange"] -->|inherits| N2["Unpackable[Int64]"];
N2["Unpackable[Int64]"] -->|inherits| N3["Iterable[Int64]"];
N2["Unpackable[Int64]"] -->|inherits| N4["UnpackableAT"];
N4["UnpackableAT"] -->|inherits| N5["Length"];
N4["UnpackableAT"] -->|inherits| N6["IterableAT"];
N4["UnpackableAT"] -->|inherits| N7["CollectionAT"];
N7["CollectionAT"] -->|inherits| N8["Any"];
N6["IterableAT"] -->|inherits| N8["Any"];
N5["Length"] -->|inherits| N8["Any"];
N3["Iterable[Int64]"] -->|inherits| N6["IterableAT"];
N6["IterableAT"] -->|inherits| N8["Any"];
Characteristics
Quality | Value |
---|---|
Inherits | Unpackable[Len] |
Extends | N/A |
Decorators | #Gambol.layout.c; |
Is enum | false |
Is sealed | false |
Is extern | false |
Is abstract | false |
Is generator | false |
Has value semantics | true |
Has stored properties | true |
Should register destructor | false |
Has atomic memory | true |
Is copy assignable | true |
Is zero initializable | false |
Methods
construct
construct (s @Self, start Len?, stop Len?, step Len = 1) -> Self
get_bounds
get_bounds (s @Self, container_len Len) -> Len, Len, Len
container_len
and this index range, determine the start index, stop index and the number of items included.
len
#strict
len (s @Self) -> Len
get_iterator
get_iterator (s @Self) -> IndexRangeIterator
Binary Operators
=
#default
= (s @Self, o @Self) -> Self
Properties
start
start Len
stop
stop Len
step
step Len