Click or drag to resize

FloatComplexVectorParse(String, NumberStyles) Method

Returns a new FloatComplexVector 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 FloatComplexVector Parse(
	string s,
	NumberStyles styles
)

Parameters

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

Return Value

FloatComplexVector
Remarks
Acceptable string representations are of the form [ (r1,i1) (r2,i2) (r3,i3) ... ]. For example, [ (4.3,3.5) (23.4,-234.3) (-21.2,0) ]. Brackets are optional. Whitespace outside the parentheses is ignored. Note that whitepsace inside the parentheses is taken as a data separator, even if whitespace is set as a group separator.
C#
string s = "(4.523000e+000,3.400000e+000) (4.323000e+000,-2.400000e+000) (4.555000e+000,0.000000e+000) (9.943000e+000,-9.900000e+000) (4.000000e+000,-4.400000e-002) (3.400000e+000,-5.000000e+000)";
FloatComplexVector v = FloatComplexVector.Parse( s, NumberStyles.Number | NumberStyles.AllowExponent );
See Also