Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
371 B
2
Indexable
Never
int m = s->m;
    int n = s->n;
    int i;
    for(i = m + n; i > n; i -= 1) {
        s->var[i] = s->var[i-1];
    }
    s->var[n] = m + n;
    n = n + 1;
    for(i = 0; i < m; i += 1) {
        s->a[i][n-1] = -1;
    }
    s->x = calloc(m + n, sizeof(double));
    s->c = calloc(n, sizeof(double));
    s->c[n-1] = -1;
    s->n = n;
    pivot(s, k, n-1);