FSharp.Collections.Immutable 1.0.0

Edit this page

FlatList.Parallel Module

The functions of Parallel that take or return tuples, with reference tuples instead of struct tuples.

The other functions of the default module stay available after open FSharp.Collections.Immutable.Tuple. Each function has the signature of the function with the same name in Parallel.

Functions and values

Function or value Description

Parallel.groupBy projection array

Full Usage: Parallel.groupBy projection array

Parameters:
    projection : 'T -> 'Key - The function that returns the key of an element, called in parallel.
    array : FlatList<'T> - The input flat list.

Returns: FlatList<'Key * FlatList<'T>> The keys with their elements. The order of the keys and the order of the elements of a key are not specified.

Groups the elements by the key of a projection.

O(n). The keys compare in F# structural equality, except that keys of type Double and Single compare as in Parallel.GroupBy, which puts all NaN keys in one group.

projection : 'T -> 'Key

The function that returns the key of an element, called in parallel.

array : FlatList<'T>

The input flat list.

Returns: FlatList<'Key * FlatList<'T>>

The keys with their elements. The order of the keys and the order of the elements of a key are not specified.

Parallel.partition predicate array

Full Usage: Parallel.partition predicate array

Parameters:
    predicate : 'T -> bool - The function to test the elements, called in parallel.
    array : FlatList<'T> - The input flat list.

Returns: FlatList<'T> * FlatList<'T> The elements that satisfy the predicate and the other ones, both in their order.

Splits the elements by a predicate.

O(n).

predicate : 'T -> bool

The function to test the elements, called in parallel.

array : FlatList<'T>

The input flat list.

Returns: FlatList<'T> * FlatList<'T>

The elements that satisfy the predicate and the other ones, both in their order.

Parallel.partitionWith partitioner array

Full Usage: Parallel.partitionWith partitioner array

Parameters:
    partitioner : 'T -> Choice<'T1, 'T2> - The function that returns Choice1Of2 or Choice2Of2 for an element, called in parallel.
    array : FlatList<'T> - The input flat list.

Returns: FlatList<'T1> * FlatList<'T2> The values of the first choices and of the second choices, both in the order of the elements.

Splits the elements by the choice that a function returns for them.

O(n).

partitioner : 'T -> Choice<'T1, 'T2>

The function that returns Choice1Of2 or Choice2Of2 for an element, called in parallel.

array : FlatList<'T>

The input flat list.

Returns: FlatList<'T1> * FlatList<'T2>

The values of the first choices and of the second choices, both in the order of the elements.

Parallel.zip array1 array2

Full Usage: Parallel.zip array1 array2

Parameters:
    array1 : FlatList<'T1> - The first flat list.
    array2 : FlatList<'T2> - The second flat list.

Returns: FlatList<'T1 * 'T2> The pairs of elements at the same index.

Combines two flat lists into a flat list of pairs, in parallel.

O(n).

array1 : FlatList<'T1>

The first flat list.

array2 : FlatList<'T2>

The second flat list.

Returns: FlatList<'T1 * 'T2>

The pairs of elements at the same index.

ArgumentException Thrown when the flat lists have different lengths.