* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-// default constructor, destructor, copy constructor assignment operator and helpers
+// default ctor, dtor, copy ctor, assignment operator and helpers
idx::idx(const ex & v, const ex & d) : inherited(TINFO_idx), value(v), dim(d)
{
idx::idx(const ex & v, const ex & d) : inherited(TINFO_idx), value(v), dim(d)
{
if (is_dim_numeric())
if (!dim.info(info_flags::posint))
throw(std::invalid_argument("dimension of space must be a positive integer"));
if (is_dim_numeric())
if (!dim.info(info_flags::posint))
throw(std::invalid_argument("dimension of space must be a positive integer"));
varidx::varidx(const ex & v, const ex & d, bool cov) : inherited(v, d), covariant(cov)
{
varidx::varidx(const ex & v, const ex & d, bool cov) : inherited(v, d), covariant(cov)
{
tinfo_key = TINFO_varidx;
}
spinidx::spinidx(const ex & v, const ex & d, bool cov, bool dot) : inherited(v, d, cov), dotted(dot)
{
tinfo_key = TINFO_varidx;
}
spinidx::spinidx(const ex & v, const ex & d, bool cov, bool dot) : inherited(v, d, cov), dotted(dot)
{
n.find_ex("value", value, sym_lst);
n.find_ex("dim", dim, sym_lst);
}
varidx::varidx(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst)
{
n.find_ex("value", value, sym_lst);
n.find_ex("dim", dim, sym_lst);
}
varidx::varidx(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst)
{
n.find_bool("covariant", covariant);
}
spinidx::spinidx(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst)
{
n.find_bool("covariant", covariant);
}
spinidx::spinidx(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst)
{
if (is_of_type(c, print_tree)) {
c.s << std::string(level, ' ') << class_name()
if (is_of_type(c, print_tree)) {
c.s << std::string(level, ' ') << class_name()
if (is_of_type(c, print_tree)) {
c.s << std::string(level, ' ') << class_name()
if (is_of_type(c, print_tree)) {
c.s << std::string(level, ' ') << class_name()
if (is_of_type(c, print_tree)) {
c.s << std::string(level, ' ') << class_name()
if (is_of_type(c, print_tree)) {
c.s << std::string(level, ' ') << class_name()