R Under development (unstable) (2025-06-06 r88283 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # Test a simple example > library(Rdsdp) > > # Sedumi format example > K=c() > K$s=c(3) > K$l=0 > OPTIONS=NULL > OPTIONS$gaptol=1e-10 > > A1 = c(2,-0.5,-0.6, -0.5,2,0.4, -0.6,0.4,3) > C = -A1 > # A1 = c(0,1,0, 1,0,0, 0,0,0) > A2 = c(0,0,1, 0,0,0, 1,0,0) > A3 = c(0,0,0, 0,0,1, 0,1,0) > A4 = -c(1,0,0, 0,1,0, 0,0,1) > A=rbind(A2,A3,A4) > b <- -c(0,0,1) > > ret = dsdp(A,b,C,K,OPTIONS) Iter PP Objective DD Objective PInfeas DInfeas Nu StepLength Pnrm --------------------------------------------------------------------------------------- 0 1.00000000e+10 -2.98174193e+11 2.0e+00 3.0e+03 3.0e+11 0.00 0.00 0.00 10 -2.99999999e+00 -3.00000000e+00 1.1e-22 0.0e+00 3.2e-10 1.00 1.00 0.34 13 -3.00000000e+00 -3.00000000e+00 7.0e-25 0.0e+00 2.3e-12 1.00 0.26 3.70 > y = ret$y > > stopifnot(all.equal(y,c(0.6,-0.4,3),tolerance=1e-05)) > > > > > proc.time() user system elapsed 0.17 0.14 0.28