 | DoubleVector(TextReader, NumberStyles) Constructor |
Constructs a DoubleVector instance from a given text reader using
the specified style.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntaxpublic DoubleVector(
TextReader reader,
NumberStyles styles
)
Public Sub New (
reader As TextReader,
styles As NumberStyles
)
public:
DoubleVector(
TextReader^ reader,
NumberStyles styles
)
new :
reader : TextReader *
styles : NumberStyles -> DoubleVector
Parameters
- reader TextReader
- A text reader containing a string representation of a vector.
- styles NumberStyles
- One or more number styles.
Remarks
The text representation within the reader must be of the form
[ 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, will be taken as a data separator.
string s = "4.523000E+000 4.323000E+000 4.555000E+000 9.943000E+000 -4.400000E-002 -5.000000E+000";
DoubleVector v = new DoubleVector( new StringReader( s ), NumberStyles.Number | NumberStyles.AllowExponent );
See Also