It's already public via
def compute(matrix: RDD[Array[Double]]): Array[Array[Double]] = {
Better not have two identical methods doing the same thing with different names.
k removed though.