Skip to content

Commit dd31e81

Browse files
committed
doc(terms): +overwrites; upd Sol; lnik to FlowChart
1 parent 678888f commit dd31e81

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

docs/source/arch.rst

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Architecture
1010

1111
COMPUTE
1212
computation
13-
The computation of networked operation is splitted in 3 phases:
13+
|v410-flowchart|
14+
The definition & execution of networked operation is splitted in 1+2 phases:
1415

1516
- `COMPOSITION`
1617
- `COMPILATION`
@@ -38,6 +39,7 @@ Architecture
3839
graphtik.netop.NetworkOperation
3940
graphtik.network.Network
4041
graphtik.network.ExecutionPlan
42+
graphtik.network.Solution
4143

4244

4345
compose
@@ -65,8 +67,8 @@ Architecture
6567

6668
graph
6769
network graph
68-
The :attr:`.Network.graph` (currently a DAG) contains interchanging layers
69-
of all :class:`Operation` and :class:`_DataNode` nodes of a `netop`.
70+
The :attr:`.Network.graph` (currently a DAG) contains all :class:`FunctionalOperation`
71+
and :class:`_DataNode` nodes of some `netop`.
7072

7173
They are layed out and connected by repeated calls of
7274
:meth:`.Network._append_operation()` by Network constructor.
@@ -96,10 +98,12 @@ Architecture
9698
further down the dag, to reduce memory footprint while computing.
9799

98100
solution
99-
A :class:`collections.ChainMap` created internally by :meth:`.NetworkOperation.compute()`
100-
(if not given externally) to hold the values of the `inputs`,
101-
and those of the generated (intermediate and possibly overwritten) `outputs`.
102-
One dictionary is contained for each `operation` execution.
101+
A :class:`.Solution` created internally by :meth:`.NetworkOperation.compute()`
102+
to hold the values of the `inputs`, and those of the generated
103+
(intermediate and possibly overwritten) `outputs`.
104+
It is based on a :class:`collections.ChainMap`, to keep one dictionary
105+
for each `operation` executed +1 for inputs.
106+
103107

104108
The last operation result wins in the final *outputs* produced,
105109
BUT while executing, the `needs` of each operation receive the *solution* values
@@ -114,11 +118,10 @@ Architecture
114118

115119
But at the end we want to affect the calculation results by adding
116120
operations into some *netop* - furthermore, it wouldn't be very usefull
117-
to get back the given inputs in case of *overwrites*.
121+
to get back the given inputs in case of `overwrites`.
118122

119-
Note that ``compute()`` returns the chained-maps "compressed" in a plain dictionary;
120-
if you you want to acccess all intermediate values provide your own
121-
``ChainMap`` instance in the method.
123+
overwrites
124+
Values in the `solution` that are written by more than one `operation`\s.
122125

123126
net
124127
network
@@ -150,10 +153,12 @@ Architecture
150153
The :class:`.NetworkOperation` class holding a `network` of `operation`\s.
151154

152155
needs
153-
A list of names of the compulsory/optional values an operation requires to execute.
156+
A list of names of the compulsory/optional values an operation's
157+
underlying callable requires to execute.
154158

155159
provides
156-
A list of names of the values produced when an operation executes.
160+
A list of names of the values produced when the `operation`'s
161+
underlying callable executes.
157162

158163
prune
159164
pruning
@@ -178,3 +183,6 @@ Architecture
178183
:meth:`~.NetworkOperation.narrowed`.
179184

180185
.. default-role:: obj
186+
.. |v410-flowchart| image:: images/GraphtikFlowchart-v4.1.0.svg
187+
:alt: graphtik-v4.1.0 flowchart
188+
:scale: 50%

0 commit comments

Comments
 (0)