Example #1
0
 /// <summary>
 /// Serializes the specified <see cref="DoubleMatrix"/> writing a CSV document
 /// to the specified file.
 /// </summary>
 /// <param name="path">The CSV file to be opened for
 /// serializing.</param>
 /// <param name="matrix">The <see cref="DoubleMatrix"/> being serialized.</param>
 /// <remarks>
 /// <para>
 /// This method writes a CSV document containing the information
 /// required to represent the state of <paramref name="matrix"/>.
 /// </para>
 /// </remarks>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="path"/> is <b>null</b>.<br/>
 /// -or- <br/>
 /// <paramref name="matrix"/> is <b>null</b>.
 /// </exception>
 /// <exception cref="InvalidOperationException">
 /// An error occurred during serialization. The original exception is available
 /// using the <see cref="Exception.InnerException"/> property.
 ///</exception>
 public static void Serialize(string path, DoubleMatrix matrix)
 {
     CsvDoubleMatrixSerializer.Serialize(path, matrix);
 }
Example #2
0
 /// <summary>
 /// Serializes the specified <see cref="DoubleMatrix"/> writing a CSV document
 /// to a file using the specified <see cref="TextWriter"/>.
 /// </summary>
 /// <param name="writer">The <see cref="TextWriter"/> used to
 /// write the CSV document.</param>
 /// <param name="matrix">The <see cref="DoubleMatrix"/> being serialized.</param>
 /// <remarks>
 /// <para>
 /// This method writes a CSV document containing the information
 /// required to represent the state of <paramref name="matrix"/>.
 /// </para>
 /// </remarks>
 /// <example>
 /// <para>
 /// In the following example, a matrix instance is serialized by writing
 /// a CSV document to a stream. Hence the matrix is deserialized by reading
 /// such stream.
 /// </para>
 /// <para>
 /// <code title="Serialization and deserialization of a matrix using a CSV document"
 /// source="..\Novacta.Analytics.CodeExamples\CsvSerializeExample1.cs.txt"
 /// language="cs" />
 /// </para>
 /// </example>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="writer"/> is <b>null</b>.<br/>
 /// -or- <br/>
 /// <paramref name="matrix"/> is <b>null</b>.
 /// </exception>
 public static void Serialize(
     TextWriter writer,
     DoubleMatrix matrix)
 {
     CsvDoubleMatrixSerializer.Serialize(writer, matrix);
 }