@@ -320,7 +320,8 @@ function test_positivesemidefiniteconesquare()
320320 [1.0 , 0.0 , 0.0 , 1.0 ] => 0.0 ,
321321 [1.0 , - 1.0 , - 1.0 , 1.0 ] => 0.0 ,
322322 [1.0 , - 2.0 , - 2.0 , 1.0 ] => 1.0 ,
323- [1.0 , 1.1 , 1.1 , - 2.3 ] => 2.633053201505194 ;
323+ [1.0 , 1.1 , 1.1 , - 2.3 ] => 2.633053201505194 ,
324+ [1.0 , - 2.0 , - 2.0 , 1.0 ] => 1.0 ,;
324325 mismatch = [1.0 ],
325326 )
326327 return
@@ -476,6 +477,44 @@ function test_LogDetConeSquare()
476477 return
477478end
478479
480+ function test_Scaled ()
481+ _test_set (
482+ MOI. Scaled (MOI. PositiveSemidefiniteConeTriangle (2 )),
483+ [1.0 , 0.0 , 1.0 ] => 0.0 ,
484+ [1.0 , - 1.0 , 1.0 ] => 0.0 ,
485+ [1.0 , - 2.0 * sqrt (2 ), 1.0 ] => 1.0 ,
486+ [1.0 , 1.1 * sqrt (2 ), - 2.3 ] => 2.633053201505194 ;
487+ mismatch = [1.0 ],
488+ )
489+ return
490+ end
491+
492+ function test_PositiveSemidefiniteConeTriangle_Complex ()
493+ _test_set (
494+ MOI. PositiveSemidefiniteConeTriangle (2 ),
495+ ComplexF64[1.0 , 0.0 , 1.0 ] => 0.0 ,
496+ ComplexF64[1.0 , - 1.0 , 1.0 ] => 0.0 ,
497+ ComplexF64[1.0 , - 2.0 , 1.0 ] => 1.0 ,
498+ ComplexF64[1.0 , 1.1 , - 2.3 ] => 2.633053201505194 ,
499+ ComplexF64[1.0 , 1 - im, 1.0 ] => 2.449489742783177 ;
500+ mismatch = [1.0 ],
501+ )
502+ return
503+ end
504+
505+ function test_HermitianPositiveSemidefiniteConeTriangle ()
506+ _test_set (
507+ MOI. HermitianPositiveSemidefiniteConeTriangle (2 ),
508+ [1.0 , 0.0 , 1.0 , 0.0 ] => 0.0 ,
509+ [1.0 , - 1.0 , 1.0 , 0.0 ] => 0.0 ,
510+ [1.0 , - 2.0 , 1.0 , 0.0 ] => 1.0 ,
511+ [1.0 , 1.1 , - 2.3 , 0.0 ] => 2.633053201505194 ,
512+ [1.0 , 1.0 , 1.0 , - 1.0 ] => 2.449489742783177 ;
513+ mismatch = [1.0 ],
514+ )
515+ return
516+ end
517+
479518end
480519
481520TestFeasibilityChecker. runtests ()
0 commit comments