A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://accord-framework.net/docs/html/T_Accord_Math_CSharpMatrixFormatProvider.htm below:

CSharpMatrixFormatProvider Class

Gets the matrix representation used in C# multi-dimensional arrays.

Inheritance Hierarchy Namespace:  Accord.Math
Assembly:

Accord.Math (in Accord.Math.dll) Version: 3.8.0

Syntax
public sealed class CSharpMatrixFormatProvider : MatrixFormatProviderBase
Public NotInheritable Class CSharpMatrixFormatProvider
	Inherits MatrixFormatProviderBase
Request Example View Source

The CSharpMatrixFormatProvider type exposes the following members.

Constructors Properties Methods   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.) Top Extension Methods   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.) Top 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:

double[,] x = 
{
   { 1, 2, 3, 4 },
   { 5, 6, 7, 8 },
};


string str = x.ToString(CSharpMatrixFormatProvider.CurrentCulture);


"double[,] x =      " +
"{                  " +
"   { 1, 2, 3, 4 }, " +
"   { 5, 6, 7, 8 }, " +
"}"

Converting from strings to actual matrices:

string str = "double[,] x = " +
"{                          " +
"   { 1, 2, 3, 4 },         " +
"   { 5, 6, 7, 8 },         " +
"}";


double[,] matrix = Matrix.Parse(str, CSharpMatrixFormatProvider.InvariantCulture);


See Also Reference

Accord.MathCSharpMatrixFormatProvider


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4