Raw Format

The matrix class use the following function to read from a raw data file.

void load (const std::string &path, unsigned dim, unsigned skip = 0, unsigned gap = 0);

The function reads the file in the following way:

  1. Skip "skip" bytes at the beginning of file.
  2. Read the next vector of "dim" dimensions. Stop if no more data is available.
  3. Skip "gap" bytes.
  4. Go back to 2 and read the next vector.