示例#1
0
        /// <exception cref="System.IO.IOException"/>
        public static void DumpMatrix(string filename, SimpleMatrix matrix)
        {
            string matrixString = matrix.ToString();
            int    newLine      = matrixString.IndexOf("\n");

            if (newLine >= 0)
            {
                matrixString = Sharpen.Runtime.Substring(matrixString, newLine + 1);
            }
            FileWriter     fout = new FileWriter(filename);
            BufferedWriter bout = new BufferedWriter(fout);

            bout.Write(matrixString);
            bout.Close();
            fout.Close();
        }