Function necsim::importToMapAndRound

Function Documentation

uint32_t necsim::importToMapAndRound(string map_file, Map<uint32_t> &map_in, unsigned long map_x, unsigned long map_y, double scalar)

Imports the provided given file to the provided matrix, given the x and y dimensions. The integer value in the final matrix is multiplied by the scalar to generate the final matrix. Note that this doubles the memory usage.

Return
the maximum value from the imported matrix
Parameters
  • map_file: the path to the map file to import
  • map_in: the matrix to change the values of
  • map_x: the x dimension of the matrix
  • map_y: the y dimension of the matrix
  • scalar: the scalar to multiply all values in the final matrix by (before rounding to integer)