Natural looking dask with some inter-connections
(width, height, connections)
| 25 | |
| 26 | |
| 27 | def crosstalk(width, height, connections): |
| 28 | """Natural looking dask with some inter-connections""" |
| 29 | d = {("x", 0, i): i for i in range(width)} |
| 30 | for j in range(1, height): |
| 31 | d.update( |
| 32 | { |
| 33 | ("x", j, i): ( |
| 34 | noop, |
| 35 | [("x", j - 1, randint(0, width)) for _ in range(connections)], |
| 36 | ) |
| 37 | for i in range(width) |
| 38 | } |
| 39 | ) |
| 40 | return d, [("x", height - 1, i) for i in range(width)] |
| 41 | |
| 42 | |
| 43 | def dense(width, height): |