* No real implementation yet, to be done. */
/*
- * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2001 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
#include "simp_lor.h"
#include "ex.h"
#include "mul.h"
-#include "symbol.h"
#include "debugmsg.h"
#include "utils.h"
}
} else if (idx1.is_symbolic() &&
idx1.is_co_contra_pair(idx2)) {
- return Dim()-idx1.get_dim_parallel_space();
+ return Dim() - 2;
}
}
//////////
const simp_lor some_simp_lor;
-const type_info & typeid_simp_lor = typeid(some_simp_lor);
+const std::type_info & typeid_simp_lor = typeid(some_simp_lor);
//////////
// friend functions
return e_expanded;
}
-//ex Dim(void) // FIXME: what's going on here?
-//{
-// static symbol * d=new symbol("dim");
-// return *d;
-//}
-
//////////
// helper classes
//////////
ex scalar_products::evaluate(const simp_lor & v1, const simp_lor & v2) const
{
- if (v1.compare_same_type(v2)>0) {
- return evaluate(v2,v1);
- }
- return spm.find(make_key(v1,v2))->second;
+ if (v1.compare_same_type(v2)>0)
+ return evaluate(v2, v1);
+
+ return (*spm.find(make_key(v1,v2))).second;
}
void scalar_products::debugprint(void) const
const spmapkey & k=(*cit).first;
std::cerr << "item key=((" << k.first.first
<< "," << k.first.second << "),";
- k.second.printraw(cerr);
- cerr << ") value=" << (*cit).second << std::endl;
+ k.second.printraw(std::cerr);
+ std::cerr << ") value=" << (*cit).second << std::endl;
}
}