Graph cut truncation method and unit-test added