dsdpsdp.h File Reference


Detailed Description

Internal SDPCone data structures and routines.

Definition in file dsdpsdp.h.

Go to the source code of this file.

Data Structures

struct  DSDPBlockData
 Internal structure for data in one block of semidefintie. More...
struct  DSDPDataTranspose
 Internal structure for transpose of data. More...
struct  SDPblk
 Internal structure for block of semidefinite cone. More...
struct  SDPCone_C
 Internal structure for semidefinite cone. More...

Functions

int DSDPAddSDP (DSDP, SDPCone)
 Pass a semidefinite cone to the solver.
int DSDPBlockAddDataMatrix (DSDPBlockData *, int, struct DSDPDataMat_Ops *, void *)
 Add data matrix into SDP block.
int DSDPBlockADot (DSDPBlockData *, double, DSDPVec, DSDPVMat, DSDPVec)
 Compute inner product of XX with data matrices.
int DSDPBlockASum (DSDPBlockData *, double, DSDPVec, DSDPVMat)
 Sum the data matrices.
int DSDPBlockCountNonzeroMatrices (DSDPBlockData *, int *)
 Count how many data matrices are in a block of data.
int DSDPBlockDataAllocate (DSDPBlockData *, int)
 Allocate some structures.
int DSDPBlockDataDestroy (DSDPBlockData *)
 Free the data matrices.
int DSDPBlockDataInitialize (DSDPBlockData *)
 Set pointers to null.
int DSDPBlockDataMarkNonzeroMatrices (DSDPBlockData *, int *)
 Mark which variable in block have a data matrix.
int DSDPBlockDataRowSparsity (DSDPBlockData *, int, int[], int[], int)
 Determine sparsity pattern of data.
int DSDPBlockFactorData (DSDPBlockData *, DSDPVMat, SDPConeVec)
 Factor the data matrices.
int DSDPBlockGetMatrix (DSDPBlockData *, int, int *, double *, DSDPDataMat *)
 Get a data matrix from a block of data.
int DSDPBlockInitialize (SDPblk *)
 Initialize data structures in one block of the cone.
int DSDPBlockRemoveDataMatrix (DSDPBlockData *, int)
 Remove a data matrix.
int DSDPBlockSetDataMatrix (DSDPBlockData *, int, struct DSDPDataMat_Ops *, void *)
 Set data matrix into SDP block.
int DSDPBlockTakeDown (SDPblk *)
 Free data structures in one block of the cone.
int DSDPBlockTakeDownData (DSDPBlockData *)
 Free structures in block of data.
int DSDPBlockvAv (DSDPBlockData *, double, DSDPVec, SDPConeVec, DSDPVec)
 Set VAV[i] to aa * Alpha[i] * V' A[i] V.
int DSDPBlockView (DSDPBlockData *)
 Print the structure of the block.
int DSDPBlockView2 (DSDPBlockData *)
 Print the data.
int DSDPDataMatCheck (DSDPDataMat, SDPConeVec, DSDPIndex, DSDPVMat)
 Check correctness of operations on the data.
int DSDPDataTransposeInitialize (DSDPDataTranspose *)
 Initialize transpose structure for data.
int DSDPDataTransposeSetup (DSDPDataTranspose *, SDPblk *, int, int)
 Set up transpose structure for data.
int DSDPDataTransposeTakeDown (DSDPDataTranspose *)
 Free transpose structure for data.
int DSDPMakeVMat (char, int, DSDPVMat *)
 Allocate V matrix.
int DSDPMakeVMatWithArray (char, double[], int, int, DSDPVMat *)
 Allocate V matrix using the given array.
int DSDPSetDataMatZero (DSDPDataMat *)
 Make a data matrix a zero matrix.
int SDPConeCheckJ (SDPCone, int)
 Check validity of parameter.
int SDPConeCheckM (SDPCone, int)
 Check validity of parameter.
int SDPConeCheckN (SDPCone, int, int)
 Check validity of parameter.
int SDPConeCheckStorageFormat (SDPCone, int, char)
 Check validity of parameters.
int SDPConeComputeHessian (SDPCone, double, DSDPSchurMat, DSDPVec, DSDPVec)
 Compute the Hessian to the barrier term.
int SDPConeComputeRHS (SDPCone, int, double, DSDPVec, DSDPVec, DSDPVec)
 Compute the gradient to the barrier term.
int SDPConeComputeSS (SDPCone, int, DSDPVec, DSDPVMat)
 Sum the data matrices.
int SDPConeComputeX3 (SDPCone, int, double, DSDPVec, DSDPVec, DSDPVMat)
 Compute the matrix X with the given information.
int SDPConeComputeXDot (SDPCone, int, DSDPVec, DSDPVMat, DSDPVec, double *, double *, double *)
 Compute inner product of X with the Data, S, and norm of X.
int SDPConeComputeXX (SDPCone, int, DSDPVec, double, DSDPDualMat, DSDPVMat)
 Compute X.
int SDPConeDestroy (SDPCone)
 Free data structure of the cone.
int SDPConeMultiply (SDPCone, int, double, DSDPVec, DSDPVec, DSDPVec)
 Compute the gradient to the barrier term.
int SDPConeSetRIdentity (SDPCone, int, int, double)
 Add identify matrix to dual matrix.
int SDPConeSetup (SDPCone, DSDPVec)
 Allocate data structure of the cone.
int SDPConeSetup2 (SDPCone, DSDPVec, DSDPSchurMat)
 Allocate data structure of the cone.


Function Documentation

int DSDPAddSDP ( DSDP  dsdp,
SDPCone  sdpcone 
)

Pass a semidefinite cone to the solver.

Parameters:
dsdp solver
sdpcone semidefinite cone

Definition at line 331 of file sdpkcone.c.

int DSDPBlockAddDataMatrix ( DSDPBlockData ADATA,
int  vari,
struct DSDPDataMat_Ops dsdpdataops,
void *  data 
)

Add data matrix into SDP block.

Parameters:
ADATA block of data.
vari the variable to which the matrix corresponds.
dsdpdataops function pointers
data opaque pointer to matrix.

Definition at line 381 of file dsdpblock.c.

Referenced by DSDPBlockSetDataMatrix(), and SDPConeAddDataMatrix().

int DSDPBlockADot ( DSDPBlockData ADATA,
double  aa,
DSDPVec  Alpha,
DSDPVMat  X,
DSDPVec  AX 
)

Compute inner product of XX with data matrices.

Parameters:
ADATA block of data.
aa scalar
Alpha scalar.
X Dense symmetric matrix
AX Set AX[i] to aa * Alpha[i] * Dot( A[i] * X)

Definition at line 49 of file dsdpblock.c.

Referenced by SDPConeAddADotX(), SDPConeComputeHessian(), SDPConeComputeRHS(), and SDPConeComputeXDot().

int DSDPBlockASum ( DSDPBlockData ADATA,
double  aa,
DSDPVec  Yk,
DSDPVMat  XX 
)

Sum the data matrices.

Parameters:
ADATA block of data.
aa scalar
Yk scalar.
XX equals aa * sum ( YK[i]* A[i] )

Definition at line 20 of file dsdpblock.c.

Referenced by SDPConeComputeSS(), and SDPConeMultiply().

int DSDPBlockCountNonzeroMatrices ( DSDPBlockData ADATA,
int *  nzmats 
)

Count how many data matrices are in a block of data.

Parameters:
ADATA block of data.
nzmats set to number of nonzero matrices. Numbers from 0 to this number can be used as a matrix id in DSDPBlockGetMatrix()

Definition at line 272 of file dsdpblock.c.

Referenced by DSDPDataTransposeSetup(), SDPConeCheckData(), SDPConeComputeRHS(), SDPConeComputeXX(), SDPConeMultiply(), SDPConeView3(), and SDPConeViewDataMatrix().

int DSDPBlockDataAllocate ( DSDPBlockData ADATA,
int  nnz 
)

Allocate some structures.

Parameters:
ADATA block of data.
nnz number of data matrices to allocate space

Definition at line 221 of file dsdpblock.c.

Referenced by DSDPBlockAddDataMatrix(), and SDPConeSetSparsity().

int DSDPBlockDataDestroy ( DSDPBlockData ADATA  ) 

Free the data matrices.

Parameters:
ADATA block of data.

Definition at line 195 of file dsdpblock.c.

Referenced by SDPConeDestroy().

int DSDPBlockDataInitialize ( DSDPBlockData ADATA  ) 

Set pointers to null.

Parameters:
ADATA block of data.

Definition at line 163 of file dsdpblock.c.

Referenced by DSDPBlockDataDestroy(), and DSDPBlockInitialize().

int DSDPBlockDataMarkNonzeroMatrices ( DSDPBlockData ADATA,
int *  annz 
)

Mark which variable in block have a data matrix.

Parameters:
ADATA block of data.
annz array of integers to mark.

Definition at line 254 of file dsdpblock.c.

Referenced by DSDPDataTransposeSetup().

int DSDPBlockDataRowSparsity ( DSDPBlockData ADATA,
int  row,
int  ai[],
int  rnnz[],
int  n 
)

Determine sparsity pattern of data.

Parameters:
ADATA block of data.
row from 0 to n.
ai (input) array of ones and zeros that identify which data matrices to check.
rnnz (output) array of length m where nonzeros indicate nonzero data.
n dimension of block.

Definition at line 330 of file dsdpblock.c.

int DSDPBlockFactorData ( DSDPBlockData ADATA,
DSDPVMat  X,
SDPConeVec  W 
)

Factor the data matrices.

Parameters:
ADATA block of data.
X work array
W Work vector

Definition at line 113 of file dsdpblock.c.

Referenced by DSDPBlockSetup().

int DSDPBlockGetMatrix ( DSDPBlockData ADATA,
int  id,
int *  vari,
double *  scl,
DSDPDataMat A 
)

Get a data matrix from a block of data.

Parameters:
ADATA block of data.
id identfier of the matrices, numbered consecutively from 0.
vari set to variable number corresponding to A.
scl scaling
A data matrix.

Definition at line 307 of file dsdpblock.c.

Referenced by DSDPBlockFactorData(), DSDPDataTransposeSetup(), SDPConeCheckData(), SDPConeComputeHessian(), SDPConeComputeRHS(), SDPConeComputeXX(), SDPConeMultiply(), and SDPConeViewDataMatrix().

int DSDPBlockInitialize ( SDPblk blk  ) 

Initialize data structures in one block of the cone.

Parameters:
blk block of semidefinite cone

Definition at line 279 of file sdpconesetup.c.

int DSDPBlockRemoveDataMatrix ( DSDPBlockData ADATA,
int  vari 
)

Remove a data matrix.

Parameters:
ADATA block of data.
vari variable corresponding the matrix.

Definition at line 351 of file dsdpblock.c.

Referenced by DSDPBlockSetDataMatrix(), SDPConeRemoveDataMatrix(), and SDPConeSetRMatrix().

int DSDPBlockSetDataMatrix ( DSDPBlockData ADATA,
int  vari,
struct DSDPDataMat_Ops dsdpdataops,
void *  data 
)

Set data matrix into SDP block.

Parameters:
ADATA block of data.
vari the variable to which the matrix corresponds.
dsdpdataops function pointers
data opaque pointer to matrix.

Definition at line 406 of file dsdpblock.c.

Referenced by SDPConeSetRMatrix().

int DSDPBlockTakeDown ( SDPblk blk  ) 

Free data structures in one block of the cone.

Parameters:
blk block of semidefinite cone

Definition at line 305 of file sdpconesetup.c.

Referenced by DSDPConeTakeDown().

int DSDPBlockTakeDownData ( DSDPBlockData ADATA  ) 

Free structures in block of data.

Parameters:
ADATA block of data.

Definition at line 182 of file dsdpblock.c.

Referenced by DSDPBlockDataDestroy(), and DSDPBlockTakeDown().

int DSDPBlockvAv ( DSDPBlockData ADATA,
double  aa,
DSDPVec  Alpha,
SDPConeVec  V,
DSDPVec  VAV 
)

Set VAV[i] to aa * Alpha[i] * V' A[i] V.

Parameters:
ADATA block of data.
aa scalar
Alpha scalar.
V vecotr
VAV the product

Definition at line 84 of file dsdpblock.c.

Referenced by SDPConeAddXVAV(), and SDPConeComputeHessian().

int DSDPBlockView ( DSDPBlockData ADATA  ) 

Print the structure of the block.

Parameters:
ADATA block of data.

Definition at line 454 of file dsdpblock.c.

Referenced by SDPConeView().

int DSDPBlockView2 ( DSDPBlockData ADATA  ) 

Print the data.

Parameters:
ADATA block of data.

Definition at line 474 of file dsdpblock.c.

Referenced by SDPConeView2().

int DSDPDataMatCheck ( DSDPDataMat  AA,
SDPConeVec  W,
DSDPIndex  IS,
DSDPVMat  XX 
)

Check correctness of operations on the data.

Parameters:
AA data matrix.
W work vector
IS work array
XX work array

Definition at line 498 of file dsdpblock.c.

Referenced by SDPConeCheckData().

int DSDPDataTransposeInitialize ( DSDPDataTranspose ATranspose  ) 

Initialize transpose structure for data.

Parameters:
ATranspose transpose structure for data.

Definition at line 15 of file sdpconesetup.c.

Referenced by DSDPDataTransposeTakeDown().

int DSDPDataTransposeSetup ( DSDPDataTranspose ATranspose,
SDPblk blk,
int  nblocks,
int  m 
)

Set up transpose structure for data.

Parameters:
ATranspose transpose structure for data.
blk semidefinite blocks
nblocks number of blocks
m dimension of Y vector.

Definition at line 36 of file sdpconesetup.c.

Referenced by SDPConeSetup().

int DSDPDataTransposeTakeDown ( DSDPDataTranspose ATranspose  ) 

Free transpose structure for data.

Parameters:
ATranspose transpose structure for data.

Definition at line 89 of file sdpconesetup.c.

Referenced by DSDPConeTakeDown(), and DSDPDataTransposeSetup().

int DSDPMakeVMat ( char  UPLQ,
int  n,
DSDPVMat X 
)

Allocate V matrix.

Parameters:
UPLQ format
n dimension
X new matrix.
See also:
SDPConeSetStorageFormat()

Definition at line 351 of file sdpsss.c.

Referenced by DSDPBlockSetup(), and SDPConeSetXMat().

int DSDPMakeVMatWithArray ( char  UPLQ,
double  xx[],
int  nnz,
int  n,
DSDPVMat X 
)

Allocate V matrix using the given array.

Parameters:
UPLQ format
xx array
nnz length of the array
n dimension
X new matrix.
See also:
SDPConeSetStorageFormat()

SDPConeGetXArray()

Definition at line 381 of file sdpsss.c.

Referenced by SDPConeAddADotX(), SDPConeComputeS(), SDPConeComputeX(), SDPConeSetXArray(), and SDPConeViewX().

int DSDPSetDataMatZero ( DSDPDataMat A  ) 

Make a data matrix a zero matrix.

Parameters:
A data matrix.

Definition at line 537 of file dsdpadddatamat.c.

Referenced by DSDPBlockRemoveDataMatrix().

int SDPConeCheckJ ( SDPCone  sdpcone,
int  blockj 
)

int SDPConeCheckM ( SDPCone  sdpcone,
int  m 
)

Check validity of parameter.

Parameters:
sdpcone SDP cone
m number of y variables

Definition at line 68 of file dsdpadddata.c.

Referenced by SDPConeAddADotX(), and SDPConeComputeS().

int SDPConeCheckN ( SDPCone  sdpcone,
int  blockj,
int  n 
)

Check validity of parameter.

Parameters:
sdpcone SDP cone
blockj block number
n dimension of block.

Definition at line 48 of file dsdpadddata.c.

Referenced by SDPConeAddDataMatrix(), SDPConeAddXVAV(), SDPConeComputeS(), SDPConeComputeX(), SDPConeSetRMatrix(), SDPConeSetXArray(), SDPConeViewX(), and SDPConeXVMultiply().

int SDPConeCheckStorageFormat ( SDPCone  sdpcone,
int  blockj,
char  format 
)

Check validity of parameters.

Parameters:
sdpcone SDP cone
blockj block number
format such as packed symmetric or upper full symmetric

Definition at line 101 of file dsdpadddata.c.

int SDPConeComputeHessian ( SDPCone  sdpcone,
double  mu,
DSDPSchurMat  M,
DSDPVec  vrhs1,
DSDPVec  vrhs2 
)

Compute the Hessian to the barrier term.

Parameters:
sdpcone cone
mu barrier parameter
M Schur matrix to insert elements.
vrhs1 dual objectvive gradient.
vrhs2 barrier gradient

Definition at line 30 of file sdpcompute.c.

int SDPConeComputeRHS ( SDPCone  sdpcone,
int  blockj,
double  mu,
DSDPVec  vrow,
DSDPVec  vrhs1,
DSDPVec  vrhs2 
)

Compute the gradient to the barrier term.

Parameters:
sdpcone semidefinite cone
blockj block of the cone.
mu barrier parameter
vrow scalar to multiply each element of gradient.
vrhs1 dual objectvive gradient.
vrhs2 barrier gradient

Definition at line 125 of file sdpcompute.c.

int SDPConeComputeSS ( SDPCone  sdpcone,
int  blockj,
DSDPVec  Y,
DSDPVMat  SS 
)

Sum the data matrices.

Parameters:
sdpcone semidefinite cone object
blockj block number
Y scalar multiples of A matrices.
SS destination array.

Definition at line 18 of file sdpcone.c.

Referenced by SDPConeComputeS(), SDPConeComputeX3(), and SDPConeComputeXV().

int SDPConeComputeX3 ( SDPCone  sdpcone,
int  blockj,
double  mu,
DSDPVec  Y,
DSDPVec  DY,
DSDPVMat  X 
)

Compute the matrix X with the given information.

Parameters:
sdpcone semidefinite cone
blockj block number
mu barrier parameter
Y dual solution
DY Newton direction
X destination
See also:
DSDPComputeX()

Definition at line 140 of file sdpcone.c.

Referenced by SDPConeComputeX().

int SDPConeComputeXDot ( SDPCone  sdpcone,
int  blockj,
DSDPVec  Y,
DSDPVMat  X,
DSDPVec  AX,
double *  xtrace,
double *  xnorm,
double *  tracexs 
)

Compute inner product of X with the Data, S, and norm of X.

Parameters:
sdpcone semidefinite cone
blockj block number
Y dual solution
X dense array matrix
AX inner products
xtrace trace of X
xnorm norm of X
tracexs inner product of X and S

Definition at line 111 of file sdpcone.c.

Referenced by SDPConeComputeX().

int SDPConeComputeXX ( SDPCone  sdpcone,
int  blockj,
DSDPVec  DY,
double  mu,
DSDPDualMat  S,
DSDPVMat  X 
)

Compute X.

Parameters:
sdpcone cone
blockj block number in SDP cone.
DY step direction vector
mu barrier parameter
S dual matrix alread inverted.
X the result.

Definition at line 235 of file sdpcompute.c.

Referenced by SDPConeComputeX3().

int SDPConeDestroy ( SDPCone  sdpcone  ) 

Free data structure of the cone.

Parameters:
sdpcone semidefinite cone

Definition at line 350 of file sdpconesetup.c.

int SDPConeMultiply ( SDPCone  sdpcone,
int  blockj,
double  mu,
DSDPVec  vrow,
DSDPVec  vin,
DSDPVec  vout 
)

Compute the gradient to the barrier term.

Parameters:
sdpcone semidefinite cone
blockj block of cone
mu barrier parameter
vrow scalar to multiply each element of the product
vin in vector.
vout product

Definition at line 182 of file sdpcompute.c.

int SDPConeSetRIdentity ( SDPCone  sdpcone,
int  blockj,
int  n,
double  rr 
)

Add identify matrix to dual matrix.

Parameters:
sdpcone SDP cone
blockj block number j from 0 to nblocks
n dimension of the matrix
rr multiple of identity matrix.

Definition at line 438 of file dsdpadddatamat.c.

Referenced by SDPConeSetup().

int SDPConeSetup ( SDPCone  sdpcone,
DSDPVec  yy0 
)

Allocate data structure of the cone.

Parameters:
sdpcone semidefinite cone
yy0 variable vector

Definition at line 249 of file sdpconesetup.c.

int SDPConeSetup2 ( SDPCone  sdpcone,
DSDPVec  yy0,
DSDPSchurMat  M 
)

Allocate data structure of the cone.

Parameters:
sdpcone semidefinite cone
yy0 variable vector
M Schur matrix.

Definition at line 224 of file sdpconesetup.c.


Generated on Wed Nov 5 21:46:06 2008 for DSDP by  doxygen 1.5.6