Json File.Read Vector Method
Definition
Namespace: Numerics.NET.Data.Json
Assembly: Numerics.NET.Data.Json (in Numerics.NET.Data.Json.dll) Version: 4.0.3
Assembly: Numerics.NET.Data.Json (in Numerics.NET.Data.Json.dll) Version: 4.0.3
Overload List
Read | Reads a vector from a stream in JSON format. |
Read | Reads a vector from a file in JSON format. |
ReadVector<T>(Stream, JsonOptions)
Reads a vector from a stream in JSON format.
public static Vector<T> ReadVector<T>(
Stream stream,
JsonOptions options = null
)
Parameters
- stream Stream
- A stream.
- options JsonOptions (Optional)
- A JsonOptions 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>(String, JsonOptions)
Reads a vector from a file in JSON format.
public static Vector<T> ReadVector<T>(
string path,
JsonOptions options = null
)
Parameters
- path String
- The path to the file.
- options JsonOptions (Optional)
- A JsonOptions 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
File | The specified file does not exist. |