DSDP
Functions
dsdpadddatamat.c File Reference

Set sparse or dense matrices into the cone. More...

Go to the source code of this file.

Functions

int DSDPGetIdentityDataMatF (int, double, struct DSDPDataMat_Ops **, void **)
 Create a sparse matrix usuable by DSDP in full symmetric format. More...
 
int DSDPGetIdentityDataMatP (int, double, struct DSDPDataMat_Ops **, void **)
 Create a sparse matrix usuable by DSDP in packed symmetric format. More...
 
int DSDPGetR1PMat (int, double, int, const int[], const double[], int, struct DSDPDataMat_Ops **, void **)
 Create a rank one matrix usuable by DSDP in packed symmetric format. More...
 
int DSDPGetR1UMat (int, double, int, const int[], const double[], int, struct DSDPDataMat_Ops **, void **)
 Create a rank one matrix usuable by DSDP in full symmetric format. More...
 
int DSDPGetVechMat (int, int, double, const int[], const double[], int, struct DSDPDataMat_Ops **, void **)
 Given data in packed symmetric format, create a sparse matrix usuable by DSDP. More...
 
int DSDPGetVecUMat (int, int, double, const int[], const double[], int, struct DSDPDataMat_Ops **, void **)
 Given data in full symmetric format, create a sparse matrix usuable by DSDP. More...
 
int DSDPSetDataMatZero (DSDPDataMat *A)
 Make a data matrix a zero matrix. More...
 
int SDPConeAddADenseVecMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, double val[], int nnz)
 Add a matrix $A_{i,j}$ in a dense format. More...
 
int SDPConeAddARankOneMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz)
 Add data matrix $A_{i,j}= alpha * v * v^T $ where v is a sparse vector. More...
 
int SDPConeAddASparseVecMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz)
 Add data matrix $A_{i,j}$ in a sparse format. More...
 
int SDPConeAddConstantMat (SDPCone sdpcone, int blockj, int vari, int n, double value)
 Add a matrix $A_{i,j}$ whose elements are all the same. More...
 
int SDPConeAddDataMatrix (SDPCone, int, int, int, char, struct DSDPDataMat_Ops *, void *)
 Add a data matrix $A_{i,j}$. More...
 
int SDPConeAddIdentity (SDPCone sdpcone, int blockj, int vari, int n, double val)
 Add a matrix $A_{i,j}$ that is a multiple of the identity matrix. More...
 
int SDPConeSetADenseVecMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, double val[], int nnz)
 Set a matrix $A_{i,j}$ in a dense format. More...
 
int SDPConeSetARankOneMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz)
 Set data matrix $A_{i,j}= alpha * v * v^T $ where v is a sparse vector. More...
 
int SDPConeSetASparseVecMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz)
 Set data matrix $A_{i,j}$ in a sparse format. More...
 
int SDPConeSetConstantMat (SDPCone sdpcone, int blockj, int vari, int n, double value)
 Set a matrix $A_{i,j}$ whose elements are all the same. More...
 
int SDPConeSetIdentity (SDPCone sdpcone, int blockj, int vari, int n, double val)
 Set a matrix $A_{i,j}$ to be a multiple of the identity matrix. More...
 
int SDPConeSetRIdentity (SDPCone sdpcone, int blockj, int n, double rr)
 Add identify matrix to dual matrix. More...
 
int SDPConeSetRMatrix (SDPCone, int, int, char, struct DSDPDataMat_Ops *, void *)
 Add identity to dual matrix. More...
 
int SDPConeSetZeroMat (SDPCone sdpcone, int blockj, int vari, int n)
 Set a matrix $A_{i,j}$ whose elements are all equal zero. More...
 

Detailed Description

Set sparse or dense matrices into the cone.

Definition in file dsdpadddatamat.c.

Function Documentation

int DSDPGetIdentityDataMatF ( int  n,
double  val,
struct DSDPDataMat_Ops **  dops,
void **  imat 
)

Create a sparse matrix usuable by DSDP in full symmetric format.

Parameters
nnumber of rows and columns of the matrix
valmultiple of identity matrix.
dopsaddress of a pointer to a table of function pointers
imataddress of a pointer to an opaque data type.

Definition at line 69 of file identity.c.

Referenced by SDPConeAddIdentity(), and SDPConeSetRIdentity().

int DSDPGetIdentityDataMatP ( int  n,
double  val,
struct DSDPDataMat_Ops **  dops,
void **  imat 
)

Create a sparse matrix usuable by DSDP in packed symmetric format.

Parameters
nnumber of rows and columns of the matrix
valmultiple of identity matrix.
dopsaddress of a pointer to a table of function pointers
imataddress of a pointer to an opaque data type.

Definition at line 44 of file identity.c.

Referenced by SDPConeAddIdentity(), and SDPConeSetRIdentity().

int DSDPGetR1PMat ( int  n,
double  ev,
int  ishift,
const int  spai[],
const double  spval[],
int  nnz,
struct DSDPDataMat_Ops **  mops,
void **  mmat 
)

Create a rank one matrix usuable by DSDP in packed symmetric format.

int DSDPGetR1PMat(int n, double ev, int ishift, const int spai[], const double spval[], int nnz, struct DSDPDataMat_Ops**mops, void**mmat)

Parameters
nnumber of rows and columns of the matrix
evmultiple of the outer product.
ishiftindex of first element in vector.
spaiarray of indices for vector.
spvalarray of vector values.
nnzsize of arrays.
mopsaddress of a pointer to a table of function pointers
mmataddress of a pointer to an opaque data type.

Definition at line 77 of file rmmat.c.

Referenced by SDPConeAddARankOneMat().

int DSDPGetR1UMat ( int  n,
double  ev,
int  ishift,
const int  spai[],
const double  spval[],
int  nnz,
struct DSDPDataMat_Ops **  mops,
void **  mmat 
)

Create a rank one matrix usuable by DSDP in full symmetric format.

int DSDPGetR1UMat(int n, double ev, int ishift, const int spai[], const double spval[], int nnz, struct DSDPDataMat_Ops**mops, void**mmat)

Parameters
nnumber of rows and columns of the matrix
evmultiple of the outer product.
ishiftindex of first element in vector.
spaiarray of indices for vector.
spvalarray of vector values.
nnzsize of arrays.
mopsaddress of a pointer to a table of function pointers
mmataddress of a pointer to an opaque data type.

Definition at line 101 of file rmmat.c.

Referenced by SDPConeAddARankOneMat().

int DSDPGetVechMat ( int  n,
int  ishift,
double  alpha,
const int  ind[],
const double  val[],
int  nnz,
struct DSDPDataMat_Ops **  sops,
void **  smat 
)

Given data in packed symmetric format, create a sparse matrix usuable by DSDP.

Parameters
nnumber of rows and columns of the matrix
ishiftthe index of the first element in the matrix (usually 0)
alphathe multiple of these matrix.
indarray of indices for matrix.
valarray of matrix values.
nnzsize of arrays.
sopsaddress of a pointer to a table of function pointers
smataddress of a pointer to an opaque data type.

Definition at line 460 of file vech.c.

Referenced by SDPConeAddASparseVecMat().

int DSDPGetVecUMat ( int  n,
int  ishift,
double  alpha,
const int  ind[],
const double  val[],
int  nnz,
struct DSDPDataMat_Ops **  sops,
void **  smat 
)

Given data in full symmetric format, create a sparse matrix usuable by DSDP.

Parameters
nnumber of rows and columns of the matrix
ishiftthe index of the first element in the matrix (usually 0)
alphathe multiple of these matrix.
indarray of matrix indices.
valarray of matrix values.
nnznumber of elements in array.
sopsaddress of a pointer to a table of function pointers
smataddress of a pointer to an opaque data type.

Definition at line 454 of file vechu.c.

Referenced by SDPConeAddASparseVecMat().

int DSDPSetDataMatZero ( DSDPDataMat A)

Make a data matrix a zero matrix.

Parameters
Adata matrix.

Definition at line 537 of file dsdpadddatamat.c.

Referenced by DSDPBlockRemoveDataMatrix().

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

Add identify matrix to dual matrix.

Parameters
sdpconeSDP cone
blockjblock number j from 0 to nblocks
ndimension of the matrix
rrmultiple of identity matrix.

Definition at line 438 of file dsdpadddatamat.c.

Referenced by SDPConeSetup().

int SDPConeSetRMatrix ( SDPCone  sdpcone,
int  blockj,
int  n,
char  format,
struct DSDPDataMat_Ops dsdpdataops,
void *  data 
)

Add identity to dual matrix.

Parameters
sdpconeSDP cone
blockjblock number j from 0 to nblocks
ndimension of the matrix
formatstorage format 'P' (default) or 'U'
dataaddress of a structure ( cast to void* ) with matrix data.
dsdpdataopsaddress of a structure of function pointers that operate on the matrix data
See also
SDPConeSetASparseVecMat()
SDPConeSetStorageFormat()
SDPConeSetBlockSize()
SDPConeCheckData()

Definition at line 181 of file dsdpadddata.c.

Referenced by SDPConeSetRIdentity().