Control flow

The flowchart below gives an indication of the overall system structure of the algorithm: Flowchart It can be viewed and edited online here