Elaboradar 0.1
|
◆ load_ascii()
Load a Matrix2D, from space-separated column-major ascii floats. Definizione alla linea 515 del file assets.cpp. 516{
517 LOG_INFO("Opening %s %s", desc, fname.c_str());
519
520 for (unsigned x = 0; x < matrix.cols(); ++x)
521 for (unsigned y = 0; y < matrix.rows(); ++y)
522 {
523 float val;
524 fscanf(in, "%f ", &val);
525 matrix(y, x) = val;
526 }
527
528 fclose(in);
529}
FILE * fopen_checked(const char *fname, const char *mode, const char *description) A wrapper of fopen that throws an exception if it cannot open the file. Definition: utils.cpp:144 Referenzia radarelab::fopen_checked(). Referenziato da load_dem(). |