code: public static void saveDenseCSV(DMatrix A , String fileName )
          throws IOException
      {
          PrintStream fileStream = new PrintStream(fileName);
  
          fileStream.println(A.getNumRows() + " " + A.getNumCols() + " real");
          for( int i = 0; i < A.getNumRows(); i++ ) {
              for( int j = 0; j < A.getNumCols(); j++ ) {
                  fileStream.print(A.get(i,j)+" ");
              }
              fileStream.println();
          }
          fileStream.close();
      }
docs: Saves a matrix to disk using in a Column Space Value (CSV) format. For a
  description of the format see {@link MatrixIO#loadCSV(String,boolean)}.
  
  @param A The matrix being saved.
  @param fileName Name of the file its being saved at.
  @throws java.io.IOException