10 #ifndef REALAVECTOR_H_ 11 #define REALAVECTOR_H_ 241 return (v->
v[i] += x);
real addentry_realavector(prealavector v, uint i, real x)
Add to a vector entry, .
Definition: realavector.h:236
Definition: realavector.h:48
prealavector new_realavector(uint dim)
Create a new realavector object.
void copy_realavector(pcrealavector v, prealavector w)
Copy a vector into another vector, .
prealavector init_pointer_realavector(prealavector v, preal src, uint dim)
Initialize an realavector object using a given array for the coefficients.
void scale_realavector(real alpha, prealavector v)
Scale a vector by a factor , .
unsigned uint
Unsigned integer type.
Definition: settings.h:70
void clear_realavector(prealavector v)
Set a vector to zero.
prealavector init_realavector(prealavector v, uint dim)
Initialize an realavector object.
void random_realavector(prealavector v)
Fill a vector with random values.
void fill_realavector(prealavector v, real x)
Set all coefficients in a vector to the same value.
void add_realavector(real alpha, pcrealavector x, prealavector y)
Add two vectors, .
uint dim
Vector dimension.
Definition: realavector.h:53
#define INLINE_PREFIX
Prefix for inline functions.
Definition: settings.h:36
realavector * prealavector
Definition: realavector.h:42
void uninit_realavector(prealavector v)
Uninitialize an realavector object.
void shrink_realavector(prealavector v, uint dim)
Reduce the dimension of an realavector object without reallocating storage, preserving its coefficien...
void del_realavector(prealavector v)
Delete an realavector object.
prealavector new_sub_realavector(prealavector src, uint dim, uint off)
Create a new realavector object representing a subvector.
prealavector new_pointer_realavector(preal src, uint dim)
Create a new realavector object using a given array for the coefficients.
void copy_sub_realavector(pcrealavector v, prealavector w)
Copy a vector into another vector, .
void print_realavector(pcrealavector v)
Print a vector.
uint getactives_realavector()
Get number of currently initialized realavector objects.
void resize_realavector(prealavector v, uint dim)
Change the dimension of an realavector object without preserving its coefficients.
prealavector init_sub_realavector(prealavector v, prealavector src, uint dim, uint off)
Initialize an realavector object to represent a subvector.
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
const realavector * pcrealavector
Definition: realavector.h:45
real * preal
Pointer to real array.
Definition: settings.h:145
size_t getsize_realavector(pcrealavector v)
Get size of a given realavector object.
size_t getsize_heap_realavector(pcrealavector v)
Get heap size of a given realavector object.
real dotprod_realavector(pcrealavector x, pcrealavector y)
Compute the Euclidean innner product of two vectors and .
real norm2_realavector(pcrealavector v)
Compute the Euclidean norm of a vector .
real getentry_realavector(pcrealavector v, uint i)
Read a vector entry .
Definition: realavector.h:210
real * v
Vector coefficients.
Definition: realavector.h:50
void * owner
Points to owner of coefficient storage if this is a subvector.
Definition: realavector.h:56
void setentry_realavector(prealavector v, uint i, real x)
Set a vector entry, .
Definition: realavector.h:222