Sparse matrix element topology with application to AMG(e) and preconditioning