SDPSolver.cpp
/***********************************************************************/
// Create and initialize an SDPSolver for the given SDP and
// SDPSolverParameters
Create and initialize an SDPSolver for the given SDP and
SDPSolverParameters
Create and initialize an SDPSolver for the given SDP and SDPSolverParameters
SDPSolver::SDPSolver(const SDP &sdp, const SDPSolverParameters &parameters):
  sdp(sdp),
  parameters(parameters),
  x(sdp.primalObjective.size(), 0),
  X(sdp.psdMatrixBlockDims()),
  y(sdp.dualObjective.size(), 0),
  Y(X),
  dx(x),
  dX(X),
  dy(y),
  dY(Y),
  PrimalResidues(X),
  dualResidues(x),
  XCholesky(X),
  YCholesky(X),
  Z(X),
  R(X),
  BilinearPairingsXInv(sdp.bilinearPairingBlockDims()),
  BilinearPairingsY(BilinearPairingsXInv),
  SchurComplement(sdp.schurBlockDims()),
  SchurComplementCholesky(SchurComplement),
  SchurOffDiagonal(sdp.FreeVarMatrix),
  schurStabilizeIndices(SchurComplement.blocks.size()),
  schurStabilizeLambdas(SchurComplement.blocks.size()),
  stabilizeBlocks(SchurComplement.blocks.size()),
  Q(sdp.FreeVarMatrix.cols, sdp.FreeVarMatrix.cols),
  Qpivots(sdp.FreeVarMatrix.cols),
  dyExtended(Q.rows),
  StepMatrixWorkspace(X)
{
  for (unsigned int b = 0; b < sdp.bilinearBases.size(); b++) {
    bilinearPairingsWorkspace.push_back(Matrix(X.blocks[b].rows,
                                               BilinearPairingsXInv.blocks[b].cols));
    eigenvaluesWorkspace.push_back(Vector(X.blocks[b].rows));
    QRWorkspace.push_back(Vector(3*X.blocks[b].rows - 1));
  }
  X.addDiagonal(parameters.initialMatrixScalePrimal);
  Y.addDiagonal(parameters.initialMatrixScaleDual);
}
SDPSolver :: SDPSolver ( const SDP & sdp , const SDPSolverParameters & parameters ) : sdp ( sdp ) , parameters ( parameters ) , x ( sdp . primalObjective . size ( ) , 0 ) , X ( sdp . psdMatrixBlockDims ( ) ) , y ( sdp . dualObjective . size ( ) , 0 ) , Y ( X ) , dx ( x ) , dX ( X ) , dy ( y ) , dY ( Y ) , PrimalResidues ( X ) , dualResidues ( x ) , XCholesky ( X ) , YCholesky ( X ) , Z ( X ) , R ( X ) , BilinearPairingsXInv ( sdp . bilinearPairingBlockDims ( ) ) , BilinearPairingsY ( BilinearPairingsXInv ) , SchurComplement ( sdp . schurBlockDims ( ) ) , SchurComplementCholesky ( SchurComplement ) , SchurOffDiagonal ( sdp . FreeVarMatrix ) , schurStabilizeIndices ( SchurComplement . blocks . size ( ) ) , schurStabilizeLambdas ( SchurComplement . blocks . size ( ) ) , stabilizeBlocks ( SchurComplement . blocks . size ( ) ) , Q ( sdp . FreeVarMatrix . cols , sdp . FreeVarMatrix . cols ) , Qpivots ( sdp . FreeVarMatrix . cols ) , dyExtended ( Q . rows ) , StepMatrixWorkspace ( X ) { for ( unsigned int b = 0 ; b < sdp . bilinearBases . size ( ) ; b ++ ) { bilinearPairingsWorkspace . push_back ( Matrix ( X . blocks [ b ] . rows , BilinearPairingsXInv . blocks [ b ] . cols ) ) ; eigenvaluesWorkspace . push_back ( Vector ( X . blocks [ b ] . rows ) ) ; QRWorkspace . push_back ( Vector ( 3 * X . blocks [ b ] . rows - 1 ) ) ; } X . addDiagonal ( parameters . initialMatrixScalePrimal ) ; Y . addDiagonal ( parameters . initialMatrixScaleDual ) ; }
Create and initialize an SDPSolver for the given SDP and
SDPSolverParameters
Create and initialize an SDPSolver for the given SDP and SDPSolverParameters
// initialize bilinearPairingsWorkspace, eigenvaluesWorkspace, QRWorkspace // X = \Omega_p I // Y = \Omega_d I