Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
709 B
3
Indexable
Never
int branch(node_t* q, double z) {
    double min, max;
    if(q->z < z) {
        return 0;
    }
    int h;
    for(h = 0; h < q->n; h++) {
        if(!is_integer(&q->x[h])) {
            if(q->min[h] = -HUGE_VAL) {
                min = 0;
            } else {
                min = q->min[h];
            }
            max = q->max[h];
            if(((int)q->x[h]) < min || ((int)(q->x[h]+1)) > max){
                continue;
            }
            q->h = h;
            q->xh = q->x[h];
            freeMatrix(q->a, q->m);
            free(q->a);
            free(q->b);
            free(q->c);
            free(q->x);
            return 1;
        }
    }
    return 0;
}