Collect all edge and gradient related functions in one file.