예제 #1
0
        /// <summary>
        /// Saves the transform to the disk.  The samples are not stored, only the
        /// statistics.
        /// </summary>
        /// <param name="filename">The destination filename</param>
        /// <param name="transform">The transform</param>
        public static void Write(string filename, GaussianTransform transform)
        {
            FileStream output = File.Open(filename, FileMode.Create);

            try
            {
                Write(output, transform);
            }
            finally
            {
                output.Close();
            }
        }
예제 #2
0
        /// <summary>
        /// Saves the transform to the disk.  The samples are not stored, only the
        /// statistics.
        /// </summary>
        /// <param name="stream">The destination stream</param>
        /// <param name="transform">The transform</param>
        public static void Write(Stream stream, GaussianTransform transform)
        {
            TemporaryCulture.Start();

            StreamWriter output = new StreamWriter(stream);

            output.WriteLine(transform._means.Length);
            for (int i = 0; i < transform._means.Length; i++)
            {
                output.WriteLine("{0} {1}", transform._means[i], transform._stddevs[i]);
            }
            output.Flush();

            TemporaryCulture.Stop();
        }
 /// <summary>
 /// Saves the transform to the disk.  The samples are not stored, only the 
 /// statistics.
 /// </summary>
 /// <param name="filename">The destination filename</param>
 /// <param name="transform">The transform</param>
 public static void Write(string filename, GaussianTransform transform)
 {
     FileStream output = File.Open(filename, FileMode.Create);
     try
     {
         Write(output, transform);
     }
     finally
     {
         output.Close();
     }
 }
        /// <summary>
        /// Saves the transform to the disk.  The samples are not stored, only the 
        /// statistics.
        /// </summary>
        /// <param name="stream">The destination stream</param>
        /// <param name="transform">The transform</param>
        public static void Write(Stream stream, GaussianTransform transform)
        {
            TemporaryCulture.Start();

            StreamWriter output = new StreamWriter(stream);
            output.WriteLine(transform._means.Length);
            for (int i = 0; i < transform._means.Length; i++)
                output.WriteLine("{0} {1}", transform._means[i], transform._stddevs[i]);
            output.Flush();

            TemporaryCulture.Stop();
        }