]> www.ginac.de Git - ginac.git/blob - ginac/factor.h
Added many comments.
[ginac.git] / ginac / factor.h
1 /** @file factor.h
2  *
3  *  Polynomial factorization.
4  *
5  */
6
7 /*
8  *  GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
9  *
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.
14  *
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.
19  *
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
23  */
24
25 #ifndef __GINAC_FACTOR_H__
26 #define __GINAC_FACTOR_H__
27
28 namespace GiNaC {
29
30 class ex;
31
32 /** Factorizes univariate and multivariate polynomials.
33  *  
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.
39  *
40  *  @param[in] poly    expression to factorize
41  *  @param[in] option  options to influence the factorization
42  *  @return            factorized expression
43  */
44 extern ex factor(const ex& poly, unsigned options = 0);
45
46 } // namespace GiNaC
47
48 #endif // ndef __GINAC_FACTOR_H__