Untitled

 avatar
unknown
plain_text
2 years ago
713 B
5
Indexable
void succ(node_t* p, node_list_t* h, int m, int n, double** a, double* b, double* c, int k, double ak, double bk, double* zp, double* x) {
    //set h
    node_t* q = extend(p, m, n, a, b, c, k, ak, bk);
    if(q == NULL) {
        return;
    }
    q->z = simplex(q->m, q->n, q->a, q->b, q->c, q->x, 0);
    if(isfinite(q->z)){
        if(integer(q)){
            bound(q, h, zp, x);
        } else if (branch(q, *zp)) {
            if(h->first == NULL) {
                h->last = q;
                h->first = q;
            } else {
                h->last->next = q;
                h->last = q;
            }
            //add q to h
            return;
        }
    }
    free(q);
}
Editor is loading...