/* Created on: 19 feb. 2019 Author: Daniel Mårtensson This is the almost the same as powe, power on every element, but the difference is that this function does not take power on each element, it does A^n A will be size row x row. It must be square!!! A^n and n will be an integer  */
void mpower(double *A, int row, int n)
/* Created on: 19 feb. 2019 Author: Daniel Mårtensson This is the almost the same as powe, power on every element, but the difference is that this function does not take power on each element, it does A^n A will be size row x row. It must be square!!! A^n and n will be an integer  */
void mpower(double *A, int row, int n)
{
		if (i == 0) {
			eye(T, row, row);
		} else if (i == 1) {
			copy(A, T, row, row);
		} else if (i == 2) {
			mul(A, A, false, T, row, row, row);
		} else {
			mul(A, T, false, T2, row, row, row);
			copy(T2, T, row, row);
		}
	}
	copy(T, A, row, row);
}