GiNaC  1.6.2
Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes
GiNaC::integral Class Reference

Symbolic integral. More...

#include <integral.h>

Inheritance diagram for GiNaC::integral:
GiNaC::basic GiNaC::refcounted

List of all members.

Public Member Functions

 integral (const ex &x_, const ex &a_, const ex &b_, const ex &f_)
unsigned precedence () const
 Return relative operator precedence (for parenthezing output).
ex eval (int level=0) const
 Perform automatic non-interruptive term rewriting rules.
ex evalf (int level=0) const
 Evaluate object numerically.
int degree (const ex &s) const
 Return degree of highest power in object s.
int ldegree (const ex &s) const
 Return degree of lowest power in object s.
ex eval_ncmul (const exvector &v) const
size_t nops () const
 Number of operands/members.
ex op (size_t i) const
 Return operand/member at position i.
exlet_op (size_t i)
 Return modifyable operand/member at position i.
ex expand (unsigned options=0) const
 Expand expression, i.e.
exvector get_free_indices () const
 Return a vector containing the free indices of an expression.
unsigned return_type () const
return_type_t return_type_tinfo () const
ex conjugate () const
ex eval_integ () const
 Evaluate integrals, if result is known.
void archive (archive_node &n) const
 Save (a.k.a.
void read_archive (const archive_node &n, lst &syms)
 Read (a.k.a.

Static Public Attributes

static int max_integration_level = 15
static ex relative_integration_error = 1e-8

Protected Member Functions

ex derivative (const symbol &s) const
 Default implementation of ex::diff().
ex series (const relational &r, int order, unsigned options=0) const
 Default implementation of ex::series().
void do_print (const print_context &c, unsigned level) const
 Default output to stream.
void do_print_latex (const print_latex &c, unsigned level) const

Private Attributes

ex x
ex a
ex b
ex f

Detailed Description

Symbolic integral.

Definition at line 33 of file integral.h.


Constructor & Destructor Documentation

GiNaC::integral::integral ( const ex x_,
const ex a_,
const ex b_,
const ex f_ 
)

Definition at line 61 of file integral.cpp.

References x.

Referenced by conjugate(), derivative(), eval(), evalf(), expand(), and series().


Member Function Documentation

unsigned GiNaC::integral::precedence ( ) const [inline, virtual]

Return relative operator precedence (for parenthezing output).

Reimplemented from GiNaC::basic.

Definition at line 43 of file integral.h.

Referenced by do_print_latex().

ex GiNaC::integral::eval ( int  level = 0) const [virtual]
ex GiNaC::integral::evalf ( int  level = 0) const [virtual]
int GiNaC::integral::degree ( const ex s) const [virtual]

Return degree of highest power in object s.

Reimplemented from GiNaC::basic.

Definition at line 326 of file integral.cpp.

References a, b, and f.

int GiNaC::integral::ldegree ( const ex s) const [virtual]

Return degree of lowest power in object s.

Reimplemented from GiNaC::basic.

Definition at line 331 of file integral.cpp.

References a, b, and f.

ex GiNaC::integral::eval_ncmul ( const exvector v) const [virtual]

Reimplemented from GiNaC::basic.

Definition at line 336 of file integral.cpp.

References GiNaC::ex::eval_ncmul(), and f.

size_t GiNaC::integral::nops ( ) const [virtual]

Number of operands/members.

Reimplemented from GiNaC::basic.

Definition at line 341 of file integral.cpp.

ex GiNaC::integral::op ( size_t  i) const [virtual]

Return operand/member at position i.

Reimplemented from GiNaC::basic.

Definition at line 346 of file integral.cpp.

References a, b, f, GINAC_ASSERT, and x.

ex & GiNaC::integral::let_op ( size_t  i) [virtual]

Return modifyable operand/member at position i.

Reimplemented from GiNaC::basic.

Definition at line 364 of file integral.cpp.

References a, b, GiNaC::basic::ensure_if_modifiable(), f, and x.

ex GiNaC::integral::expand ( unsigned  options = 0) const [virtual]

Expand expression, i.e.

multiply it out and return the result as a new expression.

Reimplemented from GiNaC::basic.

Definition at line 381 of file integral.cpp.

References a, GiNaC::are_ex_trivially_equal(), b, GiNaC::status_flags::dynallocated, GiNaC::basic::ex, GiNaC::ex::expand(), GiNaC::status_flags::expanded, f, GiNaC::basic::flags, GiNaC::ex::has(), integral(), GiNaC::ex::nops(), GiNaC::ex::op(), GiNaC::basic::setflag(), and x.

Referenced by eval_integ().

exvector GiNaC::integral::get_free_indices ( ) const [virtual]

Return a vector containing the free indices of an expression.

Reimplemented from GiNaC::basic.

Definition at line 525 of file indexed.cpp.

References a, b, f, and GiNaC::ex::get_free_indices().

unsigned GiNaC::integral::return_type ( ) const [virtual]

Reimplemented from GiNaC::basic.

Definition at line 431 of file integral.cpp.

References f, and GiNaC::ex::return_type().

return_type_t GiNaC::integral::return_type_tinfo ( ) const [virtual]

Reimplemented from GiNaC::basic.

Definition at line 436 of file integral.cpp.

References f, and GiNaC::ex::return_type_tinfo().

ex GiNaC::integral::conjugate ( ) const [virtual]
ex GiNaC::integral::eval_integ ( ) const [virtual]

Evaluate integrals, if result is known.

Reimplemented from GiNaC::basic.

Definition at line 455 of file integral.cpp.

References a, b, GiNaC::ex::eval_integ(), expand(), GiNaC::status_flags::expanded, f, GiNaC::basic::flags, GiNaC::ex::has(), GiNaC::log(), GiNaC::ex::op(), GiNaC::ex::subs(), and x.

void GiNaC::integral::archive ( archive_node n) const [virtual]

Save (a.k.a.

serialize) object into archive.

Reimplemented from GiNaC::basic.

Definition at line 82 of file integral.cpp.

References a, GiNaC::archive_node::add_ex(), b, f, and x.

void GiNaC::integral::read_archive ( const archive_node n,
lst syms 
) [virtual]

Read (a.k.a.

deserialize) object from archive.

Reimplemented from GiNaC::basic.

Definition at line 73 of file integral.cpp.

References a, b, f, GiNaC::archive_node::find_ex(), and x.

ex GiNaC::integral::derivative ( const symbol s) const [protected, virtual]

Default implementation of ex::diff().

It maps the operation on the operands (or returns 0 when the object has no operands).

See also:
ex::diff

Reimplemented from GiNaC::basic.

Definition at line 424 of file integral.cpp.

References a, b, GiNaC::ex::diff(), f, integral(), GiNaC::ex::subs(), and x.

ex GiNaC::integral::series ( const relational r,
int  order,
unsigned  options = 0 
) const [protected, virtual]

Default implementation of ex::series().

This performs Taylor expansion.

See also:
ex::series

Reimplemented from GiNaC::basic.

Definition at line 1227 of file pseries.cpp.

References GiNaC::_ex1, a, b, GiNaC::status_flags::dynallocated, f, integral(), GiNaC::is_order_function(), GiNaC::ex::nops(), GiNaC::ex::series(), GiNaC::basic::setflag(), GiNaC::ex::subs(), GiNaC::to_int(), and x.

void GiNaC::integral::do_print ( const print_context c,
unsigned  level 
) const [protected]

Default output to stream.

Reimplemented from GiNaC::basic.

Definition at line 95 of file integral.cpp.

References a, b, f, GiNaC::ex::print(), GiNaC::print_context::s, and x.

void GiNaC::integral::do_print_latex ( const print_latex c,
unsigned  level 
) const [protected]

Definition at line 108 of file integral.cpp.

References a, b, f, precedence(), GiNaC::ex::print(), GiNaC::print_context::s, and x.


Member Data Documentation

Definition at line 74 of file integral.h.

Referenced by GiNaC::adaptivesimpson().

Definition at line 75 of file integral.h.


The documentation for this class was generated from the following files:

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