Iteration Domains: Let's Draw Shapes

by Evan Conrad, February 26, 2018

An iteration domain is the total range of values that a program is iterating over.

Example

Take the following code:

for (int i = 0; i < 6; i++) {
    for (int j = i; j < 10; j++) {
        // Do something
    }
}

If we plot a point at every i and j value, we've mapped the "iteration domain" of the program:

Visualization of Iteration Domain

Source


Something wrong with this post? Edit it here.

Didn't understand something? Have a question? Ask it here.