]> www.ginac.de Git - ginac.git/blobdiff - ginac/basic.cpp
- introduced info_flag::algebraic.
[ginac.git] / ginac / basic.cpp
index 5606f3640e7d4d0fb9952ebefc830ec79478db3c..83b777bbf9f8fc8c2592d5c34eea54a19aad2581 100644 (file)
@@ -205,6 +205,9 @@ bool basic::info(unsigned inf) const
 /** Number of operands/members. */
 unsigned basic::nops() const
 {
+    // iterating from 0 to nops() on atomic objects should be an empty loop,
+    // and accessing their elements is a range error.  Container objects should
+    // override this.
     return 0;
 }
 
@@ -281,12 +284,14 @@ ex basic::collect(const symbol & s) const
 /* Perform automatic symbolic evaluations on expression. */
 ex basic::eval(int level) const
 {
+    // There is nothing to do for basic objects:
     return this->hold();
 }
 
 /** Evaluate object numerically. */
 ex basic::evalf(int level) const
 {
+    // There is nothing to do for basic objects:
     return *this;
 }