Method: FastMatrix::Matrix::LUPDecomposition#pivots
- Defined in:
- ext/fast_matrix/LUPDecomposition/lup.c
#pivots ⇒ Object
86 87 88 89 90 91 92 93 94 95 |
# File 'ext/fast_matrix/LUPDecomposition/lup.c', line 86 VALUE lup_pivots(VALUE self) { struct lupdecomposition* lp = get_lup_from_rb_value(self); VALUE* v = malloc(lp->n * sizeof(VALUE)); for(int i = 0; i < lp->n; ++i) v[i] = INT2NUM(lp->permutation[i]); VALUE res = rb_ary_new_from_values(lp->n, v); free(v); return res; } |