Add Javadoc, particularly the association between weights and edges.