Class OctaveArrayFormatProvider
Format provider for the matrix format used by Octave.
Inherited Members
Namespace: ISynergy.Framework.Mathematics.Formats
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public sealed class OctaveArrayFormatProvider : MatrixFormatProviderBase, IMatrixFormatProvider
Examples
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(OctaveArrayFormatProvider.CurrentCulture);
// the final result will be equivalent to
"[ 1, 2, 3, 4]"
Converting from strings to actual matrices:
// Declare an input string
string str = "[ 1, 2, 3, 4]";
// Convert the string representation to an actual number array:
double[] array = Matrix.Parse(str, OctaveArrayFormatProvider.InvariantCulture);
// array will now contain the actual number
// array representation of the given string.
Constructors
View SourceOctaveArrayFormatProvider(IFormatProvider)
Initializes a new instance of the OctaveMatrixFormatProvider class.
Declaration
public OctaveArrayFormatProvider(IFormatProvider innerProvider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | innerProvider |
Properties
View SourceCurrentCulture
Gets the IMatrixFormatProvider which uses the CultureInfo used by the current thread.
Declaration
public static OctaveArrayFormatProvider CurrentCulture { get; }
Property Value
Type | Description |
---|---|
OctaveArrayFormatProvider |
InvariantCulture
Gets the IMatrixFormatProvider which uses the invariant system culture.
Declaration
public static OctaveArrayFormatProvider InvariantCulture { get; }
Property Value
Type | Description |
---|---|
OctaveArrayFormatProvider |
Implements
IFormatProvider
Extension Methods
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)