Since the row indices are irrelevant to the computation, we should provide users a simpler interface:

~~~
/** Returns (U, \Sigma, V) */
def tallAndSkinnySVD(data: RDD[Array[Double]]): (RDD[Array[Double]], Array[Double], Array[Array[Double]])  = {
 ...
}
~~~
It is safe to always return U because it won't trigger a job until it is used somewhere else.

In this way, the current interface can be implemented as a simple wrapper:
~~~
val svd = tallAndSkinnySVD(matrix.rows.map(row => row.data))
val U = svd.U.zip(matrix.rows.map(row => row.index)).map(...)
return ...
~~~