function [gid] = matlabGxGy_to_matlabGid ( gx , gy , max_clm_idx )

gid = gy + (gx-1)*max_clm_idx ;