QPALM
A proximal augmented Lagrangian method for QPs.
|
Linear algebra with vectors. More...
Go to the source code of this file.
Functions | |
Vector functions | |
c_float * | vec_copy (const c_float *a, size_t n) |
Copy vector a into output. More... | |
void | prea_vec_copy (const c_float *a, c_float *b, size_t n) |
Copy vector a into preallocated vector b. More... | |
void | prea_int_vec_copy (const c_int *a, c_int *b, size_t n) |
Copy integer vector a into preallocated vector b. More... | |
void | vec_set_scalar (c_float *a, c_float sc, size_t n) |
Fill float vector with a scalar value. More... | |
void | vec_set_scalar_int (c_int *a, c_int sc, size_t n) |
Fill int vector with a scalar value. More... | |
void | vec_self_mult_scalar (c_float *a, c_float sc, size_t n) |
Mulitply vector with a constant scale factor. More... | |
void | vec_mult_scalar (const c_float *a, c_float sc, c_float *b, size_t n) |
Mulitply vector with a constant scale factor and store in a different vector. More... | |
c_float | vec_prod (const c_float *a, const c_float *b, size_t n) |
Inner product between two vectors, ![]() | |
c_float | vec_norm_two (const c_float *a, size_t n) |
2-norm of a vector, ![]() | |
c_float | vec_norm_inf (const c_float *a, size_t n) |
Infinity norm of a vector, ![]() | |
void | vec_add_scaled (const c_float *a, const c_float *b, c_float *c, c_float sc, size_t n) |
Scaled addition of one vector to another vector, ![]() | |
void | vec_mult_add_scaled (c_float *a, const c_float *b, c_float sc1, c_float sc2, size_t n) |
Scaled addition of one vector to another vector, both being scaled, ![]() | |
void | vec_ew_recipr (const c_float *a, c_float *b, size_t n) |
Elementwise reciprocal ![]() | |
void | vec_ew_max_vec (const c_float *a, const c_float *b, c_float *c, size_t n) |
Elementwise maximum between vectors, ![]() | |
void | vec_ew_min_vec (const c_float *a, const c_float *b, c_float *c, size_t n) |
Elementwise minimum between vectors, ![]() | |
void | vec_ew_mid_vec (const c_float *a, const c_float *bmin, const c_float *bmax, c_float *c, size_t n) |
Elementwise mid between vectors, ![]() | |
void | vec_ew_prod (const c_float *a, const c_float *b, c_float *c, size_t n) |
Elementwise product, ![]() | |
void | vec_ew_div (const c_float *a, const c_float *b, c_float *c, size_t n) |
Elementwise division, ![]() | |
void | vec_ew_sqrt (const c_float *a, c_float *b, size_t n) |
Elementwise square root, ![]() | |
Linear algebra with vectors.
Common operations, such as vector products, infinity norm, elementwise add/product/division/max etc. are included in this file.
Copy integer vector a into preallocated vector b.
a | Input vector |
b | Output vector |
n | Vector length |
Copy vector a into preallocated vector b.
a | Input vector |
b | Output vector |
n | Vector length |
Scaled addition of one vector to another vector, .
a | Input vector |
b | Input vector |
c | Output vector |
sc | Scaling value |
n | Vector length |
Copy vector a into output.
a | Vector |
n | Vector length |
Elementwise division, .
a | Input vector |
b | Input vector |
c | Output vector |
n | Vector length |
Elementwise maximum between vectors, .
a | Input vector |
b | Input vector |
c | Output vector |
n | Vector length |
void vec_ew_mid_vec | ( | const c_float * | a, |
const c_float * | bmin, | ||
const c_float * | bmax, | ||
c_float * | c, | ||
size_t | n | ||
) |
Elementwise mid between vectors, .
a | Input vector |
bmin | Lower bounds |
bmax | Upper bounds |
c | Output vector |
n | Vector length |
Elementwise minimum between vectors, .
a | Input vector |
b | Input vector |
c | Output vector |
n | Vector length |
Elementwise product, .
a | Input vector |
b | Input vector |
c | Output vector |
n | Vector length |
Elementwise reciprocal .
This function is used in scaling.
a | Input vector |
b | Output vector |
n | Vector length |
Elementwise square root, .
a | Input vector |
b | Output vector |
n | Vector length |
Scaled addition of one vector to another vector, both being scaled, .
a | Input and Output vector |
b | Input vector |
sc1 | Scaling value for a |
sc2 | Scaling value for b |
n | Vector length |
Mulitply vector with a constant scale factor and store in a different vector.
a | Input vector |
sc | Value |
b | Output vector |
n | Vector length |
Infinity norm of a vector, .
a | Vector |
n | Vector length |
2-norm of a vector, .
a | Vector |
n | Vector length |
Inner product between two vectors, .
a | Vector |
b | Vector |
n | Vector length |
Mulitply vector with a constant scale factor.
a | Vector |
sc | Value |
n | Vector length |
Fill float vector with a scalar value.
a | Vector |
sc | Value |
n | Vector length |