Click or drag to resize

FloatVectorParse(String, NumberStyles) Method

Returns a new FloatVector instance from a given string representation using the specified style.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static FloatVector Parse(
	string s,
	NumberStyles styles
)

Parameters

s  String
A string representation of a vector.
styles  NumberStyles
One or more number styles.

Return Value

FloatVector
Remarks
Acceptable string representations are of the form [ v1 v2 v3 ... ] or v1 v2 v3 .... The data elements can be in any format that is supported by Double.Parse( string, NumberStyles ). Note that whitespace, even if set as a group separator, is taken as a data separator.
C#
string s = "$4.52 $4.32 $4.56 $9.94 ($0.04) ($5.00)";
FloatVector v = FloatVector.Parse( s, NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowParentheses );
s = "4.523000E+000 4.323000E+000 4.555000E+000 9.943000E+000 -4.400000E-002 -5.000000E+000";
v = FloatVector.Parse( s, NumberStyles.Number | NumberStyles.AllowExponent );
See Also