GiNaC  1.6.2
ncmul.h
Go to the documentation of this file.
00001 
00005 /*
00006  *  GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
00007  *
00008  *  This program is free software; you can redistribute it and/or modify
00009  *  it under the terms of the GNU General Public License as published by
00010  *  the Free Software Foundation; either version 2 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  This program is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *  GNU General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU General Public License
00019  *  along with this program; if not, write to the Free Software
00020  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021  */
00022 
00023 #ifndef GINAC_NCMUL_H
00024 #define GINAC_NCMUL_H
00025 
00026 #include "exprseq.h"
00027 #include "archive.h"
00028 
00029 namespace GiNaC {
00030 
00032 class ncmul : public exprseq
00033 {
00034     GINAC_DECLARE_REGISTERED_CLASS(ncmul, exprseq)
00035 
00036     friend class power;
00037     friend ex reeval_ncmul(const exvector & v);
00038     friend ex hold_ncmul(const exvector & v);
00039 
00040 // member functions
00041 
00042     // other constructors
00043 public:
00044     ncmul(const ex & lh, const ex & rh);
00045     ncmul(const ex & f1, const ex & f2, const ex & f3);
00046     ncmul(const ex & f1, const ex & f2, const ex & f3,
00047           const ex & f4);
00048     ncmul(const ex & f1, const ex & f2, const ex & f3,
00049           const ex & f4, const ex & f5);
00050     ncmul(const ex & f1, const ex & f2, const ex & f3,
00051           const ex & f4, const ex & f5, const ex & f6);
00052     ncmul(const exvector & v, bool discardable=false);
00053     ncmul(std::auto_ptr<exvector> vp);
00054 
00055     // functions overriding virtual functions from base classes
00056 public:
00057     unsigned precedence() const {return 50;}
00058     bool info(unsigned inf) const;
00059     int degree(const ex & s) const;
00060     int ldegree(const ex & s) const;
00061     ex expand(unsigned options=0) const;
00062     ex coeff(const ex & s, int n=1) const;
00063     ex eval(int level=0) const;
00064     ex evalm() const;
00065     exvector get_free_indices() const;
00066     ex thiscontainer(const exvector & v) const;
00067     ex thiscontainer(std::auto_ptr<exvector> vp) const;
00068     ex conjugate() const;
00069     ex real_part() const;
00070     ex imag_part() const;
00071 
00072 protected:
00073     ex derivative(const symbol & s) const;
00074     unsigned return_type() const;
00075     return_type_t return_type_tinfo() const;
00076     
00077     // new virtual functions which can be overridden by derived classes
00078     // none
00079 
00080     // non-virtual functions in this class
00081 protected:
00082     void do_print(const print_context & c, unsigned level) const;
00083     void do_print_csrc(const print_context & c, unsigned level) const;
00084     size_t count_factors(const ex & e) const;
00085     void append_factors(exvector & v, const ex & e) const;
00086     std::auto_ptr<exvector> expandchildren(unsigned options) const;
00087 public:
00088     const exvector & get_factors() const;
00089 };
00090 GINAC_DECLARE_UNARCHIVER(ncmul);
00091 
00092 // friend funtions 
00093 
00094 ex reeval_ncmul(const exvector & v);
00095 ex hold_ncmul(const exvector & v);
00096 
00097 } // namespace GiNaC
00098 
00099 #endif // ndef GINAC_NCMUL_H

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