MBrace.Flow


CloudFlowExtensions

Namespace: MBrace.Flow.Fluent

Static members

Static memberDescription
average(source)
Signature: source:CloudFlow<^T> -> Cloud<^T>
Type parameters: ^T

Computes the average of the elements in the input flow.

averageBy(this, projection)
Signature: (this:CloudFlow<'T> * projection:('T -> ^U)) -> Cloud<^U>
Type parameters: 'T, ^U

Computes the average of the projections given by the supplied function on the input flow.

cache(this)
Signature: this:CloudFlow<'T> -> Cloud<PersistedCloudFlow<'T>>
Type parameters: 'T

Creates a PersistedCloudFlow from the given CloudFlow, with its partitions cached locally

collect(this, f)
Signature: (this:CloudFlow<'T> * f:('T -> '?30063)) -> CloudFlow<'R>
Type parameters: 'T, '?30063, 'R

Transforms each element of the input CloudFlow to a new sequence and flattens its elements.

countBy(this, projection)
Signature: (this:CloudFlow<'T> * projection:('T -> 'Key)) -> CloudFlow<'Key * int64>
Type parameters: 'T, 'Key

Applies a key-generating function to each element of a CloudFlow and return a CloudFlow yielding unique keys and their number of occurrences in the original sequence.

distinct(source)
Signature: source:CloudFlow<'T> -> CloudFlow<'T>
Type parameters: 'T

Returns a flow that contains no duplicate elements according to their generic hash and equality comparisons. If an element occurs multiple times in the flow then only one is retained.

distinctBy(source, projection)
Signature: (source:CloudFlow<'T> * projection:('T -> 'Key)) -> CloudFlow<'T>
Type parameters: 'T, 'Key

Returns a flow that contains no duplicate entries according to the generic hash and equality comparisons on the keys returned by the given key-generating function. If an element occurs multiple times in the flow then only one is retained.

exists(this, predicate)
Signature: (this:CloudFlow<'T> * predicate:('T -> bool)) -> Cloud<bool>
Type parameters: 'T

Tests if any element of the flow satisfies the given predicate.

filter(this, predicate)
Signature: (this:CloudFlow<'T> * predicate:('T -> bool)) -> CloudFlow<'T>
Type parameters: 'T

Filters the elements of the input CloudFlow.

find(this, predicate)
Signature: (this:CloudFlow<'T> * predicate:('T -> bool)) -> Cloud<'T>
Type parameters: 'T

Returns the first element for which the given function returns true. Raises KeyNotFoundException if no such element exists.

fold(this, folder, combiner, state)
Signature: (this:CloudFlow<'T> * folder:('State -> 'T -> 'State) * combiner:('State -> 'State -> 'State) * state:(unit -> 'State)) -> Cloud<'State>
Type parameters: 'T, 'State

Applies a function to each element of the CloudFlow, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN, then this function computes f (... (f s i0)...) iN.

foldBy(...)
Signature: (this:CloudFlow<'T> * projection:('T -> 'Key) * folder:('State -> 'T -> 'State) * combiner:('State -> 'State -> 'State) * state:(unit -> 'State)) -> CloudFlow<'Key * 'State>
Type parameters: 'T, 'Key, 'State

Applies a key-generating function to each element of a CloudFlow and return a CloudFlow yielding unique keys and the result of the threading an accumulator.

forall(this, predicate)
Signature: (this:CloudFlow<'T> * predicate:('T -> bool)) -> Cloud<bool>
Type parameters: 'T

Tests if all elements of the parallel flow satisfy the given predicate.

groupBy(source, projection)
Signature: (source:CloudFlow<'T> * projection:('T -> 'Key)) -> CloudFlow<'Key * seq<'T>>
Type parameters: 'T, 'Key

Applies a key-generating function to each element of the input flow and yields a flow of unique keys and a sequence of all elements that have each key.

isEmpty(this)
Signature: this:CloudFlow<'T> -> Cloud<bool>
Type parameters: 'T

Returs true if the flow is empty and false otherwise.

iter(this, action)
Signature: (this:CloudFlow<'T> * action:('T -> unit)) -> Cloud<unit>
Type parameters: 'T

Runs the action on each element. The actions are not necessarily performed in order.

length(this)
Signature: this:CloudFlow<'T> -> Cloud<int64>
Type parameters: 'T

Returns the total number of elements of the CloudFlow.

map(this, f)
Signature: (this:CloudFlow<'T> * f:('T -> 'R)) -> CloudFlow<'R>
Type parameters: 'T, 'R

Transforms each element of the input CloudFlow.

maxBy(this, projection)
Signature: (this:CloudFlow<'T> * projection:('T -> 'Key)) -> Cloud<'T>
Type parameters: 'T, 'Key

Locates the maximum element of the flow by given key.

minBy(this, projection)
Signature: (this:CloudFlow<'T> * projection:('T -> 'Key)) -> Cloud<'T>
Type parameters: 'T, 'Key

Locates the minimum element of the flow by given key.

peek(this, f)
Signature: (this:CloudFlow<'T> * f:('T -> LocalCloud<unit>)) -> CloudFlow<'T>
Type parameters: 'T

Enables the insertion of a monadic side-effect in a distributed flow. Output remains the same.

persist(this, storageLevel)
Signature: (this:CloudFlow<'T> * storageLevel:StorageLevel) -> Cloud<PersistedCloudFlow<'T>>
Type parameters: 'T

Creates a PersistedCloudFlow from the given CloudFlow.

pick(this, chooser)
Signature: (this:CloudFlow<'T> * chooser:('T -> 'R option)) -> Cloud<'R>
Type parameters: 'T, 'R

Applies the given function to successive elements, returning the first result where the function returns a Some value. Raises KeyNotFoundException when every item of the cloud flow evaluates to None when the given function is applied.

reduce(this, reducer)
Signature: (this:CloudFlow<'T> * reducer:('T -> 'T -> 'T)) -> Cloud<'T>
Type parameters: 'T

Reduces the elements of the input flow to a single value via the given reducer function. The reducer function is first applied to the first two elements of the flow. Then, the reducer is applied on the result of the first reduction and the third element.

reduceBy(source, projection, reducer)
Signature: (source:CloudFlow<'T> * projection:('T -> 'Key) * reducer:('T -> 'T -> 'T)) -> CloudFlow<'Key * 'T>
Type parameters: 'T, 'Key

Groups the elements of the input flow according to given key generating function and reduces the elements of each group to a single value via the given reducer function.

sortBy(this, projection, takeCount)
Signature: (this:CloudFlow<'T> * projection:('T -> 'Key) * takeCount:int) -> CloudFlow<'T>
Type parameters: 'T, 'Key

Applies a key-generating function to each element of the input CloudFlow and yields the CloudFlow of the given length, ordered by keys.

sortByDescending(...)
Signature: (this:CloudFlow<'T> * projection:('T -> 'Key) * takeCount:int) -> CloudFlow<'T>
Type parameters: 'T, 'Key

Applies a key-generating function to each element of the input CloudFlow and yields the CloudFlow of the given length, ordered descending by keys.

sortByUsing(...)
Signature: (this:CloudFlow<'T> * projection:('T -> 'Key) * comparer:IComparer<'Key> * takeCount:int) -> CloudFlow<'T>
Type parameters: 'T, 'Key

Applies a key-generating function to each element of the input CloudFlow and yields the CloudFlow of the given length, ordered using the given comparer for the keys.

sum(flow)
Signature: flow:CloudFlow<^T> -> Cloud<^T>
Type parameters: ^T

Returns the sum of the elements.

sumBy(this, f)
Signature: (this:CloudFlow<'T> * f:('T -> ^S)) -> Cloud<^S>
Type parameters: 'T, ^S

Applies a key-generating function to each element of a CloudFlow and return the sum of the keys.

take(this, n)
Signature: (this:CloudFlow<'T> * n:int) -> CloudFlow<'T>
Type parameters: 'T

Returns the elements of a CloudFlow up to a specified count.

toArray(this)
Signature: this:CloudFlow<'T> -> Cloud<'T []>
Type parameters: 'T

Creates an array from the given CloudFlow.

toCloudFlow(this)
Signature: (this:'T []) -> CloudFlow<'T>
Type parameters: 'T

Wraps array as a CloudFlow.

toCloudQueue(this, channel)
Signature: (this:CloudFlow<'T> * channel:CloudQueue<'T>) -> Cloud<unit>
Type parameters: 'T

Sends the values of CloudFlow to the SendPort of a CloudQueue

tryFind(this, predicate)
Signature: (this:CloudFlow<'T> * predicate:('T -> bool)) -> Cloud<'T option>
Type parameters: 'T

Returns the first element for which the given function returns true. Returns None if no such element exists.

tryPick(this, chooser)
Signature: (this:CloudFlow<'T> * chooser:('T -> 'R option)) -> Cloud<'R option>
Type parameters: 'T, 'R

Applies the given function to successive elements, returning the first result where the function returns a Some value.

withDegreeOfParallelism(...)
Signature: (this:CloudFlow<'T> * degreeOfParallelism:int) -> CloudFlow<'T>
Type parameters: 'T

Returns a cloud flow with a new degree of parallelism.

Fork me on GitHub