* Implementation of GiNaC's indices. */
/*
- * GiNaC Copyright (C) 1999-2014 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2016 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
return *this;
else {
idx *copy = duplicate();
- copy->setflag(status_flags::dynallocated);
copy->clearflag(status_flags::hash_calculated);
copy->value = mapped_value;
return *copy;
/** By default, basic::evalf would evaluate the index value but we don't want
* a.1 to become a.(1.0). */
-ex idx::evalf(int level) const
+ex idx::evalf() const
{
return *this;
}
idx *i_copy = duplicate();
i_copy->value = it->second;
i_copy->clearflag(status_flags::hash_calculated);
- return i_copy->setflag(status_flags::dynallocated);
+ return *i_copy;
}
// None, substitute objects in value (not in dimension)
idx *i_copy = duplicate();
i_copy->value = subsed_value;
i_copy->clearflag(status_flags::hash_calculated);
- return i_copy->setflag(status_flags::dynallocated);
+ return *i_copy;
}
/** Implementation of ex::diff() for an index always returns 0.
idx *i_copy = duplicate();
i_copy->dim = new_dim;
i_copy->clearflag(status_flags::hash_calculated);
- return i_copy->setflag(status_flags::dynallocated);
+ return *i_copy;
}
ex idx::minimal_dim(const idx & other) const
varidx *i_copy = duplicate();
i_copy->covariant = !i_copy->covariant;
i_copy->clearflag(status_flags::hash_calculated);
- return i_copy->setflag(status_flags::dynallocated);
+ return *i_copy;
}
ex spinidx::toggle_dot() const
spinidx *i_copy = duplicate();
i_copy->dotted = !i_copy->dotted;
i_copy->clearflag(status_flags::hash_calculated);
- return i_copy->setflag(status_flags::dynallocated);
+ return *i_copy;
}
ex spinidx::toggle_variance_dot() const
i_copy->covariant = !i_copy->covariant;
i_copy->dotted = !i_copy->dotted;
i_copy->clearflag(status_flags::hash_calculated);
- return i_copy->setflag(status_flags::dynallocated);
+ return *i_copy;
}
//////////