ImageProcessing.ArtemBurashnikov 1.0.0


VirtualArray<'A> Type

Represents a virtual array that provides memory bounds checking.

Constructors

Constructor Description

VirtualArray(memory, head, length)

Full Usage: VirtualArray(memory, head, length)

Parameters:
    memory : 'A array
    head : int
    length : int

Returns: VirtualArray<'A>
memory : 'A array
head : int
length : int
Returns: VirtualArray<'A>

Instance members

Instance member Description

this.Head

Full Usage: this.Head

Returns: int

Gets the starting index within the memory array.

Returns: int

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool

Gets a value indicating whether the virtual array is empty.

Returns: bool

this[i]

Full Usage: this[i]

Returns: int The value at the specified index.

Gets or sets the value at the specified index in the virtual array.

Returns: int

The value at the specified index.

IndexOutOfRangeException Thrown if the index is out of bounds.

this.Length

Full Usage: this.Length

Returns: int

Gets the length of the virtual array.

Returns: int

this.Memory

Full Usage: this.Memory

Returns: 'A array

Gets the underlying memory array.

Returns: 'A array

Static members

Static member Description

VirtualArray.fold2 folder state vArray1 vArray2

Full Usage: VirtualArray.fold2 folder state vArray1 vArray2

Parameters:
    folder : '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.

Folds two virtual arrays using a folder function.

folder : '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.

ArgumentException Thrown if 'vArray1' and 'vArray2' have different lengths.

VirtualArray.iteri2 action vArray output

Full Usage: VirtualArray.iteri2 action vArray output

Parameters:
    action : 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.

Iterates over the virtual array and applies an action to each element.

action : 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.

ArgumentException Thrown if 'output' does not match the virtual array length.

VirtualArray.mirror arr

Full Usage: VirtualArray.mirror arr

Parameters:
    arr : 'A array - The array to mirror.

Returns: VirtualArray<'A> A virtual array mirroring 'arr'.

Creates a new virtual array that mirrors an existing array.

arr : 'A array

The array to mirror.

Returns: VirtualArray<'A>

A virtual array mirroring 'arr'.

VirtualArray.splitInto count vArray

Full Usage: VirtualArray.splitInto count vArray

Parameters:
    count : 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.

Splits the virtual array into a specified number of sub-arrays.

count : 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.

ArgumentException Thrown if 'count' is not positive.