gravelamps/utils/file-handling.h¶
Functions
-
std::vector<double> ReadVectorFromFile(char *filename)¶
Read in file and assign to double vector.
- Parameters:
filename – Path to file to be read in
-
std::vector<std::vector<double>> ReadMatrixFromFile(char *filename, int num_rows, int num_cols)¶
Read in file and assign to double matrix of specified size. Sets any non-filled numbers to zero.
- Parameters:
filename – Path to file to be read in
num_rows – Number of rows for completed matrix
num_cols – Number of columns for completed matrix