#include #include /* #define ENABLE_LOG */ #ifdef ENABLE_LOG # define LOG(x) x #else # define LOG(x) (void) 0 #endif typedef struct borders { double north; double east; double south; double west; } borders; /* * Create a matrix stored in a single array. */ double *create_sa_matrix(int rows, int cols); /* * Destroy a single array matrix. */ void destroy_sa_matrix(double *x); /* * Get the index for the single array matrix * that correspond to the given row and column. */ int sa_index(int cols, int r, int c); /* * Print a single array matrix. */ void print_sa_matrix(double *x, int rows, int cols); double **create_matrix(int rows, int cols); void destroy_matrix(double **x, int rows); void print_matrix(double **x, int rows, int cols);