Added c file for ctypes.

Added c code for finding edges quickly.