#include "add.h"
#include "mul.h"
#include "debugmsg.h"
-#include "flags.h"
#include "lst.h"
#include "lortensor.h"
#include "operators.h"
name=autoname_prefix()+ToString(serial);
}
-lortensor::~lortensor()
-{
- debugmsg("lortensor destructor",LOGLEVEL_DESTRUCT);
- destroy(false);
-}
-
-lortensor::lortensor(const lortensor & other)
-{
- debugmsg("lortensor copy constructor",LOGLEVEL_CONSTRUCT);
- copy (other);
-}
-
-const lortensor & lortensor::operator=(const lortensor & other)
-{
- debugmsg("lortensor operator=",LOGLEVEL_ASSIGNMENT);
- if (this != & other) {
- destroy(true);
- copy(other);
- }
- return *this;
-}
-
//protected
void lortensor::copy(const lortensor & other)
//public
-basic * lortensor::duplicate() const
-{
- debugmsg("lortensor duplicate",LOGLEVEL_DUPLICATE);
- return new lortensor(*this);
-}
-
void lortensor::printraw(std::ostream & os) const
{
debugmsg("lortensor printraw",LOGLEVEL_PRINT);
return _ex0();
}
} else if (idx1.is_symbolic() && idx1.is_co_contra_pair(idx2)) {
- return Dim() - 2;
+ if (idx1.is_orthogonal_only())
+ return Dim() - idx1.get_dim_parallel_space();
+ else
+ return Dim();
}
}
return this -> hold();
return e_expanded;
}
-//////////
-// global constants
-//////////
-
-const lortensor some_lortensor;
-const std::type_info & typeid_lortensor = typeid(some_lortensor);
-
#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
#endif // ndef NO_NAMESPACE_GINAC