ProximalOperators.jl
ProximalOperators.jl copied to clipboard
Move traits to ProximalCore, new functions, RecursiveArrayToolsExt, defer loading OSQP
This PR is part of the effort to make StructuredOptimization as general as possible (see the PR on OperatorCore: https://github.com/JuliaFirstOrder/ProximalCore.jl/pull/5).
Changes:
PrecomposedSlicedSeparableSum: function to be used for complex problems with multiple variables and variables sliced in different terms. E.g.:
x, y = Variable(10), Variable(5)
problem = ls(x[1:5] - y) + norm(x, 1) + norm(x[6:10], 1)
reshapeInputwrapper can help, for example, in low-rank minimization to avoid reshapedEyefrom AbstractOperators and its unnecessary copy:
x = Variable(3,3,5)
problem = norm(reshape(x, 9, 5), *)
RecursiveArrayToolsExtextension contains some functions that were moved from StructuredOptimization as I believe they belong here.- Loading OSQP dependency was delayed until
IndPolyhedralOSQPis instantiated. The reason behind it was that OSQP is one of the largest dependencies of ProximalOperators, and it is only used by a single function. ProximalOperators loads almost a second faster without it.
I'll break this large PR into multiple smaller ones, but I'll keep this open for reference.