Generated by DocFX

Class OctaveMatrixFormatProvider

Format provider for the matrix format used by Octave.

Inheritance
System.Object
MatrixFormatProviderBase
OctaveMatrixFormatProvider
Implements
IMatrixFormatProvider
IFormatProvider
Inherited Members
MatrixFormatProviderBase.InnerProvider
MatrixFormatProviderBase.GetFormat(Type)
MatrixFormatProviderBase.FormatMatrixStart
MatrixFormatProviderBase.FormatMatrixEnd
MatrixFormatProviderBase.FormatRowStart
MatrixFormatProviderBase.FormatRowEnd
MatrixFormatProviderBase.FormatColStart
MatrixFormatProviderBase.FormatColEnd
MatrixFormatProviderBase.FormatRowDelimiter
MatrixFormatProviderBase.FormatColDelimiter
MatrixFormatProviderBase.ParseMatrixStart
MatrixFormatProviderBase.ParseMatrixEnd
MatrixFormatProviderBase.ParseRowStart
MatrixFormatProviderBase.ParseRowEnd
MatrixFormatProviderBase.ParseColStart
MatrixFormatProviderBase.ParseColEnd
MatrixFormatProviderBase.ParseRowDelimiter
MatrixFormatProviderBase.ParseColDelimiter
Namespace: ISynergy.Framework.Mathematics.Formats
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public sealed class OctaveMatrixFormatProvider : MatrixFormatProviderBase, IMatrixFormatProvider
Remarks

This class can be used to convert to and from C# matrices and their string representation. Please see the example for details.

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(OctaveMatrixFormatProvider.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, OctaveMatrixFormatProvider.InvariantCulture);

  // matrix will now contain the actual multidimensional 
  // matrix representation of the given string.

Constructors

View Source

OctaveMatrixFormatProvider(IFormatProvider)

Initializes a new instance of the OctaveMatrixFormatProvider class.

Declaration
public OctaveMatrixFormatProvider(IFormatProvider innerProvider)
Parameters
Type Name Description
IFormatProvider innerProvider

Properties

View Source

CurrentCulture

Gets the IMatrixFormatProvider which uses the CultureInfo used by the current thread.

Declaration
public static OctaveMatrixFormatProvider CurrentCulture { get; }
Property Value
Type Description
OctaveMatrixFormatProvider
View Source

InvariantCulture

Gets the IMatrixFormatProvider which uses the invariant system culture.

Declaration
public static OctaveMatrixFormatProvider InvariantCulture { get; }
Property Value
Type Description
OctaveMatrixFormatProvider

Implements

IMatrixFormatProvider
IFormatProvider

Extension Methods

Matrix.Replace<T>(T, Object, Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
EntityBaseExtensions.HasProperty(Object, String)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.To<T>(Object)
ObjectExtensions.To(Object, Type)
ObjectExtensions.HasMethod(Object, String)
ObjectExtensions.AddressOf<T>(T)
ReflectionExtensions.GetIdentityValue<T>(T)
ReflectionExtensions.GetIdentityValue<T, TResult>(T)
ReflectionExtensions.GetIdentityProperty<T>(T)
ReflectionExtensions.HasIdentityProperty<T>(T)
ReflectionExtensions.GetPropertyValue<T, TResult>(T, String, TResult)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)
ReflectionExtensions.GetTitleValue<T>(T)
ReflectionExtensions.HasParentIdentityProperty<T>(T)
ReflectionExtensions.GetParentIdentityProperty<T>(T)
ReflectionExtensions.IsFreeApplication<T>(T)

See Also

Matrix
CSharpMatrixFormatProvider
CSharpJaggedMatrixFormatProvider
CSharpArrayFormatProvider
OctaveMatrixFormatProvider
OctaveArrayFormatProvider