UtilResizeArray Module
Types
| Type | Description |
|
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
|
Full Usage:
badCountExn arr funcName expected
Parameters:
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".
|
Full Usage:
badGetExn i arr funcName
Parameters:
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.
|
Full Usage:
badSetExn i arr funcName doingSet
Parameters:
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.
|
Full Usage:
contentAsString entriesToPrint arr
Parameters:
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.
|
Full Usage:
debugTxt i
Parameters:
int option
Returns: string
Modifiers: inline |
|
Full Usage:
fail arr funcAndReason
Parameters:
ResizeArray<'T>
funcAndReason : string
Returns: 'a
Type parameters: 'T, 'a |
Throws a ResizeArrayTArgumentException with a message that includes the content of the ResizeArray.
|
Full Usage:
failIdx arr funcAndReason
Parameters:
ResizeArray<'T>
funcAndReason : string
Returns: 'a
Type parameters: 'T, 'a |
Throws an IndexOutOfRangeException with a message that includes the content of the ResizeArray.
|
Full Usage:
failKey arr funcAndReason
Parameters:
ResizeArray<'T>
funcAndReason : string
Returns: 'a
Type parameters: 'T, 'a |
Throws a ResizeArrayTKeyNotFoundException with a message that includes the content of the ResizeArray.
|
Full Usage:
failSimple funcAndReason
Parameters:
string
Returns: 'a
Type parameters: 'a |
Throws a ResizeArrayTArgumentException with a message containing the function name and reason.
|
Full Usage:
isNegZero x
Parameters:
^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.
|
Full Usage:
itemInOneLineWithMaxChars charCount item
Parameters:
int
item : 'T
Returns: string
Type parameters: 'T |
|
Full Usage:
maximumFloat xs
Parameters:
ResizeArray<float>
Returns: float
|
|
Full Usage:
maximumFloat32 xs
Parameters:
ResizeArray<float32>
Returns: float32
|
|
Full Usage:
maximumNumberFloat xs
Parameters:
ResizeArray<float>
Returns: float
|
|
Full Usage:
maximumNumberFloat32 xs
Parameters:
ResizeArray<float32>
Returns: float32
|
|
Full Usage:
maximumNumberOf a b
Parameters:
^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.
|
Full Usage:
maximumOf a b
Parameters:
^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.
|
Full Usage:
minimumFloat xs
Parameters:
ResizeArray<float>
Returns: float
|
|
Full Usage:
minimumFloat32 xs
Parameters:
ResizeArray<float32>
Returns: float32
|
|
Full Usage:
minimumNumberFloat xs
Parameters:
ResizeArray<float>
Returns: float
|
|
Full Usage:
minimumNumberFloat32 xs
Parameters:
ResizeArray<float32>
Returns: float32
|
|
Full Usage:
minimumNumberOf a b
Parameters:
^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.
|
Full Usage:
minimumOf a b
Parameters:
^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.
|
Full Usage:
negIdx i len
Parameters:
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)
|
Full Usage:
negIdxLooped i length
Parameters:
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
|
Full Usage:
nullExn funcName
Parameters:
string
Returns: 'a
Type parameters: 'a |
Throws a ResizeArrayTArgumentNullException with a message that includes the function name.
|
Full Usage:
retype x
Parameters:
'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.
|
Full Usage:
toStringCore ofType arr
Parameters:
'a
arr : ResizeArray<'T>
Returns: string
Modifiers: inline Type parameters: 'a, 'T |
|
Full Usage:
toStringInline arr
Parameters:
ResizeArray<'T>
Returns: string
Modifiers: inline Type parameters: 'T |
|
Full Usage:
typeOfName ()
Parameters:
unit
Returns: string
Modifiers: inline Type parameters: 'T |
|
Full Usage:
zeroLen ()
Parameters:
unit
Returns: 'a
Type parameters: 'a |
|
ResizeArray