Numerical Optimization Routines

This section includes several routines which form basic building blocks for other higher level solvers.

Projections

project_to_ball(x[, radius])

Projects a vector to the \(\ell_2\) ball of a specified radius.

project_to_box(x[, radius])

Projects a vector to the box (\(\ell_{\infty}\) ball) of a specified radius.

project_to_real_upper_limit(x[, limit])

Projects a (possibly complex) vector to its real part with an upper limit on each entry.

Shrinkage

shrink(a, kappa)

Shrinks each entry of a vector by \(\kappa\).

Conjugate Gradient Methods

Normal Conjugate Gradients on Matrices

cg.solve_from(A, b, x_0[, max_iters, …])

Solves the problem \(Ax = b\) for a symmetric positive definite \(A\) via conjugate gradients iterations with an initial guess.

cg.solve_from_jit(A, b, x_0[, max_iters, …])

Solves the problem \(Ax = b\) for a symmetric positive definite \(A\) via conjugate gradients iterations with an initial guess.

cg.solve(A, b[, max_iters, res_norm_rtol])

Solves the problem \(Ax = b\) for a symmetric positive definite \(A\) via conjugate gradients iterations.

cg.solve_jit(A, b[, max_iters, res_norm_rtol])

Solves the problem \(Ax = b\) for a symmetric positive definite \(A\) via conjugate gradients iterations.

Preconditioned Normal Conjugate Gradients on Linear Operators

These are more general purpose.

pcg.solve_from(A, b, x0[, max_iters, tol, …])

Solves the problem \(Ax = b\) for a symmetric positive definite \(A\) via preconditioned conjugate gradients iterations with an initial guess and a preconditioner.

pcg.solve_from_jit(A, b, x0[, max_iters, …])

Solves the problem \(Ax = b\) for a symmetric positive definite \(A\) via preconditioned conjugate gradients iterations with an initial guess and a preconditioner.

pcg.solve(A, b[, max_iters, tol, atol, M])

Solves the problem \(Ax = b\) for a symmetric positive definite \(A\) via preconditioned conjugate gradients iterations with a preconditioner.

pcg.solve_jit(A, b[, max_iters, tol, atol, M])

Solves the problem \(Ax = b\) for a symmetric positive definite \(A\) via preconditioned conjugate gradients iterations with a preconditioner.