boundlab.ops.quadratic_shift#

boundlab.ops.quadratic_shift(A, b)[source]#

Complete the square: \(x^T A x + b^T x = (x - c)^T A (x - c) + \beta\) with \(c = -A^{-1} b / 2\) and \(\beta = c^T A c\) returned as (c, bias).