3 * Polynomial factorization.
8 * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 #ifndef __GINAC_FACTOR_H__
26 #define __GINAC_FACTOR_H__
32 /** Factorizes univariate and multivariate polynomials.
34 * The default option is factor_options::polynomial, which means that factor()
35 * will only factorize an expression if it is a proper polynomial (i.e. the
36 * flag info_flags::polynomial is set). Given the option factor_options::all,
37 * factor() will factorize all subexpressions, e.g. polynomials containing
38 * functions or polynomials inside function arguments.
40 * @param[in] poly expression to factorize
41 * @param[in] option options to influence the factorization
42 * @return factorized expression
44 extern ex factor(const ex& poly, unsigned options = 0);
48 #endif // ndef __GINAC_FACTOR_H__