Matrix Market File.Read Matrix Method
Definition
Namespace: Extreme.Data.Text
Assembly: Extreme.Data (in Extreme.Data.dll) Version: 3.2.0
Assembly: Extreme.Data (in Extreme.Data.dll) Version: 3.2.0
Overload List
Read | Reads a matrix from a stream in Matrix Market format. |
Read | Reads a matrix from a file in Matrix Market format. |
ReadMatrix<T>(Stream, TextOptions)
Reads a matrix from a stream in Matrix Market format.
public static Matrix<T> ReadMatrix<T>(
Stream stream,
TextOptions options = null
)
Parameters
- stream Stream
- A stream.
- options TextOptions (Optional)
- A TextOptions object that specifies the options to use when reading the file.
Type Parameters
- T
- The element type of the matrix.
Return Value
Matrix<T>The matrix that was read from the stream pointed to by stream.
Remarks
The element type of the stored matrix does not have to match the element type of the returned matrix. However, casting values from this type to type T must succeed.
ReadMatrix<T>(String, TextOptions)
Reads a matrix from a file in Matrix Market format.
public static Matrix<T> ReadMatrix<T>(
string path,
TextOptions options = null
)
Parameters
- path String
- The path to the file.
- options TextOptions (Optional)
- A TextOptions object that specifies the options to use when reading the file.
Type Parameters
- T
- The element type of the matrix.
Return Value
Matrix<T>The data frame that was read from the file pointed to by path.
Remarks
The element type of the stored matrix does not have to match the element type of the returned matrix. However, casting values from this type to type T must succeed.
Exceptions
File | The specified file does not exist. |