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.
 
int DSDPGetIdentityDataMatP (int, double, struct DSDPDataMat_Ops **, void **)
 Create a sparse matrix usuable by DSDP in packed symmetric format.
 
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.
 
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.
 
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.
 
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.
 
int DSDPSetDataMatZero (DSDPDataMat *A)
 Make a data matrix a zero matrix.
 
int SDPConeSetRIdentity (SDPCone sdpcone, int blockj, int n, double rr)
 Add identify matrix to dual matrix.
 
int SDPConeSetRMatrix (SDPCone, int, int, char, struct DSDPDataMat_Ops *, void *)
 Add identity to dual matrix.
 

Detailed Description

Set sparse or dense matrices into the cone.

Definition in file dsdpadddatamat.c.

Function Documentation

◆ DSDPGetIdentityDataMatF()

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 SDPConeSetRIdentity().

◆ DSDPGetIdentityDataMatP()

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 SDPConeSetRIdentity().

◆ DSDPGetR1PMat()

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.

◆ DSDPGetR1UMat()

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.

◆ DSDPGetVechMat()

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.

◆ DSDPGetVecUMat()

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.

◆ DSDPSetDataMatZero()

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().

◆ SDPConeSetRIdentity()

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().

◆ SDPConeSetRMatrix()

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().