32 #include <MboExport.h>
146 void *ctx, MboVec x);
MBO_EXPORT MBO_STATUS mboVecGetViewR(MboVec v, struct MboAmplitude **array)
Obtain a read-only view of vector data.
MBO_EXPORT MBO_STATUS mboVecSet(struct MboAmplitude *a, MboVec x)
set vector to a constant
MBO_EXPORT MBO_STATUS mboVecSwap(MboVec x, MboVec y)
swap contents of two vectors.
MBO_EXPORT MboGlobInd mboVecDim(MboVec v)
Get dimension of vector.
Error codes used by the MBO library.
MBO_EXPORT MBO_STATUS mboVecSetRandom(MboVec x)
Fill a vector with random numbers.
MBO_EXPORT MBO_STATUS mboVecDestroy(MboVec *v)
Release all resources of a MboVec.
MBO_EXPORT MBO_STATUS mboVecDuplicate(MboVec x, MboVec *y)
Duplicate a vector.
MBO_EXPORT MBO_STATUS mboVecReleaseView(MboVec v, struct MboAmplitude **array)
Release a view of the vector data.
Minimal complex numbers.
Definition: MboAmplitude.h:37
MBO_EXPORT MBO_STATUS mboVecDot(MboVec x, MboVec y, struct MboAmplitude *result)
computes the dot product of two vectors
MBO_STATUS
Error codes used by the MBO library.
Definition: MboErrors.h:33
MBO_EXPORT MBO_STATUS mboVecCreate(MboGlobInd dim, MboVec *v)
Create MboVec of dimension dim.
MBO_EXPORT int mboVecCheck(MboVec v)
Check integrity of MboVec.
MBO_EXPORT MBO_STATUS mboVecAXPY(struct MboAmplitude *a, MboVec x, MboVec y)
y <- a * x + y
MBO_EXPORT MBO_STATUS mboVecUnitVector(MboGlobInd n, MboVec v)
Fill vector with nth unit vector Sets the nth entry in the vector to 1 and all other entries to zero...
long long MboGlobInd
Global indices.
Definition: MboIndices.h:34
struct MboVec_t * MboVec
Data type for representing vectors.
Definition: MboVec.h:43
int MboLocInd
Local indices.
Definition: MboIndices.h:31
Integer types for indices used in mbo library.
MBO_EXPORT MBO_STATUS mboVecGetViewRW(MboVec v, struct MboAmplitude **array)
Obtain a read-write view of the vector data.
MBO_EXPORT MBO_STATUS mboVecKron(int n, MboLocInd *dims, struct MboAmplitude **vecs, MboVec x)
Add outer product of vectors.
MBO_EXPORT MBO_STATUS mboVecMap(int n, MboLocInd *dims, void f(int, MboLocInd *, MboLocInd *, void *, struct MboAmplitude *), void *ctx, MboVec x)
Apply a function to every entry in a vector.