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

extern

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

Parameters

  n | number of rows and columns of the matrix
  val | multiple of identity matrix.
  dops | address of a pointer to a table of function pointers
  imat | address 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
| ) |  |

extern

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

Parameters

  n | number of rows and columns of the matrix
  val | multiple of identity matrix.
  dops | address of a pointer to a table of function pointers
  imat | address 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
| ) |  |

extern

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

  n | number of rows and columns of the matrix
  ev | multiple of the outer product.
  ishift | index of first element in vector.
  spai | array of indices for vector.
  spval | array of vector values.
  nnz | size of arrays.
  mops | address of a pointer to a table of function pointers
  mmat | address 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
| ) |  |

extern

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

  n | number of rows and columns of the matrix
  ev | multiple of the outer product.
  ishift | index of first element in vector.
  spai | array of indices for vector.
  spval | array of vector values.
  nnz | size of arrays.
  mops | address of a pointer to a table of function pointers
  mmat | address 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
| ) |  |

extern

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

Parameters

  n | number of rows and columns of the matrix
  ishift | the index of the first element in the matrix (usually 0)
  alpha | the multiple of these matrix.
  ind | array of indices for matrix.
  val | array of matrix values.
  nnz | size of arrays.
  sops | address of a pointer to a table of function pointers
  smat | address 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
| ) |  |

extern

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

Parameters

  n | number of rows and columns of the matrix
  ishift | the index of the first element in the matrix (usually 0)
  alpha | the multiple of these matrix.
  ind | array of matrix indices.
  val | array of matrix values.
  nnz | number of elements in array.
  sops | address of a pointer to a table of function pointers
  smat | address 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

  A | data 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

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

## SDPConeSetRMatrix()

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

extern

Add identity to dual matrix.

Parameters

  sdpcone | SDP cone
  blockj | block number j from 0 to nblocks
  n | dimension of the matrix
  format | storage format 'P' (default) or 'U'
  data | address of a structure ( cast to `void*` ) with matrix data.
  dsdpdataops | address 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().