| DoubleMatrix(String, NumberStyles, Char) Constructor |
Constructs a DoubleMatrix instance from a formatted string with
a specified delimiter and style.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public DoubleMatrix(
string s,
NumberStyles styles,
char delimiter
)
Public Sub New (
s As String,
styles As NumberStyles,
delimiter As Char
)
public:
DoubleMatrix(
String^ s,
NumberStyles styles,
wchar_t delimiter
)
new :
s : string *
styles : NumberStyles *
delimiter : char -> DoubleMatrix
Parameters
- s String
- A formatted string representation of a matrix.
- styles NumberStyles
- One or more number styles.
- delimiter Char
- Delimiter between cells.
Remarks
Matrix cells are separated by the specified character. Rows are
separated by newlines. This constructor will have to look through
the entire string to calculate how many rows and columns exists.
If you know the number of rows and columns use this constructor:
DoubleMatrix( int, int, string, char )
Example
Example strings with a style that allows for exponential format (
NumberStyles.Number | NumberStyles.AllowExponent):
string s = "1.500000e+002\t1.444000e-001\t4.429923e+005\n";
string t = "1.10000e+000,-2.200000e-004\n3.332324e+000,-4.443233e+005\n";
See Also