44 while(f_diff > s->
eps)
77 alpha_pow2 = alpha*alpha;
78 theta = q - alpha_pow2;
79 alpha_new = 0.5 * (theta + sqrt((theta*theta) + 4.0*alpha_pow2));
80 beta = (alpha*(1.0-alpha)) / (alpha_pow2 + alpha_new);
93 f_diff =
abs_2(fnew - f);
void vector_add(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
void free_pointer(real_t *pointer)
real_t abs_2(const real_t a)
real_t obj(const real_t *z, const real_t *H, const real_t *c, real_t *temp)
void vector_min(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
void clean_up_FGM_C(struct Struct_FGM *s)
void vector_sub(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
uint32_t FGM(struct Struct_FGM *s)
void vector_copy(const real_t *v1, real_t *v2, const uint32_t length)
void vector_scalar_mul(const real_t *v1, const real_t scalar, real_t *res, const uint32_t length)
void mtx_vec_mul(const real_t *mtx, const real_t *v, real_t *res, const uint32_t rows, const uint32_t cols)
void vector_max(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)