/* Created on: 10 feb. 2019 Author: Daniel Mårtensson Solve A=QR where A is a matrix of size row x column and Q is size of row x row and R is size of row x column  */
void qr(double *A, double *Q, double *R, int row, int column)
/* Created on: 10 feb. 2019 Author: Daniel Mårtensson Solve A=QR where A is a matrix of size row x column and Q is size of row x row and R is size of row x column  */
void qr(double *A, double *Q, double *R, int row, int column)
{
		memset(v, 0, row*sizeof(double));
		v[i] = 1;
		for(int j = i+1; j < row; j++)
			*(v+j) = *(A_ + j*(column) + i);
		mul(v, v, false, C, row, 1, row);
		scale(C, TAU[i], row, row);
		sub(I, C, C, row, row, row);
		mul(Q, C, false, E, row, row, row);
		memcpy(Q, E, row*row*sizeof(double));
	}
}