/// <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 <T>(this T[] matrix, string format, IMatrixFormatProvider provider) { return(MatrixFormatter.Format(format, matrix, 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 <T>(this T[] array, string format) { return(MatrixFormatter.Format(format, array, DefaultArrayFormatProvider.CurrentCulture)); }
/// <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 <T>(this T[][] matrix, string format) { return(MatrixFormatter.Format(format, matrix, DefaultMatrixFormatProvider.CurrentCulture)); }