List<List<double>> zeroMatrix(int rows, int cols) { return new List.generate(rows, (_) => new List<double>.filled(cols, 0.0)); }