Multiplicity class S3 object.
The function of multiplicities is to indicate that
PipeOps should be executed
multiple times with multiple values.
Multiplicity is a container, like a
list(), that contains multiple values. If the message that is passed along the
edge of a
Graph is a
Multiplicity-object, then the
PipeOp that receives
this object will usually be called once for each contained value. The result of
each of these calls is then, again, packed in a
Multiplicity and sent along the
outgoing edge(s) of that
PipeOp. This means that a
Multiplicity can cause
PipeOps in a row to be run multiple times, where the run for each element
Multiplicity is independent from the others.
PipeOps only return a
Multiplicity if their input was a
(and after having run their code multiple times, once for each entry). However,
there are a few special
PipeOps that are "aware" of
Multiplicity objects. These
may either create a
Multiplicity even though not having a
PipeOpOVRSplit) – causing the subsequent
to be run multiple times – or collect a
Multiplicity, being called only once
even though their input is a
if constructed with the
collect_multiplicity argument set to
TRUE). The combination
of these mechanisms makes it possible for parts of a
Graph to be called variably
many times if "sandwiched" between
Multiplicity creating and collecting
PipeOp creates or collects a
Multiplicity is indicated by the
$output slot (which indicate names and types of in/out channels). If the
predict types of an input or output are surrounded by square brackets ("
this channel handles a
Multiplicity explicitly. Depending on the function of the
it will usually collect (input channel) or create (output channel) a
PipeOps without this indicator are
Multiplicity agnostic and blindly execute their
function multiple times when given a
PipeOp is trained on a
$state slot is set to a
as well; this
Multiplicity contains the "original"
$state resulting from each individual
call of the
PipeOP with the input
Multiplicity's content. If a
PipeOp was trained
Multiplicity, then the
predict() argument must be a
Multiplicity with the same
number of elements.
Other Special Graph Messages:
Other Experimental Features:
Other Multiplicity PipeOps:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.