]> www.ginac.de Git - ginac.git/blobdiff - ginac/factor.h
Added many comments.
[ginac.git] / ginac / factor.h
index e2ade545a4cde37859d532f1b3b0f76d67b2b896..b54e57b58f29d4dde383f35b0e8a4b29932caf6d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file factor.h
  *
- *  Polynomial factorization routines. Implementation.
- *  Only univariate at the moment and completely non-optimized!
+ *  Polynomial factorization.
+ *
  */
 
 /*
@@ -29,7 +29,19 @@ namespace GiNaC {
 
 class ex;
 
-extern ex factor(const ex& poly);
+/** Factorizes univariate and multivariate polynomials.
+ *  
+ *  The default option is factor_options::polynomial, which means that factor()
+ *  will only factorize an expression if it is a proper polynomial (i.e. the
+ *  flag info_flags::polynomial is set). Given the option factor_options::all,
+ *  factor() will factorize all subexpressions, e.g. polynomials containing
+ *  functions or polynomials inside function arguments.
+ *
+ *  @param[in] poly    expression to factorize
+ *  @param[in] option  options to influence the factorization
+ *  @return            factorized expression
+ */
+extern ex factor(const ex& poly, unsigned options = 0);
 
 } // namespace GiNaC