/// <summary> /// Converts the string representation of a matrix to its /// double-precision floating-point number matrix equivalent. /// </summary> /// <param name="s">The string representation of the matrix.</param> /// <param name="provider"> /// The format provider to use in the conversion. Default is to use /// <see cref="DefaultMatrixFormatProvider.CurrentCulture"/>. /// </param> /// <returns>A double-precision floating-point number matrix parsed /// from the given string using the given format provider.</returns> /// public static double[][] ParseJagged(string s, IMatrixFormatProvider provider) { return(MatrixFormatter.ParseJagged(s, provider)); }
/// <summary> /// Converts the string representation of a matrix to its /// double-precision floating-point number matrix equivalent. /// </summary> /// <param name="str">The string representation of the matrix.</param> /// <returns>A double-precision floating-point number matrix parsed /// from the given string using the given format provider.</returns> /// public static double[,] Parse(string str) { return(MatrixFormatter.ParseMultidimensional(str, DefaultMatrixFormatProvider.CurrentCulture)); }
/// <summary> /// Converts the string representation of a matrix to its /// double-precision floating-point number matrix equivalent. /// </summary> /// <param name="str">The string representation of the matrix.</param> /// <param name="provider"> /// The format provider to use in the conversion. Default is to use /// <see cref="DefaultMatrixFormatProvider.CurrentCulture"/>. /// </param> /// <returns>A double-precision floating-point number matrix parsed /// from the given string using the given format provider.</returns> /// public static double[,] Parse(string str, IMatrixFormatProvider provider) { return(MatrixFormatter.ParseMultidimensional(str, provider)); }
/// <summary> /// Returns a <see cref="System.String"/> that represents an array. /// </summary> /// /// <param name="array">The array.</param> /// /// <param name="format"> /// The format to use when creating the resulting string. /// </param> /// /// <returns> /// A <see cref="System.String"/> that represents this instance. /// </returns> /// /// <example> /// Please see <see cref="CSharpMatrixFormatProvider"/>, /// <see cref="OctaveArrayFormatProvider"/> or <see cref="DefaultArrayFormatProvider"/> /// for examples and more details. /// </example> /// public static string ToString(this double[] array, string format) { return(MatrixFormatter.Format(format, array, DefaultArrayFormatProvider.CurrentCulture)); }
/// <summary> /// Returns a <see cref="System.String"/> that represents an array. /// </summary> /// /// <param name="matrix">The matrix.</param> /// /// <param name="format"> /// The format to use when creating the resulting string. /// </param> /// /// <param name="provider"> /// The <see cref="IMatrixFormatProvider"/> to be used /// when creating the resulting string. Default is to use /// <see cref="DefaultMatrixFormatProvider.CurrentCulture"/>. /// </param> /// /// <returns> /// A <see cref="System.String"/> that represents this instance. /// </returns> /// /// <example> /// Please see <see cref="CSharpMatrixFormatProvider"/>, /// <see cref="OctaveArrayFormatProvider"/> or <see cref="DefaultArrayFormatProvider"/> /// for examples and more details. /// </example> /// public static string ToString(this double[] matrix, string format, IMatrixFormatProvider provider) { return(MatrixFormatter.Format(format, matrix, provider)); }
/// <summary> /// Returns a <see cref="System.String"/> that represents a matrix. /// </summary> /// /// <param name="matrix">The matrix.</param> /// /// <param name="format"> /// The format to use when creating the resulting string. /// </param> /// /// <returns> /// A <see cref="System.String"/> that represents this instance. /// </returns> /// /// <example> /// Please see <see cref="CSharpMatrixFormatProvider"/>, /// <see cref="CSharpJaggedMatrixFormatProvider"/>, <see cref="CSharpArrayFormatProvider"/>, /// <see cref="OctaveMatrixFormatProvider"/>, or <see cref="OctaveArrayFormatProvider"/> /// for more details. /// </example> /// public static string ToString(this double[][] matrix, string format) { return(MatrixFormatter.Format(format, matrix, DefaultMatrixFormatProvider.CurrentCulture)); }
/// <summary> /// Converts the string representation of a vector to its /// double-precision floating-point number vector equivalent. /// </summary> /// <param name="str">The string representation of the vector.</param> /// <param name="provider"> /// The format provider to use in the conversion. Default is to use /// <see cref="DefaultMatrixFormatProvider.CurrentCulture"/>. /// </param> /// <returns>A double-precision floating-point number matrix parsed /// from the given string using the given format provider.</returns> /// public static double[] Parse(string str, IMatrixFormatProvider provider) { return(MatrixFormatter.ParseJagged(str, provider).Flatten()); }
/// <summary> /// Converts the string representation of a vector to its /// double-precision floating-point number vector equivalent. /// </summary> /// <param name="str">The string representation of the matrix.</param> /// <returns>A double-precision floating-point number matrix parsed /// from the given string using the given format provider.</returns> /// public static double[] Parse(string str) { return(MatrixFormatter.ParseJagged(str, DefaultMatrixFormatProvider.CurrentCulture).Flatten()); }