Learn R Programming

parallelize.dynamic (version 0.9-1)

LapplyFreezer-class: Class "LapplyFreezer"

Description

This class encapsulates storage of calls and their results. Interaction with this is done from backends and subclassing is only required if a new storage mechanism of unevaluated calls or results thereof is needed. The end user does not interact with this class.

Arguments

Extends

All reference classes extend and inherit methods from "envRefClass".

Fields

slots:
Each slot represents an Apply call, where a function is applied on a list. The slot records the arity of the list and the sequence number of the call.
calls:
All calls to be parallelized.
results:
Results of the calls.

Methods

setResults(value):
accessor method of results slot
getResults():
accessor method of results slot
setCalls(value):
accessor method of calls slot
getCalls():
accessor method of calls slot
setSlots(value):
accessor method of slots slot
getSlots():
accessor method of slots slot
resultsForSequence(s):
return results for Apply sequence number s
finalizeResults():
must be called exactly once before resultsForSequence is called. After all parllel computations are finished and their results are collected, this method should be called.
unlistResults():
Return flat list of results.
pushResults(r):
Push a new result. Order of push must be in the order of call generation in push.
call(i):
Return i-th call encapsulated as a list.
N():
Return number of calls generated so far.
push(sequence, f, l, ..., envir__):
Add calls from Apply-loop sequence to the freezer. length(l) calls will be generated.
clear():
Clear the freezer.
initialize(...):
Initialize the freezer.

See Also

LapplyPersistentFreezer-class

Examples

Run this code
showClass("LapplyFreezer")

Run the code above in your browser using DataLab