C# Class Accord.Math.MatrixFormatter

Defines how matrices are formatted and displayed, depending on the chosen format representation.
Inheritance: ICustomFormatter
Show file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
Format ( string format, Array matrix, IMatrixFormatProvider formatProvider ) : string

Converts a jagged or multidimensional array into a System.String representation.

Format ( string format, object arg, IFormatProvider formatProvider ) : string

Converts the value of a specified object to an equivalent string representation using specified formatting information.

ParseJagged ( string str, IMatrixFormatProvider provider ) : double[][]

Converts a matrix represented in a System.String into a jagged array.

ParseMultidimensional ( string str, IMatrixFormatProvider provider ) : ].double[

Converts a matrix represented in a System.String into a multi-dimensional array.

Private Methods

Method Description
handleOtherFormats ( string format, object arg, IFormatProvider culture ) : string

Handles formatting for objects other than matrices.

parseOptions ( string format, string &newline, string &elementFormat ) : bool

Parses a format string containing the format options for the matrix representation.

Method Details

Format() public static method

Converts a jagged or multidimensional array into a System.String representation.
public static Format ( string format, Array matrix, IMatrixFormatProvider formatProvider ) : string
format string
matrix System.Array
formatProvider IMatrixFormatProvider
return string

Format() public method

Converts the value of a specified object to an equivalent string representation using specified formatting information.
public Format ( string format, object arg, IFormatProvider formatProvider ) : string
format string A format string containing formatting specifications.
arg object An object to format.
formatProvider IFormatProvider /// An object that supplies /// format information about the current instance.
return string

ParseJagged() public static method

Converts a matrix represented in a System.String into a jagged array.
public static ParseJagged ( string str, IMatrixFormatProvider provider ) : double[][]
str string
provider IMatrixFormatProvider
return double[][]

ParseMultidimensional() public static method

Converts a matrix represented in a System.String into a multi-dimensional array.
public static ParseMultidimensional ( string str, IMatrixFormatProvider provider ) : ].double[
str string
provider IMatrixFormatProvider
return ].double[