The problem I want to solve has this form:
\begin{equation} \begin{aligned} & \underset{\theta}{\text{minimize}} & & \sum_{k=1}^{K} \|g_k - \theta_k\|^2 \\ & \text{subject to} & & \| \theta_m - \theta_l \|^2 \leq \| x_m - x_l \|^2 , \quad 1 \leq m < l \leq K, \end{aligned} \end{equation}
($\theta_i$ are the variables to optimize over; $x_i$ and $g_i$ are constants)
Is there any closed-form for arbitrary $K$? Or an appropriate iterative method which yields an approximate solution?