Remove unnecessary code.

- Remove the edge weight parameter.
- Separate sampling from calculating the force between node pairs.
- Remove the duplicated code for calculating force to node pairs.