/*************** m_mat_choose.c (in u1.a) **************************** * * * void mult_u1_choose(u1_matrix *a, int flaga, * * u1_matrix *b, int flagb, u1_matrix *c) * * matrix multiply, adjoints set by flags * * C <- A^(flaga) * B^(flagb) * */ #include "complex.h" #include "u1.h" void mult_u1_choose(u1_matrix *a, int flaga, u1_matrix *b, int flagb, u1_matrix *c) { c->e[0] = a->e[0]*b->e[0] - flaga*flagb*(a->e[1]*b->e[1]); c->e[1] = flagb*a->e[0]*b->e[1] + flaga*a->e[1]*b->e[0]; }