An ideal column algorithm for integer programs with special ordered sets of variables