Constructs a DoubleMatrix instance from a formatted string with a specified delimiter and style.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public DoubleMatrix(
	int rows,
	int cols,
	string s,
	NumberStyles styles,
	char delimiter
)
Visual Basic (Declaration)
Public Sub New ( _
	rows As Integer, _
	cols As Integer, _
	s As String, _
	styles As NumberStyles, _
	delimiter As Char _
)
Visual C++
public:
DoubleMatrix(
	int rows, 
	int cols, 
	String^ s, 
	NumberStyles styles, 
	wchar_t delimiter
)

Parameters

rows
Type: System..::.Int32
Number of rows.
cols
Type: System..::.Int32
Number of columns.
s
Type: System..::.String
A formatted string representation of a matrix.
styles
Type: System.Globalization..::.NumberStyles
One or more number styles.
delimiter
Type: System..::.Char
Delimiter between cells.

Remarks

Matrix cells are separated by the specified character. Rows are separated by newlines.

Examples

Example strings with a style that allows for exponential format ( NumberStyles.Number | NumberStyles.AllowExponent):
CopyC#
// 1 x 3 tab-delimited matrix
string s = "1.500000e+002\t1.444000e-001\t4.429923e+005\n";

// 2 x 2 comma-delimited matrix
string t = "1.10000e+000,-2.200000e-004\n3.332324e+000,-4.443233e+005\n";

See Also