Adds the energy_function implementation and the corresponding tests.
Adds the Seam class.