Logo ResizeArray

UtilResizeArray Module

Types

Type Description

DebugIndexer<'T>

A simple wrapper for a ResizeArray. Its sole purpose is to provide a better exception message when an index is out of range.

Functions and values

Function or value Description

badCountExn arr funcName expected

Full Usage: badCountExn arr funcName expected

Parameters:
    arr : ResizeArray<'T>
    funcName : string
    expected : string

Returns: 'a
Type parameters: 'T, 'a

Throws an IndexOutOfRangeException when the ResizeArray does not have the expected number of items, with a message that includes the content of the ResizeArray. 'expected' is a description of the expected item count, e.g. "exactly one item".

arr : ResizeArray<'T>
funcName : string
expected : string
Returns: 'a

badGetExn i arr funcName

Full Usage: badGetExn i arr funcName

Parameters:
    i : int
    arr : ResizeArray<'T>
    funcName : string

Returns: 'a
Type parameters: 'T, 'a

Throws an IndexOutOfRangeException for getting a bad index with a message that includes the content of the ResizeArray.

i : int
arr : ResizeArray<'T>
funcName : string
Returns: 'a

badSetExn i arr funcName doingSet

Full Usage: badSetExn i arr funcName doingSet

Parameters:
    i : int
    arr : ResizeArray<'T>
    funcName : string
    doingSet : 'T

Returns: 'a
Type parameters: 'T, 'a

Throws an IndexOutOfRangeException for setting a bad index with a message that includes the content of the ResizeArray.

i : int
arr : ResizeArray<'T>
funcName : string
doingSet : 'T
Returns: 'a

contentAsString entriesToPrint arr

Full Usage: contentAsString entriesToPrint arr

Parameters:
    entriesToPrint : int
    arr : ResizeArray<'T>

Returns: string
Type parameters: 'T

Returns a string with the content of the ResizeArray up to 'entriesToPrint' entries. Includes the index of each entry. Includes the last entry.

entriesToPrint : int
arr : ResizeArray<'T>
Returns: string

debugTxt i

Full Usage: debugTxt i

Parameters:
    i : int option

Returns: string
Modifiers: inline
i : int option
Returns: string

fail arr funcAndReason

Full Usage: fail arr funcAndReason

Parameters:
    arr : ResizeArray<'T>
    funcAndReason : string

Returns: 'a
Type parameters: 'T, 'a

Throws a ResizeArrayTArgumentException with a message that includes the content of the ResizeArray.

arr : ResizeArray<'T>
funcAndReason : string
Returns: 'a

failIdx arr funcAndReason

Full Usage: failIdx arr funcAndReason

Parameters:
    arr : ResizeArray<'T>
    funcAndReason : string

Returns: 'a
Type parameters: 'T, 'a

Throws an IndexOutOfRangeException with a message that includes the content of the ResizeArray.

arr : ResizeArray<'T>
funcAndReason : string
Returns: 'a

failKey arr funcAndReason

Full Usage: failKey arr funcAndReason

Parameters:
    arr : ResizeArray<'T>
    funcAndReason : string

Returns: 'a
Type parameters: 'T, 'a

Throws a ResizeArrayTKeyNotFoundException with a message that includes the content of the ResizeArray.

arr : ResizeArray<'T>
funcAndReason : string
Returns: 'a

failSimple funcAndReason

Full Usage: failSimple funcAndReason

Parameters:
    funcAndReason : string

Returns: 'a
Type parameters: 'a

Throws a ResizeArrayTArgumentException with a message containing the function name and reason.

funcAndReason : string
Returns: 'a

isNegZero x

Full Usage: isNegZero x

Parameters:
    x : ^F

Returns: bool
Modifiers: inline
Type parameters: ^F, ^a, ^b (requires equality and (static member get_Zero : -> ^F) and (static member op_Division : ^a * ^F -> ^b) and (static member get_One : -> ^a) and (static member op_Division : ^a * ^F -> ^b) and (static member get_Zero : -> ^b) and comparison)

True for -0.0. For float and float32.

x : ^F
Returns: bool

itemInOneLineWithMaxChars charCount item

Full Usage: itemInOneLineWithMaxChars charCount item

Parameters:
    charCount : int
    item : 'T

Returns: string
Type parameters: 'T
charCount : int
item : 'T
Returns: string

maximumFloat xs

Full Usage: maximumFloat xs

Parameters:
    xs : ResizeArray<float>

Returns: float
xs : ResizeArray<float>
Returns: float

maximumFloat32 xs

Full Usage: maximumFloat32 xs

Parameters:
    xs : ResizeArray<float32>

Returns: float32
xs : ResizeArray<float32>
Returns: float32

maximumNumberFloat xs

Full Usage: maximumNumberFloat xs

Parameters:
    xs : ResizeArray<float>

Returns: float
xs : ResizeArray<float>
Returns: float

maximumNumberFloat32 xs

Full Usage: maximumNumberFloat32 xs

Parameters:
    xs : ResizeArray<float32>

Returns: float32
xs : ResizeArray<float32>
Returns: float32

maximumNumberOf a b

Full Usage: maximumNumberOf a b

Parameters:
    a : ^F
    b : ^F

Returns: ^F
Modifiers: inline
Type parameters: ^F, ^a, ^b (requires comparison and (static member get_Zero : -> ^F) and (static member op_Division : ^a * ^F -> ^b) and (static member get_One : -> ^a) and (static member op_Division : ^a * ^F -> ^b) and (static member get_Zero : -> ^b) and comparison)

The IEEE 754:2019 'maximumNumber' of two floats: NaN is skipped and +0.0 is bigger than -0.0. Returns NaN only if both are NaN.

a : ^F
b : ^F
Returns: ^F

maximumOf a b

Full Usage: maximumOf a b

Parameters:
    a : ^F
    b : ^F

Returns: ^F
Modifiers: inline
Type parameters: ^F, ^a, ^b (requires comparison and (static member get_Zero : -> ^F) and (static member op_Division : ^a * ^F -> ^b) and (static member get_One : -> ^a) and (static member op_Division : ^a * ^F -> ^b) and (static member get_Zero : -> ^b) and comparison)

The IEEE 754:2019 'maximum' of two floats: NaN propagates and +0.0 is bigger than -0.0.

a : ^F
b : ^F
Returns: ^F

minimumFloat xs

Full Usage: minimumFloat xs

Parameters:
    xs : ResizeArray<float>

Returns: float
xs : ResizeArray<float>
Returns: float

minimumFloat32 xs

Full Usage: minimumFloat32 xs

Parameters:
    xs : ResizeArray<float32>

Returns: float32
xs : ResizeArray<float32>
Returns: float32

minimumNumberFloat xs

Full Usage: minimumNumberFloat xs

Parameters:
    xs : ResizeArray<float>

Returns: float
xs : ResizeArray<float>
Returns: float

minimumNumberFloat32 xs

Full Usage: minimumNumberFloat32 xs

Parameters:
    xs : ResizeArray<float32>

Returns: float32
xs : ResizeArray<float32>
Returns: float32

minimumNumberOf a b

Full Usage: minimumNumberOf a b

Parameters:
    a : ^F
    b : ^F

Returns: ^F
Modifiers: inline
Type parameters: ^F, ^a, ^b (requires comparison and (static member get_Zero : -> ^F) and (static member op_Division : ^a * ^F -> ^b) and (static member get_One : -> ^a) and (static member op_Division : ^a * ^F -> ^b) and (static member get_Zero : -> ^b) and comparison)

The IEEE 754:2019 'minimumNumber' of two floats: NaN is skipped and -0.0 is smaller than +0.0. Returns NaN only if both are NaN.

a : ^F
b : ^F
Returns: ^F

minimumOf a b

Full Usage: minimumOf a b

Parameters:
    a : ^F
    b : ^F

Returns: ^F
Modifiers: inline
Type parameters: ^F, ^a, ^b (requires comparison and (static member get_Zero : -> ^F) and (static member op_Division : ^a * ^F -> ^b) and (static member get_One : -> ^a) and (static member op_Division : ^a * ^F -> ^b) and (static member get_Zero : -> ^b) and comparison)

The IEEE 754:2019 'minimum' of two floats: NaN propagates and -0.0 is smaller than +0.0.

a : ^F
b : ^F
Returns: ^F

negIdx i len

Full Usage: negIdx i len

Parameters:
    i : int
    len : int

Returns: int
Modifiers: inline

Converts negative indices to positive ones. Correct results from -length up to length-1 For example, -1 is the last item. (from the release of F# 5 on a negative index can also be done with '^' prefix. E.g. ^0 for the last item)

i : int
len : int
Returns: int

negIdxLooped i length

Full Usage: negIdxLooped i length

Parameters:
    i : int
    length : int

Returns: int
Modifiers: inline

Any int will give a valid index for given collection size. Converts negative indices to positive ones and loops to start after last index is reached. Returns a valid index for a collection of 'length' items for any integer

i : int
length : int
Returns: int

nullExn funcName

Full Usage: nullExn funcName

Parameters:
    funcName : string

Returns: 'a
Type parameters: 'a

Throws a ResizeArrayTArgumentNullException with a message that includes the function name.

funcName : string
Returns: 'a

retype x

Full Usage: retype x

Parameters:
    x : 'T

Returns: 'U
Modifiers: inline
Type parameters: 'T, 'U

Casts x to 'U. Only use it when 'T and 'U are known to be the same type at runtime.

x : 'T
Returns: 'U

toStringCore ofType arr

Full Usage: toStringCore ofType arr

Parameters:
    ofType : 'a
    arr : ResizeArray<'T>

Returns: string
Modifiers: inline
Type parameters: 'a, 'T
ofType : 'a
arr : ResizeArray<'T>
Returns: string

toStringInline arr

Full Usage: toStringInline arr

Parameters:
    arr : ResizeArray<'T>

Returns: string
Modifiers: inline
Type parameters: 'T
arr : ResizeArray<'T>
Returns: string

typeOfName ()

Full Usage: typeOfName ()

Parameters:
    () : unit

Returns: string
Modifiers: inline
Type parameters: 'T
() : unit
Returns: string

zeroLen ()

Full Usage: zeroLen ()

Parameters:
    () : unit

Returns: 'a
Type parameters: 'a
() : unit
Returns: 'a

Type something to start searching.