Are you an EPFL student looking for a semester project?
Work with us on data science and visualisation projects, and deploy your project as an app on top of Graph Search.
Iteration is the repetition of a process in order to generate a (possibly unbounded) sequence of outcomes. Each repetition of the process is a single iteration, and the outcome of each iteration is then the starting point of the next iteration. In mathematics and computer science, iteration (along with the related technique of recursion) is a standard element of algorithms. In mathematics, iteration may refer to the process of iterating a function, i.e. applying a function repeatedly, using the output from one iteration as the input to the next. Iteration of apparently simple functions can produce complex behaviors and difficult problems – for examples, see the Collatz conjecture and juggler sequences. Another use of iteration in mathematics is in iterative methods which are used to produce approximate numerical solutions to certain mathematical problems. Newton's method is an example of an iterative method. Manual calculation of a number's square root is a common use and a well-known example. In computing, iteration is the technique marking out of a block of statements within a computer program for a defined number of repetitions. That block of statements is said to be iterated; a computer scientist might also refer to that block of statements as an "iteration". Loops constitute the most common language constructs for performing iterations. The following pseudocode "iterates" three times the line of code between the curly brackets through a for loop, and uses the values of i as increments. a := 0 for i := 1 to 3 do { loop three times } begin a := a + i; { add the current value of i to a } end; print(a); { the number 6 is printed (0 + 1; 1 + 2; 3 + 3) } It is permissible, and often necessary, to use values from other parts of the program outside the bracketed block of statements, to perform the desired function. Iterators constitute alternative language constructs to loops, which ensure consistent iterations over specific data structures. They can eventually save time and effort in later coding attempts.
Giovanni De Micheli, Mathias Soeken, Luca Gaetano Amarù
Volkan Cevher, Quoc Tran Dinh, Ahmet Alacaoglu
Guillaume Philippe Ivan Joseph Dehaene