I am not sure about the functions you're referencing to, but:
The term $$ \sum_{i=1}^{N}\sum_{j=1}^{N}{w_{ij}x_ix_j} $$ is nothing more than the result of two matrix multiplications, you can also see this as an application of a bilinear form, so in fact you have $$ \sum_{i=1}^{N}\sum_{j=1}^{N}{w_{ij}x_ix_j}=x^t W x\in\mathbb R $$ where $W=\begin{pmatrix}w_{11}&w_{12}&\ldots\\\w_{21}&\ddots\\\\\vdots\end{pmatrix}\in \mathbb R^{N\times N}$ and $x\in\mathbb R^N$. So it is somehow a weighted "scalar product", also the property of being a scalar product actually depends on the weight matrix $W$ (like being symmetric etc.).