Icon

7. Recursive Loop

<p><strong>Recursive Loop</strong></p><p>This workflow implements an example of a recursive loop using the <em>Recursive Loop Start</em> and <em>Recursive Loop End</em> nodes. A recursive loop can pass the current results to the next iteration through the second input port of the <em>Recursive Loop End</em> node. The loop ends after a pre-defined number of iterations or when it reaches a condition, both can be configured in the <em>Recursive Loop End</em> node. </p><p>In this workflow, we first generate fake data with 3 clusters over 2 coordinates (x,y). In each loop iteration, we then calculate x = x+1, where x is the Universe_0_0 column. The result, however, is the same as in the workflow "1. Counting Loop", as you can see in the <em>Scatter Plot</em>.</p>

Workflow: Recursive Loop


This workflow implements an example of a recursive loop using the Recursive Loop Start and Recursive Loop End nodes. A recursive loop can pass the current results to the next iteration through the second input port of the Recursive Loop End node. The loop ends after a pre-defined number of iterations or when it reaches a condition, both can be configured in the Recursive Loop End node.

In this workflow, we first generate fake data with 3 clusters over 2 coordinates (x,y). In each loop iteration, we then calculate x = x+1, where x is the Universe_0_0 column. The result, however, is the same as in the workflow "1. Counting Loop", as you can see in the Scatter Plot.

Generating data

3 clusters, 2 coordinates (Universe_0_0, Universe_0_1)

Visualizing data

Loop body

Visualizing data

Check data range for each group of data (Iter #)

Calculate: Universe_0_0 + 1
Expression
3 clusters 2 coordinates
Data Generator
Visualize the fourx-shifted datasets
Scatter Plot
Visualize original data
Scatter Plot
Color by clusters
Color Manager
Recursive Loop Start
Data at bottom inputport is passed backto loop start
Recursive Loop End

Nodes

Extensions

Links