DSDP
Functions
sdpconevec.c File Reference

Implementation of the SDPCone vector operations. More...

Go to the source code of this file.

Functions

int DSDPIndexCreate (int n, DSDPIndex *IS)
 Allocate array for indices.
 
int DSDPIndexDestroy (DSDPIndex *IS)
 Deallocate memory.
 
int DSDPIndexInitialize (DSDPIndex *IS)
 Set structure pointers to 0.
 
int DSDPIndexView (DSDPIndex IS)
 Print indices.
 
int SDPConeVecAXPY (double alpha, SDPConeVec x, SDPConeVec y)
 Add a multiple of X to Y.
 
int SDPConeVecCopy (SDPConeVec v1, SDPConeVec v2)
 Copy v1 to v2.
 
int SDPConeVecDot (SDPConeVec V1, SDPConeVec V2, double *ans)
 Inner product of two vectors.
 
int SDPConeVecDuplicate (SDPConeVec V1, SDPConeVec *V2)
 Allocate another vector with the same structure as the first.
 
int SDPConeVecNorm2 (SDPConeVec VV, double *vnorm)
 Compute the Euclidean norm.
 
int SDPConeVecNormalize (SDPConeVec V)
 Scale the vector to norm of 1.
 
int SDPConeVecScale (double alpha, SDPConeVec VV)
 Compute the Euclidean norm.
 
int SDPConeVecSet (double alpha, SDPConeVec V)
 Set each element of vector to this number.
 
int SDPConeVecView (SDPConeVec V)
 Print the elements of the vector.
 
int SDPConeVecZero (SDPConeVec V)
 Zero the elements of the vector.
 

Detailed Description

Implementation of the SDPCone vector operations.

Definition in file sdpconevec.c.

Function Documentation

◆ DSDPIndexCreate()

int DSDPIndexCreate ( int  n,
DSDPIndex *  IS 
)

Allocate array for indices.

Parameters
ndimension of block or vector associated with it.
ISindices

Definition at line 248 of file sdpconevec.c.

Referenced by DSDPBlockSetup().

◆ DSDPIndexDestroy()

int DSDPIndexDestroy ( DSDPIndex *  IS)

Deallocate memory.

Parameters
ISindices

Definition at line 264 of file sdpconevec.c.

Referenced by DSDPBlockTakeDown().

◆ DSDPIndexInitialize()

int DSDPIndexInitialize ( DSDPIndex *  IS)

Set structure pointers to 0.

Identifies sparsity in SDPConeVec.

Parameters
ISindices

Definition at line 234 of file sdpconevec.c.

Referenced by DSDPBlockInitialize().

◆ DSDPIndexView()

int DSDPIndexView ( DSDPIndex  IS)

Print indices.

Parameters
ISindices

Definition at line 279 of file sdpconevec.c.

◆ SDPConeVecAXPY()

int SDPConeVecAXPY ( double  alpha,
SDPConeVec  x,
SDPConeVec  y 
)

Add a multiple of X to Y.

Parameters
alphascalar
xa vec
ya vec

Definition at line 178 of file sdpconevec.c.

◆ SDPConeVecCopy()

int SDPConeVecCopy ( SDPConeVec  v1,
SDPConeVec  v2 
)

Copy v1 to v2.

Parameters
v1source
v2destination

Definition at line 103 of file sdpconevec.c.

◆ SDPConeVecDot()

int SDPConeVecDot ( SDPConeVec  V1,
SDPConeVec  V2,
double *  ans 
)

Inner product of two vectors.

Parameters
V1a vec
V2a vec
ansthe inner product

Definition at line 125 of file sdpconevec.c.

Referenced by DSDPDataMatCheck(), SDPConeComputeHessian(), and SDPConeComputeRHS().

◆ SDPConeVecDuplicate()

int SDPConeVecDuplicate ( SDPConeVec  V1,
SDPConeVec V2 
)

Allocate another vector with the same structure as the first.

Parameters
V1source vector
V2new vector

Definition at line 195 of file sdpconevec.c.

Referenced by DSDPBlockSetup(), DSDPFastLanczosSetup(), and DSDPRobustLanczosSetup().

◆ SDPConeVecNorm2()

int SDPConeVecNorm2 ( SDPConeVec  VV,
double *  vnorm 
)

Compute the Euclidean norm.

Parameters
VVa vec
vnormits norm

Definition at line 143 of file sdpconevec.c.

Referenced by SDPConeVecNormalize().

◆ SDPConeVecNormalize()

int SDPConeVecNormalize ( SDPConeVec  V)

Scale the vector to norm of 1.

Parameters
Vthe vector

Definition at line 84 of file sdpconevec.c.

◆ SDPConeVecScale()

int SDPConeVecScale ( double  alpha,
SDPConeVec  VV 
)

Compute the Euclidean norm.

Parameters
alphascalar.
VVa vec

Definition at line 161 of file sdpconevec.c.

Referenced by SDPConeVecNormalize().

◆ SDPConeVecSet()

int SDPConeVecSet ( double  alpha,
SDPConeVec  V 
)

Set each element of vector to this number.

Parameters
alphascalar.
Va vec

Definition at line 211 of file sdpconevec.c.

Referenced by DSDPVMatCheck().

◆ SDPConeVecView()

int SDPConeVecView ( SDPConeVec  V)

Print the elements of the vector.

Parameters
Vthe vector

Definition at line 49 of file sdpconevec.c.

◆ SDPConeVecZero()

int SDPConeVecZero ( SDPConeVec  V)

Zero the elements of the vector.

Parameters
Vthe vector

Definition at line 67 of file sdpconevec.c.