Method: MPFI::SquareMatrix#qr_decomp
- Defined in:
- ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.c
#qr_decomp ⇒ Object
990 991 992 993 994 995 996 997 998 |
# File 'ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.c', line 990
static VALUE r_mpfi_square_matrix_qr_decomp (VALUE self) {
MPFIMatrix *ptr_self, *ptr_q, *ptr_r;
VALUE q, r;
r_mpfi_get_matrix_struct(ptr_self, self);
r_mpfi_matrix_suitable_matrix_init (&q, &ptr_q, ptr_self->row, ptr_self->column);
r_mpfi_matrix_suitable_matrix_init (&r, &ptr_r, ptr_self->column, ptr_self->column);
mpfi_square_matrix_qr_decomp(ptr_q, ptr_r, ptr_self);
return rb_ary_new3(2, q, r);
}
|