def _get_facvar(self, polynomial):
facvar = [<NUM_LIT:0>] * (self.n_vars + <NUM_LIT:1>)<EOL>if is_number_type(polynomial):<EOL><INDENT>facvar[<NUM_LIT:0>] = polynomial<EOL>return facvar<EOL><DEDENT>polynomial = polynomial.expand()<EOL>if polynomial.is_Mul:<EOL><INDENT>elements = [polynomial]<EOL><DEDENT>else:<EOL><INDENT>elements = polynomial.as_coeff_mul()[<NUM_LIT:1>][<NUM_LIT:0>].as_coeff_add()[<NUM_LIT:1>]<EOL><DEDENT>for element in elements:<EOL><INDENT>results = self._get_index_of_monomial(element)<EOL>for (k, coeff) in results:<EOL><INDENT>facvar[k] += coeff<EOL><DEDENT><DEDENT>return facvar<EOL>
Return dense vector representation of a polynomial. This function is
        nearly identical to __push_facvar_sparse, but instead of pushing
        sparse entries to the constraint matrices, it returns a dense
        vector.