@@ -31,30 +31,30 @@ nodes represent stateless copies of the original Task after splitting the input,
31
31
32
32
Types of Splitter
33
33
-----------------
34
- Whenever a *Task * has more complicated inputs,
35
- i.e. multiple fields, there are two ways of creating the mapping,
36
- each one is used for different application.
37
- These *splitters * are called *scalar splitter * and *outer splitter *.
34
+ Whenever a *Task * has more complicated inputs, for example, multiple fields,
35
+ there are two ways of creating the mapping, each one is used for different application.
36
+ These *splitters * are called *inner splitter * and *outer splitter *.
38
37
They use a special, but Python-based syntax as described next.
39
38
40
- Scalar Splitter
39
+ Inner Splitter
41
40
---------------
42
- A *scalar splitter * performs element-wise mapping and requires that the lists of
43
- values for two or more fields to have the same length. The *scalar splitter * uses
41
+ A *inner splitter * performs element-wise mapping and requires that the lists of
42
+ values for two or more fields to have the same length. The *inner splitter * uses
44
43
Python tuples and its operation is therefore represented by a parenthesis, ``() ``:
45
44
46
45
.. math ::
47
46
48
47
S = (x, y) : x=[x_1 , x_2 , .., x_n],~y=[y_1 , y_2 , .., y_n] \mapsto (x, y)=(x_1 , y_1 ),..., (x, y)=(x_n, y_n),
49
48
50
-
51
49
where `S ` represents the *splitter *, `x ` and `y ` are the input fields.
52
50
This is also represented as a diagram:
53
51
54
52
.. figure :: ../_static/images/nd_spl_4.png
55
53
:figclass: h!
56
54
:scale: 80%
57
55
56
+ Inner splitters can be analogized to the Python builtin function :func: `zip `.
57
+
58
58
59
59
Outer Splitter
60
60
--------------
@@ -85,5 +85,6 @@ and `inp3`. This can be extended to arbitrary complexity.
85
85
In additional, the output can be merge at the end if needed.
86
86
This will be explained in the next section.
87
87
88
+ Outer splitters can be analogized to the Python function :func: `itertools.product `.
88
89
89
90
.. _Map-Reduce : https://en.wikipedia.org/wiki/MapReduce
0 commit comments