DefaultMatrixFormatProvider Class |
Namespace: Accord.Math
The DefaultMatrixFormatProvider type exposes the following members.
Name | Description | |
---|---|---|
DefaultMatrixFormatProvider |
Initializes a new instance of the DefaultMatrixFormatProvider class.
|
Name | Description | |
---|---|---|
CurrentCulture |
Gets the IMatrixFormatProvider which uses the CultureInfo used by the current thread.
| |
FormatColDelimiter |
A string containing the column delimiter for a matrix to be used in formatting.
(Inherited from MatrixFormatProviderBase.) | |
FormatColEnd |
A string denoting the end of a matrix column to be used in formatting.
(Inherited from MatrixFormatProviderBase.) | |
FormatColStart |
A string denoting the start of a matrix column to be used in formatting.
(Inherited from MatrixFormatProviderBase.) | |
FormatMatrixEnd |
A string denoting the end of the matrix to be used in formatting.
(Inherited from MatrixFormatProviderBase.) | |
FormatMatrixStart |
A string denoting the start of the matrix to be used in formatting.
(Inherited from MatrixFormatProviderBase.) | |
FormatRowDelimiter |
A string containing the row delimiter for a matrix to be used in formatting.
(Inherited from MatrixFormatProviderBase.) | |
FormatRowEnd |
A string denoting the end of a matrix row to be used in formatting.
(Inherited from MatrixFormatProviderBase.) | |
FormatRowStart |
A string denoting the start of a matrix row to be used in formatting.
(Inherited from MatrixFormatProviderBase.) | |
InnerProvider |
Gets the culture specific formatting information
to be used during parsing or formatting.
(Inherited from MatrixFormatProviderBase.) | |
InvariantCulture |
Gets the IMatrixFormatProvider which uses the invariant system culture.
| |
ParseColDelimiter |
A string containing the column delimiter for a matrix to be used in parsing.
(Inherited from MatrixFormatProviderBase.) | |
ParseColEnd |
A string denoting the end of a matrix column to be used in parsing.
(Inherited from MatrixFormatProviderBase.) | |
ParseColStart |
A string denoting the start of a matrix column to be used in parsing.
(Inherited from MatrixFormatProviderBase.) | |
ParseMatrixEnd |
A string denoting the end of the matrix to be used in parsing.
(Inherited from MatrixFormatProviderBase.) | |
ParseMatrixStart |
A string denoting the start of the matrix to be used in parsing.
(Inherited from MatrixFormatProviderBase.) | |
ParseRowDelimiter |
A string containing the row delimiter for a matrix to be used in parsing.
(Inherited from MatrixFormatProviderBase.) | |
ParseRowEnd |
A string denoting the end of a matrix row to be used in parsing.
(Inherited from MatrixFormatProviderBase.) | |
ParseRowStart |
A string denoting the start of a matrix row to be used in parsing.
(Inherited from MatrixFormatProviderBase.) |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetFormat |
Returns an object that provides formatting services for the specified
type. Currently, only IMatrixFormatProvider is supported.
(Inherited from MatrixFormatProviderBase.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(Type) | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) | |
ToT | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) |
Converting from a multidimensional matrix to a string representation:
// Declare a number array double[,] x = { { 1, 2, 3, 4 }, { 5, 6, 7, 8 }, }; // Convert the aforementioned array to a string representation: string str = x.ToString(DefaultMatrixFormatProvider.CurrentCulture); // the final result will be equivalent to @"1, 2, 3, 4 5, 6, 7, 8";
Converting from strings to actual matrices:
// Declare an input string string str = @"1, 2, 3, 4 "5, 6, 7, 8"; // Convert the string representation to an actual number array: double[,] matrix = Matrix.Parse(str, DefaultMatrixFormatProvider.InvariantCulture); // matrix will now contain the actual multidimensional // matrix representation of the given string.