constraints.solve.project_to_manifold

constraints.solve.project_to_manifold(free_params, metadata, *, steps=1)

Project free_params onto the constraint manifold via Newton correction(s).

Applies steps Newton steps: Δ = Jᵀ(JJᵀ)⁻¹ c(p), p ← p − Δ. One step is exact for linear constraints and first-order accurate for nonlinear ones (e.g. sphere). Increase steps for tighter satisfaction.

Parameters

Name Type Description Default
free_params dict[str, Array] Current name-keyed parameter arrays (may be off-manifold). required
metadata dict[str, Parameter] Name-keyed Parameter objects (carries constraint info). required
steps int Number of Newton corrections to apply (default 1). 1

Returns

Name Type Description
dict[str, Array] Projected dict[str, Array] satisfying constraints to first order.