added graph cut and unit-test

Add comments for every function and member variable.