Represents a virtual array that provides memory bounds checking.
Constructor | Description |
Full Usage:
VirtualArray(memory, head, length)
Parameters:
'A array
head : int
length : int
Returns: VirtualArray<'A>
|
|
Instance member | Description | ||
Full Usage:
this.Head
Returns: int
|
|||
Full Usage:
this.IsEmpty
Returns: bool
|
|||
Full Usage:
this[i]
Returns: int
The value at the specified index.
|
|
||
Full Usage:
this.Length
Returns: int
|
|||
Full Usage:
this.Memory
Returns: 'A array
|
Static member | Description | ||
Full Usage:
VirtualArray.fold2 folder state vArray1 vArray2
Parameters:
'State -> 'A -> 'B -> 'State
-
The folder function.
state : 'State
-
The initial state.
vArray1 : VirtualArray<'A>
-
The first virtual array.
vArray2 : VirtualArray<'B>
-
The second virtual array.
Returns: 'State
The folded result.
|
|
||
Full Usage:
VirtualArray.iteri2 action vArray output
Parameters:
int -> 'A -> 'A
-
The action to apply to each element.
vArray : VirtualArray<'A>
-
The input array
output : 'A array
-
The output array to store results.
|
|
||
Full Usage:
VirtualArray.mirror arr
Parameters:
'A array
-
The array to mirror.
Returns: VirtualArray<'A>
A virtual array mirroring 'arr'.
|
|||
Full Usage:
VirtualArray.splitInto count vArray
Parameters:
int
-
The number of sub-arrays to create.
vArray : VirtualArray<'A>
-
The initial array to be split.
Returns: VirtualArray<'A>[]
An array of virtual sub-arrays.
|
|