* Implementation of GiNaC's ABC. */
/*
- * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2000 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
<< ", hash=" << hashvalue << " (0x" << hex << hashvalue << dec << ")"
<< ", flags=" << flags
<< ", nops=" << nops() << endl;
- for (int i=0; i<nops(); ++i) {
+ for (unsigned i=0; i<nops(); ++i) {
op(i).printtree(os,indent+delta_indent);
}
}
return false; // all possible properties are false for basic objects
}
-int basic::nops() const
+unsigned basic::nops() const
{
return 0;
}
GINAC_ASSERT(other.bp!=0);
if (is_equal(*other.bp)) return true;
if (nops()>0) {
- for (int i=0; i<nops(); i++) {
+ for (unsigned i=0; i<nops(); i++) {
if (op(i).has(other)) return true;
}
}
unsigned basic::calchash(void) const
{
unsigned v=golden_ratio_hash(tinfo());
- for (int i=0; i<nops(); i++) {
+ for (unsigned i=0; i<nops(); i++) {
v=rotate_left_31(v);
v ^= (const_cast<basic *>(this))->let_op(i).gethash();
}
}
lst ls;
lst lr;
- for (int i=0; i<e.nops(); i++) {
+ for (unsigned i=0; i<e.nops(); i++) {
if (!e.op(i).info(info_flags::relation_equal)) {
throw(std::invalid_argument("basic::subs(ex): argument must be a list or equations"));
}