codes for graphcuts, the higher-order mrf etc.