Main Content
fold
Class: matlab.compiler.mlspark.RDD
Namespace: matlab.compiler.mlspark
Aggregate elements of each partition and the subsequent results for all partitions
Syntax
result =
fold(obj,zeroValue,func)
Description
aggregates
the elements of each partition in result
=
fold(obj
,zeroValue
,func
)obj
and the
subsequent results for all the partitions, using an associative function func
and
a neutral “zero value” represented by zeroValue
.
Input Arguments
Output Arguments
Examples
Version History
Introduced in R2016b
See Also
foldByKey
| groupBy
| collect
| parallelize