'return flattened data ``(x, f)`` such that for the sweep through
coordinate ``i`` we have for data point ``j`` that ``f[i][j] == func(x[i][j])``'

def flattened(self):

    flatx = {}
    flatf = {}
    for i in self.res:
        if (type(i) is int):
            flatx[i] = []
            flatf[i] = []
            for x in sorted(self.res[i]):
                for d in sorted(self.res[i][x]):
                    flatx[i].append(x)
                    flatf[i].append(d)
    return (flatx, flatf)
