idx::~idx()
{
debugmsg("idx destructor",LOGLEVEL_DESTRUCT);
- destroy(0);
+ destroy(false);
}
idx::idx(const idx & other)
{
debugmsg("idx operator=",LOGLEVEL_ASSIGNMENT);
if (this != &other) {
- destroy(1);
+ destroy(true);
copy(other);
}
return *this;
serial = next_serial++;
}
-idx::idx(const char * n, bool cov) : inherited(TINFO_idx),
- symbolic(true), name(n), covariant(cov)
+idx::idx(const char * n, bool cov) : inherited(TINFO_idx), symbolic(true), name(n), covariant(cov)
{
debugmsg("idx constructor from char*,bool",LOGLEVEL_CONSTRUCT);
serial = next_serial++;
}
-idx::idx(unsigned v, bool cov) : inherited(TINFO_idx),
- symbolic(false), value(v), covariant(cov)
+idx::idx(unsigned v, bool cov) : inherited(TINFO_idx), symbolic(false), value(v), covariant(cov)
{
debugmsg("idx constructor from unsigned,bool",LOGLEVEL_CONSTRUCT);
serial = 0;
int idx::compare_same_type(const basic & other) const
{
GINAC_ASSERT(is_of_type(other,idx));
- const idx & o=static_cast<const idx &>
- (const_cast<basic &>(other));
+ const idx & o=static_cast<const idx &>(const_cast<basic &>(other));
if (covariant!=o.covariant) {
// different co/contravariant
bool idx::is_equal_same_type(const basic & other) const
{
GINAC_ASSERT(is_of_type(other,idx));
- const idx & o=static_cast<const idx &>
- (const_cast<basic &>(other));
+ const idx & o=static_cast<const idx &>(const_cast<basic &>(other));
if (covariant!=o.covariant) return false;
if (symbolic!=o.symbolic) return false;
{
// like is_equal_same_type(), but tests for different covariant status
GINAC_ASSERT(is_of_type(other,idx));
- const idx & o=static_cast<const idx &>
- (const_cast<basic &>(other));
+ const idx & o=static_cast<const idx &>(const_cast<basic &>(other));
if (covariant==o.covariant) return false;
if (symbolic!=o.symbolic) return false;
}
ex permute_free_index_to_front(const exvector & iv3, const exvector & iv2,
- bool antisymmetric, int * sig)
+ bool antisymmetric, int * sig)
{
// match (return value,iv2) to iv3 by permuting indices
// iv3 is always cyclic
}
ex subs_indices(const ex & e, const exvector & idxv_subs,
- const exvector & idxv_repl)
+ const exvector & idxv_repl)
{
GINAC_ASSERT(idxv_subs.size()==idxv_repl.size());
ex res=e;