void construct_blas_matrix(MAT & M, const operator_container_t &creation_operators, const operator_container_t &annihilation_operators, double BETA, const HYB & F) { int N = creation_operators.size(); M.resize(N, N); int row = -1; int column = -1; for (operator_container_t::iterator ita = annihilation_operators.begin(); ita != annihilation_operators.end(); ita++) { row++; for (operator_container_t::iterator itc = creation_operators.begin(); itc != creation_operators.end(); itc++) { column++; double argument = ita->time() - itc->time(); double sign = 1; if (argument < 0) { argument += BETA; sign = -1; } M(row, column) = interpolate_F(argument, BETA, F[ita->flavor()][itc->flavor()]) * sign; } column = -1; } }
static void generate_transition_matrix_resize(VEC const& weights, MAT& tm) { std::size_t n = weights.size(); tm.resize(n); for (std::size_t i = 0; i < n; ++i) tm[i].resize(n); generate_transition_matrix(weights, tm); }