def rc2i_short(row, col):
    if ((row < num_rows) and (row >= 0) and (col < num_cols) and (col >= 0)):
        return ((row * num_rows) + col)
    return (- 1)
def rc2i_short(row, col):
    if ((row < num_rows) and (row >= 0) and (col < num_cols) and (col >= 0)):
        return ((row * num_rows) + col)
    return (- 1)