Now works not only for multiple subalgorithms, but also for multiple algorithms.  Uses row order to stitch rows together correctly.