|
GiNaC
1.6.2
|
Non-commutative product of expressions. More...
#include <ncmul.h>
Public Member Functions | |
| ncmul (const ex &lh, const ex &rh) | |
| ncmul (const ex &f1, const ex &f2, const ex &f3) | |
| ncmul (const ex &f1, const ex &f2, const ex &f3, const ex &f4) | |
| ncmul (const ex &f1, const ex &f2, const ex &f3, const ex &f4, const ex &f5) | |
| ncmul (const ex &f1, const ex &f2, const ex &f3, const ex &f4, const ex &f5, const ex &f6) | |
| ncmul (const exvector &v, bool discardable=false) | |
| ncmul (std::auto_ptr< exvector > vp) | |
| unsigned | precedence () const |
| Return relative operator precedence (for parenthezing output). | |
| bool | info (unsigned inf) const |
| Information about the object. | |
| 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 | expand (unsigned options=0) const |
| Expand expression, i.e. | |
| ex | coeff (const ex &s, int n=1) const |
| Return coefficient of degree n in object s. | |
| ex | eval (int level=0) const |
| Perform automatic term rewriting rules in this class. | |
| ex | evalm () const |
| Evaluate sums, products and integer powers of matrices. | |
| exvector | get_free_indices () const |
| Return a vector containing the free indices of an expression. | |
| ex | thiscontainer (const exvector &v) const |
| ex | thiscontainer (std::auto_ptr< exvector > vp) const |
| ex | conjugate () const |
| ex | real_part () const |
| ex | imag_part () const |
| const exvector & | get_factors () const |
Protected Member Functions | |
| ex | derivative (const symbol &s) const |
| Implementation of ex::diff() for a non-commutative product. | |
| unsigned | return_type () const |
| return_type_t | return_type_tinfo () const |
| void | do_print (const print_context &c, unsigned level) const |
| Default output to stream. | |
| void | do_print_csrc (const print_context &c, unsigned level) const |
| size_t | count_factors (const ex &e) const |
| void | append_factors (exvector &v, const ex &e) const |
| std::auto_ptr< exvector > | expandchildren (unsigned options) const |
Friends | |
| class | power |
| ex | reeval_ncmul (const exvector &v) |
| ex | hold_ncmul (const exvector &v) |
Definition at line 60 of file ncmul.cpp.
Referenced by coeff(), conjugate(), derivative(), eval(), evalm(), expand(), and thiscontainer().
| GiNaC::ncmul::ncmul | ( | const exvector & | v, |
| bool | discardable = false |
||
| ) |
| unsigned GiNaC::ncmul::precedence | ( | ) | const [inline, virtual] |
Return relative operator precedence (for parenthezing output).
Reimplemented from GiNaC::container< C >.
Definition at line 57 of file ncmul.h.
Referenced by do_print(), and do_print_csrc().
| bool GiNaC::ncmul::info | ( | unsigned | inf | ) | const [virtual] |
| int GiNaC::ncmul::degree | ( | const ex & | s | ) | const [virtual] |
Return degree of highest power in object s.
Reimplemented from GiNaC::basic.
Definition at line 200 of file ncmul.cpp.
References GiNaC::container< C >::end(), GiNaC::basic::is_equal(), and GiNaC::container_storage< C >::seq.
| int GiNaC::ncmul::ldegree | ( | const ex & | s | ) | const [virtual] |
Return degree of lowest power in object s.
Reimplemented from GiNaC::basic.
Definition at line 215 of file ncmul.cpp.
References GiNaC::container< C >::end(), GiNaC::basic::is_equal(), and GiNaC::container_storage< C >::seq.
| ex GiNaC::ncmul::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 120 of file ncmul.cpp.
References GiNaC::_ex1, GiNaC::status_flags::dynallocated, expandchildren(), GiNaC::status_flags::expanded, k, last, ncmul(), GiNaC::container< C >::op(), GiNaC::rename_dummy_indices_uniquely(), GiNaC::container_storage< C >::seq, and GiNaC::basic::setflag().
Return coefficient of degree n in object s.
Reimplemented from GiNaC::basic.
Definition at line 230 of file ncmul.cpp.
References GiNaC::_ex0, GiNaC::_ex1, c, GiNaC::status_flags::dynallocated, GiNaC::container< C >::end(), GiNaC::basic::is_equal(), GiNaC::ex::is_zero(), ncmul(), GiNaC::container_storage< C >::seq, and GiNaC::basic::setflag().
Referenced by GiNaC::add::coeff().
| ex GiNaC::ncmul::eval | ( | int | level = 0 | ) | const [virtual] |
Perform automatic term rewriting rules in this class.
In the following x, x1, x2,... stand for a symbolic variables of type ex and c, c1, c2... stand for such expressions that contain a plain number.
| level | cut-off in recursive evaluation |
Reimplemented from GiNaC::container< C >.
Definition at line 304 of file ncmul.cpp.
References GiNaC::_ex1, append_factors(), GiNaC::ex::begin(), GiNaC::return_types::commutative, count_factors(), GiNaC::status_flags::dynallocated, GiNaC::container< C >::evalchildren(), GiNaC::status_flags::evaluated, GiNaC::factor(), factors, GiNaC::basic::flags, GINAC_ASSERT, GiNaC::make_flat_inserter::handle_factor(), ncmul(), GiNaC::return_types::noncommutative, GiNaC::return_types::noncommutative_composite, GiNaC::container_storage< C >::reserve(), GiNaC::container_storage< C >::seq, and GiNaC::basic::setflag().
| ex GiNaC::ncmul::evalm | ( | ) | const [virtual] |
Evaluate sums, products and integer powers of matrices.
Reimplemented from GiNaC::basic.
Definition at line 447 of file ncmul.cpp.
References GiNaC::status_flags::dynallocated, GiNaC::matrix::mul(), ncmul(), GiNaC::container_storage< C >::seq, and GiNaC::basic::setflag().
| exvector GiNaC::ncmul::get_free_indices | ( | ) | const [virtual] |
Return a vector containing the free indices of an expression.
Reimplemented from GiNaC::basic.
Definition at line 503 of file indexed.cpp.
References GiNaC::find_free_and_dummy(), GiNaC::ex::get_free_indices(), GiNaC::container< C >::nops(), and GiNaC::container< C >::op().
Definition at line 476 of file ncmul.cpp.
References GiNaC::status_flags::dynallocated, and ncmul().
Definition at line 481 of file ncmul.cpp.
References GiNaC::status_flags::dynallocated, and ncmul().
| ex GiNaC::ncmul::conjugate | ( | ) | const [virtual] |
Reimplemented from GiNaC::container< C >.
Definition at line 486 of file ncmul.cpp.
References GiNaC::container< C >::begin(), GiNaC::status_flags::dynallocated, GiNaC::container< C >::end(), GiNaC::basic::eval(), GiNaC::is_clifford_tinfo(), ncmul(), GiNaC::return_types::noncommutative, GiNaC::container< C >::nops(), return_type(), return_type_tinfo(), and GiNaC::basic::setflag().
| ex GiNaC::ncmul::real_part | ( | ) | const [virtual] |
Reimplemented from GiNaC::container< C >.
| ex GiNaC::ncmul::imag_part | ( | ) | const [virtual] |
Reimplemented from GiNaC::container< C >.
Implementation of ex::diff() for a non-commutative product.
It applies the product rule.
Reimplemented from GiNaC::basic.
Definition at line 520 of file ncmul.cpp.
References GiNaC::status_flags::dynallocated, ncmul(), GiNaC::container_storage< C >::seq, GiNaC::basic::setflag(), and GiNaC::ex::swap().
| unsigned GiNaC::ncmul::return_type | ( | ) | const [protected, virtual] |
Reimplemented from GiNaC::basic.
Definition at line 542 of file ncmul.cpp.
References GiNaC::return_types::commutative, GiNaC::container< C >::end(), GINAC_ASSERT, GiNaC::return_types::noncommutative, GiNaC::return_types::noncommutative_composite, and GiNaC::container_storage< C >::seq.
Referenced by conjugate().
| return_type_t GiNaC::ncmul::return_type_tinfo | ( | ) | const [protected, virtual] |
Reimplemented from GiNaC::basic.
Definition at line 572 of file ncmul.cpp.
References GiNaC::container< C >::end(), GiNaC::return_types::noncommutative, and GiNaC::container_storage< C >::seq.
Referenced by conjugate().
| void GiNaC::ncmul::do_print | ( | const print_context & | c, |
| unsigned | level | ||
| ) | const [protected] |
Default output to stream.
Reimplemented from GiNaC::container< C >.
Definition at line 102 of file ncmul.cpp.
References precedence(), and GiNaC::container< C >::printseq().
| void GiNaC::ncmul::do_print_csrc | ( | const print_context & | c, |
| unsigned | level | ||
| ) | const [protected] |
Definition at line 107 of file ncmul.cpp.
References precedence(), GiNaC::container< C >::printseq(), and GiNaC::print_context::s.
| size_t GiNaC::ncmul::count_factors | ( | const ex & | e | ) | const [protected] |
Definition at line 267 of file ncmul.cpp.
References GiNaC::return_types::commutative, factors, GiNaC::ex::nops(), GiNaC::ex::op(), and GiNaC::ex::return_type().
Referenced by eval().
Definition at line 280 of file ncmul.cpp.
References GiNaC::return_types::commutative, GiNaC::ex::nops(), GiNaC::ex::op(), and GiNaC::ex::return_type().
Referenced by eval().
| std::auto_ptr< exvector > GiNaC::ncmul::expandchildren | ( | unsigned | options | ) | const [protected] |
Definition at line 599 of file ncmul.cpp.
References GiNaC::are_ex_trivially_equal(), GiNaC::container< C >::end(), GiNaC::ex::expand(), GiNaC::container_storage< C >::reserve(), and GiNaC::container_storage< C >::seq.
Referenced by expand().
| const exvector & GiNaC::ncmul::get_factors | ( | ) | const |
Definition at line 629 of file ncmul.cpp.
References GiNaC::container_storage< C >::seq.