3 * Interface to GiNaC's symbolic integral. */
6 * GiNaC Copyright (C) 1999-2004 Johannes Gutenberg University Mainz, Germany
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __GINAC_INTEGRAL_H__
24 #define __GINAC_INTEGRAL_H__
31 /** Product of expressions. */
32 class integral : public basic
34 GINAC_DECLARE_REGISTERED_CLASS(integral, basic)
38 integral(const ex & x_, const ex & a_, const ex & b_, const ex & f_);
40 // functions overriding virtual functions from base classes
42 unsigned precedence() const {return 45;}
43 ex eval(int level=0) const;
44 ex evalf(int level=0) const;
45 int degree(const ex & s) const;
46 int ldegree(const ex & s) const;
47 ex eval_ncmul(const exvector & v) const;
49 ex op(size_t i) const;
50 ex & let_op(size_t i);
51 ex expand(unsigned options = 0) const;
52 exvector get_free_indices() const;
53 unsigned return_type() const;
54 unsigned return_type_tinfo() const;
56 ex eval_integ() const;
58 ex derivative(const symbol & s) const;
60 // new virtual functions which can be overridden by derived classes
63 // non-virtual functions in this class
65 void do_print(const print_context & c, unsigned level) const;
66 void do_print_latex(const print_latex & c, unsigned level) const;
68 static int max_integration_level;
69 static ex relative_integration_error;
79 /** Specialization of is_exactly_a<integral>(obj) for integral objects. */
80 template<> inline bool is_exactly_a<integral>(const basic & obj)
82 return obj.tinfo()==TINFO_integral;
86 GiNaC::ex adaptivesimpson(
91 const GiNaC::ex &error = integral::relative_integration_error
96 #endif // ndef __GINAC_INTEGRAL_H__