sdpconevec.h
Go to the documentation of this file.
#if !defined(__SDPCONE_VECTORS_H)
#define __SDPCONE_VECTORS_H
#include <math.h>
struct SDPConeVec_C{
int dim;
double *val;
};
typedef struct {
int *indx;
} DSDPIndex;
typedef struct SDPConeVec_C SDPConeVec;
#ifdef __cplusplus
extern "C" {
#endif
extern int SDPConeVecCreate(int,SDPConeVec *);
extern int SDPConeVecDuplicate(SDPConeVec,SDPConeVec *);
extern int SDPConeVecDot(SDPConeVec, SDPConeVec, double *);
extern int SDPConeVecView( SDPConeVec);
extern int SDPConeVecDestroy(SDPConeVec*);
#define SDPConeVecCreateWArray(a,b,c) 0;{ (*(a)).val=(b); (*(a)).dim=(c);}
extern int SDPConeVecSet(double, SDPConeVec );
extern int SDPConeVecZero(SDPConeVec );
extern int SDPConeVecNormalize(SDPConeVec );
extern int SDPConeVecAXPY(double, SDPConeVec, SDPConeVec);
extern int SDPConeVecNorm2( SDPConeVec, double *);
extern int SDPConeVecCopy( SDPConeVec, SDPConeVec);
extern int SDPConeVecScale(double, SDPConeVec);
#define SDPConeVecGetArray(a,b) 0;{ *(b)=((a).val); }
#define SDPConeVecRestoreArray(a,b) 0;{ *(b)=0;}
#define SDPConeVecGetSize(a,b) 0;{ *(b)=((a).dim); }
extern int DSDPIndexInitialize(DSDPIndex*);
extern int DSDPIndexDestroy(DSDPIndex*);
extern int DSDPIndexSetBasis(DSDPIndex, int);
extern int DSDPIndexCreate(int,DSDPIndex*);
extern int DSDPIndexView(DSDPIndex);
#ifdef __cplusplus
}
#endif
#endif
SDPConeVecView
int SDPConeVecView(SDPConeVec)
Print the elements of the vector.
Definition sdpconevec.c:49
DSDPIndexView
int DSDPIndexView(DSDPIndex)
Print indices.
Definition sdpconevec.c:279
SDPConeVecNormalize
int SDPConeVecNormalize(SDPConeVec)
Scale the vector to norm of 1.
Definition sdpconevec.c:84
SDPConeVecDot
int SDPConeVecDot(SDPConeVec, SDPConeVec, double *)
Inner product of two vectors.
Definition sdpconevec.c:125
SDPConeVecZero
int SDPConeVecZero(SDPConeVec)
Zero the elements of the vector.
Definition sdpconevec.c:67
SDPConeVecSet
int SDPConeVecSet(double, SDPConeVec)
Set each element of vector to this number.
Definition sdpconevec.c:211
SDPConeVecAXPY
int SDPConeVecAXPY(double, SDPConeVec, SDPConeVec)
Add a multiple of X to Y.
Definition sdpconevec.c:178
SDPConeVecScale
int SDPConeVecScale(double, SDPConeVec)
Compute the Euclidean norm.
Definition sdpconevec.c:161
DSDPIndexInitialize
int DSDPIndexInitialize(DSDPIndex *)
Identifies sparsity in SDPConeVec.
Definition sdpconevec.c:234
DSDPIndexCreate
int DSDPIndexCreate(int, DSDPIndex *)
Allocate array for indices.
Definition sdpconevec.c:248
DSDPIndexDestroy
int DSDPIndexDestroy(DSDPIndex *)
Deallocate memory.
Definition sdpconevec.c:264
SDPConeVecNorm2
int SDPConeVecNorm2(SDPConeVec, double *)
Compute the Euclidean norm.
Definition sdpconevec.c:143
SDPConeVecCopy
int SDPConeVecCopy(SDPConeVec, SDPConeVec)
Copy v1 to v2.
Definition sdpconevec.c:103
SDPConeVecDuplicate
int SDPConeVecDuplicate(SDPConeVec, SDPConeVec *)
Allocate another vector with the same structure as the first.
Definition sdpconevec.c:195
SDPConeVec_C
Vector whose length corresponds to dimension of a block in a cone.
Definition sdpconevec.h:13