added graph cut and unit-test

Could we use SGVector or DynamicArray here?