DSDP
|
Methods of a Schur Matrix. More...
Go to the source code of this file.
Data Structures | |
struct | DSDPSchurMat_C |
Schur complement matrix whose solution is the Newton direction. More... | |
Typedefs | |
typedef struct DSDPSchurMat_C | DSDPSchurMat |
This object represents the Schur Matrix. Its structure is opaque to the DSDP solver, but it must implement the interface below and provide a structure of function pointers. More... | |
Functions | |
int | DSDPSchurMatAddDiagonal (DSDPSchurMat, DSDPVec) |
Add elements to a row of the Schur matrix. More... | |
int | DSDPSchurMatAddDiagonalElement (DSDPSchurMat, int, double) |
Determine with the cone should compute this diagonal element of M and RHS. More... | |
int | DSDPSchurMatAddR (DSDPSchurMat, int, double) |
Add an element to the Schur matrix correponding the variable r. More... | |
int | DSDPSchurMatAddRow (DSDPSchurMat, int, double, DSDPVec) |
Add elements to a row of the Schur matrix. More... | |
int | DSDPSchurMatAssemble (DSDPSchurMat) |
Final assembly of M. More... | |
int | DSDPSchurMatDestroy (DSDPSchurMat *) |
Free the memory in the data structure. More... | |
int | DSDPSchurMatDiagonalScaling (DSDPSchurMat, DSDPVec) |
Get the scaling and nonzero pattern of each diagonal element of the matrix. More... | |
int | DSDPSchurMatFactor (DSDPSchurMat, DSDPTruth *) |
Factor M. More... | |
int | DSDPSchurMatInitialize (DSDPSchurMat *) |
Initialize pointers to null. More... | |
int | DSDPSchurMatInParallel (DSDPSchurMat, DSDPTruth *) |
Determine whether M is computed in parallel. More... | |
int | DSDPSchurMatMultiply (DSDPSchurMat, DSDPVec, DSDPVec) |
Multiply M by a vector. y = M x. More... | |
int | DSDPSchurMatReducePVec (DSDPSchurMat, DSDPVec) |
Collect elements of the vector. More... | |
int | DSDPSchurMatRowColumnScaling (DSDPSchurMat, int, DSDPVec, int *) |
Get the scaling and nonzero pattern of each column in this row of the matrix. More... | |
int | DSDPSchurMatRowScaling (DSDPSchurMat, DSDPVec) |
Identify which rows on on this processor. More... | |
int | DSDPSchurMatSetR (DSDPSchurMat, double) |
Set up the data structure. More... | |
int | DSDPSchurMatSetup (DSDPSchurMat, DSDPVec) |
Set up the data structure. More... | |
int | DSDPSchurMatShiftDiagonal (DSDPSchurMat, double) |
Add a scalar to each diagonal element of the matrix. More... | |
int | DSDPSchurMatSolve (DSDPSchurMat, DSDPVec, DSDPVec) |
Solve the linear system. More... | |
int | DSDPSchurMatVariableCompute (DSDPSchurMat, int, double *) |
Determine with the cone should compute this diagonal element of M and RHS. More... | |
int | DSDPSchurMatVariableComputeR (DSDPSchurMat, double *) |
Add an element to the Schur matrix correponding the variable r. More... | |
int | DSDPSchurMatView (DSDPSchurMat) |
Print the matrix. More... | |
int | DSDPSchurMatZeroEntries (DSDPSchurMat) |
Zero all element in the matrix. More... | |
Methods of a Schur Matrix.
Definition in file dsdpschurmat.h.
struct DSDPSchurMat_C DSDPSchurMat |
This object represents the Schur Matrix. Its structure is opaque to the DSDP solver, but it must implement the interface below and provide a structure of function pointers.
Definition at line 49 of file dsdpschurmat.h.
int DSDPSchurMatAddDiagonal | ( | DSDPSchurMat | M, |
DSDPVec | D | ||
) |
Add elements to a row of the Schur matrix.
M | matrix |
D | diagonal elements. |
Conic object call this routine when evaluating the Hessian of the barrier term.
Definition at line 272 of file dsdpschurmatadd.c.
int DSDPSchurMatAddDiagonalElement | ( | DSDPSchurMat | M, |
int | row, | ||
double | dd | ||
) |
Determine with the cone should compute this diagonal element of M and RHS.
M | matrix |
row | correponding the y variable |
dd | zero or one.. |
Definition at line 157 of file dsdpschurmatadd.c.
int DSDPSchurMatAddR | ( | DSDPSchurMat | M, |
int | row, | ||
double | dd | ||
) |
Add an element to the Schur matrix correponding the variable r.
M | matrix |
row | corresponding to variable y. |
dd | element |
Definition at line 198 of file dsdpschurmatadd.c.
int DSDPSchurMatAddRow | ( | DSDPSchurMat | M, |
int | row, | ||
double | alpha, | ||
DSDPVec | R | ||
) |
Add elements to a row of the Schur matrix.
M | matrix |
row | correponding to variable y |
alpha | multiply elements in R by this scalar. |
R | a row of elements. |
Conic object call this routine when evaluating the Hessian of the barrier term. This routine is to be used with DSDPSchurMatRowColumnScaling().
Definition at line 76 of file dsdpschurmatadd.c.
Referenced by DSDPAddSchurRow().
int DSDPSchurMatAssemble | ( | DSDPSchurMat | M | ) |
Final assembly of M.
M | matrix |
Important in parallel implementation.
Definition at line 174 of file dsdpschurmat.c.
int DSDPSchurMatDestroy | ( | DSDPSchurMat * | M | ) |
Free the memory in the data structure.
M | matrix |
Definition at line 414 of file dsdpschurmat.c.
int DSDPSchurMatDiagonalScaling | ( | DSDPSchurMat | M, |
DSDPVec | D | ||
) |
Get the scaling and nonzero pattern of each diagonal element of the matrix.
M | matrix |
D | multply each element of the diagonal by this quantity. |
Conic object call this routine when evaluating the Hessian of the barrier term. The elements will be a 0 or a 1. Important for parallel version.
Definition at line 235 of file dsdpschurmatadd.c.
Referenced by DSDPSchurMatRowScaling().
int DSDPSchurMatFactor | ( | DSDPSchurMat | M, |
DSDPTruth * | successful | ||
) |
Factor M.
M | matrix |
successful | false if factorization failed. |
Definition at line 196 of file dsdpschurmat.c.
Referenced by DSDPComputeDualStepDirections().
int DSDPSchurMatInitialize | ( | DSDPSchurMat * | M | ) |
Initialize pointers to null.
M | Schur matrix object |
Definition at line 79 of file dsdpschurmat.c.
int DSDPSchurMatInParallel | ( | DSDPSchurMat | M, |
DSDPTruth * | flag | ||
) |
Determine whether M is computed in parallel.
M | matrix |
flag | true or false |
Important in parallel implementation.
Definition at line 149 of file dsdpschurmat.c.
Referenced by DSDPSchurMatReducePVec(), and DSDPSchurMatVariableCompute().
int DSDPSchurMatMultiply | ( | DSDPSchurMat | M, |
DSDPVec | x, | ||
DSDPVec | y | ||
) |
Multiply M by a vector. y = M x.
M | matrix |
x | in vector. |
y | product. |
Definition at line 231 of file dsdpschurmat.c.
int DSDPSchurMatReducePVec | ( | DSDPSchurMat | M, |
DSDPVec | x | ||
) |
Collect elements of the vector.
M | matrix |
x | vector. |
Important in parallel implementation. Otherwise does nothing.
Definition at line 307 of file dsdpschurmat.c.
int DSDPSchurMatRowColumnScaling | ( | DSDPSchurMat | M, |
int | row, | ||
DSDPVec | V, | ||
int * | nzcols | ||
) |
Get the scaling and nonzero pattern of each column in this row of the matrix.
M | matrix |
row | correponding to variable y |
V | multply each element of the row by this quantity. |
nzcols | how many nonzeros. Check for a 0! Conic object call this routine when evaluating the Hessian of the barrier term. The vector V identifies sparsity, whether its using upper or lower half of Schur, and also used to distribute rows over processros The elements will be a 0 or a 1. This routine is to be used with DSDPSchurMatAddRow(). |
Definition at line 33 of file dsdpschurmatadd.c.
int DSDPSchurMatRowScaling | ( | DSDPSchurMat | M, |
DSDPVec | D | ||
) |
Identify which rows on on this processor.
M | matrix |
D | Variables marked with 0 or 1. |
Definition at line 399 of file dsdpschurmat.c.
int DSDPSchurMatSetR | ( | DSDPSchurMat | M, |
double | rr | ||
) |
Set up the data structure.
M | matrix |
rr | residual |
Definition at line 338 of file dsdpschurmat.c.
int DSDPSchurMatSetup | ( | DSDPSchurMat | M, |
DSDPVec | Y | ||
) |
Set up the data structure.
M | matrix |
Y | variable vector. |
Definition at line 352 of file dsdpschurmat.c.
int DSDPSchurMatShiftDiagonal | ( | DSDPSchurMat | M, |
double | dd | ||
) |
Add a scalar to each diagonal element of the matrix.
M | matrix |
dd | diagonal shift |
Definition at line 120 of file dsdpschurmat.c.
Referenced by DSDPComputeDualStepDirections().
int DSDPSchurMatSolve | ( | DSDPSchurMat | M, |
DSDPVec | b, | ||
DSDPVec | x | ||
) |
Solve the linear system.
M | matrix |
b | the right-hand side |
x | solution |
Definition at line 466 of file dsdpschurmat.c.
int DSDPSchurMatVariableCompute | ( | DSDPSchurMat | M, |
int | row, | ||
double * | rcv | ||
) |
Determine with the cone should compute this diagonal element of M and RHS.
M | matrix |
row | correponding the y variable |
rcv | Used to evaluate M. Important in parallel implementation. |
Definition at line 120 of file dsdpschurmatadd.c.
Referenced by DSDPObjectiveGH().
int DSDPSchurMatVariableComputeR | ( | DSDPSchurMat | M, |
double * | rcv | ||
) |
Add an element to the Schur matrix correponding the variable r.
M | matrix |
*rcv | zero or one |
Definition at line 181 of file dsdpschurmatadd.c.
int DSDPSchurMatView | ( | DSDPSchurMat | M | ) |
Print the matrix.
M | matrix |
Definition at line 376 of file dsdpschurmat.c.
Referenced by DSDPComputeDualStepDirections().
int DSDPSchurMatZeroEntries | ( | DSDPSchurMat | M | ) |