GiNaC  1.6.2
normal.h
Go to the documentation of this file.
00001 
00008 /*
00009  *  GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
00010  *
00011  *  This program is free software; you can redistribute it and/or modify
00012  *  it under the terms of the GNU General Public License as published by
00013  *  the Free Software Foundation; either version 2 of the License, or
00014  *  (at your option) any later version.
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU General Public License for more details.
00020  *
00021  *  You should have received a copy of the GNU General Public License
00022  *  along with this program; if not, write to the Free Software
00023  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00024  */
00025 
00026 #ifndef GINAC_NORMAL_H
00027 #define GINAC_NORMAL_H
00028 
00029 #include "lst.h"
00030 
00031 namespace GiNaC {
00032 
00036 struct gcd_options
00037 {
00038     enum {
00047         no_heur_gcd = 2,
00055         no_part_factored = 4,
00061         use_sr_gcd = 8
00062 
00063     };
00064 };
00065 
00066 class ex;
00067 class symbol;
00068 
00069 // Quotient q(x) of polynomials a(x) and b(x) in Q[x], so that a(x)=b(x)*q(x)+r(x)
00070 extern ex quo(const ex &a, const ex &b, const ex &x, bool check_args = true);
00071 
00072 // Remainder r(x) of polynomials a(x) and b(x) in Q[x], so that a(x)=b(x)*q(x)+r(x)
00073 extern ex rem(const ex &a, const ex &b, const ex &x, bool check_args = true);
00074 
00075 // Decompose rational function a(x)=N(x)/D(x) into Q(x)+R(x)/D(x) with degree(R, x) < degree(D, x)
00076 extern ex decomp_rational(const ex &a, const ex &x);
00077 
00078 // Pseudo-remainder of polynomials a(x) and b(x) in Q[x]
00079 extern ex prem(const ex &a, const ex &b, const ex &x, bool check_args = true);
00080 
00081 // Pseudo-remainder of polynomials a(x) and b(x) in Q[x]
00082 extern ex sprem(const ex &a, const ex &b, const ex &x, bool check_args = true);
00083 
00084 // Exact polynomial division of a(X) by b(X) in Q[X] (quotient returned in q), returns false when exact division fails
00085 extern bool divide(const ex &a, const ex &b, ex &q, bool check_args = true);
00086 
00087 // Polynomial GCD in Z[X], cofactors are returned in ca and cb, if desired
00088 extern ex gcd(const ex &a, const ex &b, ex *ca = NULL, ex *cb = NULL,
00089           bool check_args = true, unsigned options = 0);
00090 
00091 // Polynomial LCM in Z[X]
00092 extern ex lcm(const ex &a, const ex &b, bool check_args = true);
00093 
00094 // Square-free factorization of a polynomial a(x)
00095 extern ex sqrfree(const ex &a, const lst &l = lst());
00096 
00097 // Square-free partial fraction decomposition of a rational function a(x)
00098 extern ex sqrfree_parfrac(const ex & a, const symbol & x);
00099 
00100 // Collect common factors in sums.
00101 extern ex collect_common_factors(const ex & e);
00102 
00103 // Resultant of two polynomials e1,e2 with respect to symbol s.
00104 extern ex resultant(const ex & e1, const ex & e2, const ex & s);
00105 
00106 } // namespace GiNaC
00107 
00108 #endif // ndef GINAC_NORMAL_H

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.