*
* Implementation of GiNaC's products of expressions. */
+/*
+ * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#include <vector>
#include <stdexcept>
-#include "ginac.h"
+#include "mul.h"
+#include "add.h"
+#include "power.h"
+#include "debugmsg.h"
+
+namespace GiNaC {
//////////
// default constructor, destructor, copy constructor assignment operator and helpers
mul::mul()
{
debugmsg("mul default constructor",LOGLEVEL_CONSTRUCT);
- tinfo_key = TINFO_MUL;
+ tinfo_key = TINFO_mul;
}
mul::~mul()
mul::mul(ex const & lh, ex const & rh)
{
debugmsg("mul constructor from ex,ex",LOGLEVEL_CONSTRUCT);
- tinfo_key = TINFO_MUL;
+ tinfo_key = TINFO_mul;
overall_coeff=exONE();
construct_from_2_ex(lh,rh);
ASSERT(is_canonical());
mul::mul(exvector const & v)
{
debugmsg("mul constructor from exvector",LOGLEVEL_CONSTRUCT);
- tinfo_key = TINFO_MUL;
+ tinfo_key = TINFO_mul;
overall_coeff=exONE();
construct_from_exvector(v);
ASSERT(is_canonical());
mul::mul(epvector const & v, bool do_not_canonicalize)
{
debugmsg("mul constructor from epvector,bool",LOGLEVEL_CONSTRUCT);
- tinfo_key = TINFO_MUL;
+ tinfo_key = TINFO_mul;
if (do_not_canonicalize) {
seq=v;
#ifdef EXPAIRSEQ_USE_HASHTAB
mul::mul(epvector const & v)
{
debugmsg("mul constructor from epvector",LOGLEVEL_CONSTRUCT);
- tinfo_key = TINFO_MUL;
+ tinfo_key = TINFO_mul;
overall_coeff=exONE();
construct_from_epvector(v);
ASSERT(is_canonical());
mul::mul(epvector const & v, ex const & oc)
{
debugmsg("mul constructor from epvector,ex",LOGLEVEL_CONSTRUCT);
- tinfo_key = TINFO_MUL;
+ tinfo_key = TINFO_mul;
overall_coeff=oc;
construct_from_epvector(v);
ASSERT(is_canonical());
mul::mul(epvector * vp, ex const & oc)
{
debugmsg("mul constructor from epvector *,ex",LOGLEVEL_CONSTRUCT);
- tinfo_key = TINFO_MUL;
+ tinfo_key = TINFO_mul;
ASSERT(vp!=0);
overall_coeff=oc;
construct_from_epvector(*vp);
mul::mul(ex const & lh, ex const & mh, ex const & rh)
{
debugmsg("mul constructor from ex,ex,ex",LOGLEVEL_CONSTRUCT);
- tinfo_key = TINFO_MUL;
+ tinfo_key = TINFO_mul;
exvector factors;
factors.reserve(3);
factors.push_back(lh);
const mul some_mul;
type_info const & typeid_mul=typeid(some_mul);
-
+} // namespace GiNaC