FixedWidthTextFile.ReadVector Method

Definition

Namespace: Numerics.NET.Data.Text
Assembly: Numerics.NET.Data (in Numerics.NET.Data.dll) Version: 4.0.3

Overload List

ReadVector<T>(Stream, FixedWidthTextOptions) Reads a vector from a stream in fixed-width text format.
ReadVector<T>(Stream, Int32[]) Reads a vector from a stream in fixed-width text format.
ReadVector<T>(String, FixedWidthTextOptions) Reads a vector from a file in fixed-width text format.
ReadVector<T>(String, Int32[]) Reads a vector from a file in fixed-width text format.

ReadVector<T>(Stream, FixedWidthTextOptions)

Reads a vector from a stream in fixed-width text format.
C#
public static Vector<T> ReadVector<T>(
	Stream stream,
	FixedWidthTextOptions options
)

Parameters

stream  Stream
A stream.
options  FixedWidthTextOptions
A FixedWidthTextOptions object that specifies the options to use when reading the file.

Type Parameters

T
The element type of the vector.

Return Value

Vector<T>
The vector that was read from the stream pointed to by stream.

Remarks

The element type of the stored vector does not have to match the element type of the returned vector. However, casting values from this type to type T must succeed.

ReadVector<T>(Stream, Int32[])

Reads a vector from a stream in fixed-width text format.
C#
public static Vector<T> ReadVector<T>(
	Stream stream,
	int[] columnBreaks
)

Parameters

stream  Stream
A stream.
columnBreaks  Int32[]
An integer array containing the zero-based indexes of the column breaks on each row.

Type Parameters

T
The element type of the vector.

Return Value

Vector<T>
The vector that was read from the stream pointed to by stream.

Remarks

The element type of the stored vector does not have to match the element type of the returned vector. However, casting values from this type to type T must succeed.

ReadVector<T>(String, FixedWidthTextOptions)

Reads a vector from a file in fixed-width text format.
C#
public static Vector<T> ReadVector<T>(
	string path,
	FixedWidthTextOptions options
)

Parameters

path  String
The path to the file.
options  FixedWidthTextOptions
A FixedWidthTextOptions object that specifies the options to use when reading the file.

Type Parameters

T
The element type of the vector.

Return Value

Vector<T>
The data frame that was read from the file pointed to by path.

Remarks

The element type of the stored vector does not have to match the element type of the returned vector. However, casting values from this type to type T must succeed.

Exceptions

FileNotFoundException The specified file does not exist.

ReadVector<T>(String, Int32[])

Reads a vector from a file in fixed-width text format.
C#
public static Vector<T> ReadVector<T>(
	string path,
	int[] columnBreaks
)

Parameters

path  String
The path to the file.
columnBreaks  Int32[]
An integer array containing the zero-based indexes of the column breaks on each row.

Type Parameters

T
The element type of the vector.

Return Value

Vector<T>
The data frame that was read from the file pointed to by path.

Remarks

The element type of the stored vector does not have to match the element type of the returned vector. However, casting values from this type to type T must succeed.

Exceptions

FileNotFoundException The specified file does not exist.

See Also