Add missing includes
Fix a bug in smoothed aggregation with energy minimization