The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
First public release of the R port of diffcp.
solve_only(A, b, c, cone_dict, ...) — forward solve
of a convex cone program via Clarabel (default) or SCS, supporting all
six standard cones (zero, nonneg, SOC, PSD, exponential, exponential
dual). Quadratic objectives via the P argument are
supported in forward-only mode (mirroring Python diffcp).
solve_and_derivative(A, b, c, cone_dict, mode, ...)
— solves the cone program and returns the optimal (x, y, s)
together with two callables D(dA, db, dc) and
DT(dx, dy, ds) that apply the derivative and its adjoint at
the supplied perturbations.
mode = "lsqr" (default): matrix-free LSQR via the
M operator.mode = "dense": dense M matrix factored
with Eigen LDLT.pi(x, cones, dual) — projection onto a Cartesian
product of cones, with dual = TRUE selecting the dual
product cone.
PSD-cone forward solves through Clarabel automatically permute
the rows of A and entries of b from SCS
lower-triangular ordering to Clarabel upper-triangular ordering, and
permute y / s back on return.
The numerical core is a faithful port of the C++ source in cvxgrp/diffcp
(linop.cpp, cones.cpp, deriv.cpp,
lsqr.cpp), called from R via
RcppEigen.
Each R file is annotated with
## DIFFCP SOURCE: <upstream path> pointing at the
corresponding lines in the upstream Python source.
tests/test_clarabel.py,
tests/test_clarabel_psd.py, tests/test_scs.py,
and tests/test_cone_prog_diff.py from the upstream Python
repository. Test fixtures are pinned to Python diffcp’s outputs at the
same atol bounds Python uses (1e-8 on
finite-difference D-vs-FD agreement; 1e-4 on
SCS-vs-Clarabel cross-checks; 1e-12 on round-trips).lpgd / lpgd_left /
lpgd_right derivative modes (used by cvxpylayers for QP and
degenerate-derivative cases).solve_and_derivative_batch,
solve_only_batch).lsmr mode.These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.