C
- Type of a partition context
.D
- Type of a partition data
.public class LocalDataset<C extends Serializable,D extends AutoCloseable> extends Object implements Dataset<C,D>
Map
and List
and doesn't require
Ignite environment. Introduces for testing purposes mostly, but can be used for simple local computations as well.Modifier and Type | Method and Description |
---|---|
void |
close() |
<R> R |
compute(IgniteBiFunction<D,LearningEnvironment,R> map,
IgniteBinaryOperator<R> reduce,
R identity)
Applies the specified
map function to every partition data and LearningEnvironment
in the dataset and then reduces map results to final result by using the reduce function. |
<R> R |
computeWithCtx(IgniteTriFunction<C,D,LearningEnvironment,R> map,
IgniteBinaryOperator<R> reduce,
R identity)
Applies the specified
map function to every partition data , context and partition
index in the dataset and then reduces map results to final result by using the reduce function. |
List<C> |
getCtx() |
List<D> |
getData() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, compute, compute, compute, compute, computeWithCtx, computeWithCtx, computeWithCtx, computeWithCtx, computeWithCtx, wrap
public <R> R computeWithCtx(IgniteTriFunction<C,D,LearningEnvironment,R> map, IgniteBinaryOperator<R> reduce, R identity)
map
function to every partition data
, context
and partition
index in the dataset and then reduces map
results to final result by using the reduce
function.computeWithCtx
in interface Dataset<C extends Serializable,D extends AutoCloseable>
R
- Type of a result.map
- Function applied to every partition data
, context
and LearningEnvironment
.reduce
- Function applied to results of map
to get final result.identity
- Identity.public <R> R compute(IgniteBiFunction<D,LearningEnvironment,R> map, IgniteBinaryOperator<R> reduce, R identity)
map
function to every partition data
and LearningEnvironment
in the dataset and then reduces map
results to final result by using the reduce
function.compute
in interface Dataset<C extends Serializable,D extends AutoCloseable>
R
- Type of a result.map
- Function applied to every partition data
and LearningEnvironment
.reduce
- Function applied to results of map
to get final result.identity
- Identity.public void close()
close
in interface AutoCloseable
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024