\sum_{i,j}g_{ij}(x_{i1}-x_{i2})(x_{j1}-x_{j2})