Example #1
0
 public static MatrixGenerator GetInstance()
 {
     if (instance == null)
     {
         instance = new MatrixGenerator();
     }
     return(instance);
 }
Example #2
0
        static void Main()
        {
            MatrixGenerator mg = MatrixGenerator.GetInstance();

            double[][] matrix = mg.GenerateMatrix(5, 6);
            foreach (double[] row in matrix)
            {
                foreach (double elem in row)
                {
                    System.Console.Write(elem + " ");
                }
                System.Console.WriteLine();
            }
        }