Scythe-1.0.3
template<typename T_type = double, matrix_order ORDER = Col, matrix_style STYLE = Concrete>
scythe::Matrix< T_type, ORDER, STYLE >::Matrix ( const std::string &  path,
bool  oldstyle = false 
) [inline]

File constructor.

Constructs a matrix from the contents of a file. The standard input file format is a simple rectangular text file with one matrix row per line and spaces delimiting values in a row. Optionally, one can also use Scythe's old file format which is a space-delimited, row-major ordered, list of values with row and column lengths in the first two slots.

Parameters:
pathThe path of the input file.
oldstyleWhether or not to use Scythe's old file format.
See also:
Matrix()
Matrix(T_type)
Matrix(uint, uint, bool, T_type)
Matrix(uint, uint, T_iterator)
Matrix(const Matrix&)
Matrix(const Matrix<T_type, O, S> &)
Matrix(const Matrix<S_type, O, S> &)
Matrix(const Matrix<T_type, O, S>&, uint, uint, uint, uint)
save(const std::string&)
Exceptions:
scythe_alloc_error(Level 1)
scythe_file_error(Level 1)
scythe_bounds_error(Level 3)

Example:

#include <scythestat/matrix.h>
using namespace scythe;

int main ()
{
  // Construct a matrix from the file amatrix.dat
  Matrix<> M("amatrix.dat");
  
  return 0;
}