]> www.ginac.de Git - ginac.git/blobdiff - ginac/indexed.cpp
- Bernard Parisse's patch for Order_eval().
[ginac.git] / ginac / indexed.cpp
index 1f67038f9a04dca5784020229e7a44ac1620a55b..fb35d8c1819967e3b89228eb48b8763d175d258b 100644 (file)
@@ -166,7 +166,7 @@ basic * indexed::duplicate() const
     return new indexed(*this);
 }
 
-void indexed::printraw(ostream & os) const
+void indexed::printraw(std::ostream & os) const
 {
     debugmsg("indexed printraw",LOGLEVEL_PRINT);
     os << "indexed(indices=";
@@ -174,22 +174,22 @@ void indexed::printraw(ostream & os) const
     os << ",hash=" << hashvalue << ",flags=" << flags << ")";
 }
 
-void indexed::printtree(ostream & os, unsigned indent) const
+void indexed::printtree(std::ostream & os, unsigned indent) const
 {
     debugmsg("indexed printtree",LOGLEVEL_PRINT);
-    os << string(indent,' ') << "indexed: " << seq.size() << " indices";
-    os << ",hash=" << hashvalue << ",flags=" << flags << endl;
+    os << std::string(indent,' ') << "indexed: " << seq.size() << " indices";
+    os << ",hash=" << hashvalue << ",flags=" << flags << std::endl;
     printtreeindices(os,indent);
 }
 
-void indexed::print(ostream & os, unsigned upper_precedence) const
+void indexed::print(std::ostream & os, unsigned upper_precedence) const
 {
     debugmsg("indexed print",LOGLEVEL_PRINT);
     os << "UNNAMEDINDEX";
     printindices(os);
 }
 
-void indexed::printcsrc(ostream & os, unsigned type,
+void indexed::printcsrc(std::ostream & os, unsigned type,
                         unsigned upper_precedence) const
 {
     debugmsg("indexed print csrc",LOGLEVEL_PRINT);
@@ -221,6 +221,13 @@ exvector indexed::get_indices(void) const
 
 // protected
 
+/** Implementation of ex::diff() for an indexed object. It always returns 0.
+ *  @see ex::diff */
+ex indexed::derivative(const symbol & s) const
+{
+        return _ex0();
+}
+
 int indexed::compare_same_type(const basic & other) const
 {
     GINAC_ASSERT(is_of_type(other,indexed));
@@ -265,7 +272,7 @@ ex indexed::thisexprseq(exvector * vp) const
 
 // protected
 
-void indexed::printrawindices(ostream & os) const
+void indexed::printrawindices(std::ostream & os) const
 {
     if (seq.size()!=0) {
         for (exvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) {
@@ -275,18 +282,18 @@ void indexed::printrawindices(ostream & os) const
     }
 }
 
-void indexed::printtreeindices(ostream & os, unsigned indent) const
+void indexed::printtreeindices(std::ostream & os, unsigned indent) const
 {
     if (seq.size()!=0) {
         for (exvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) {
-            os << string(indent+delta_indent,' ');
+            os << std::string(indent+delta_indent,' ');
             (*cit).printraw(os);
-            os << endl;
+            os << std::endl;
         }
     }
 }
 
-void indexed::printindices(ostream & os) const
+void indexed::printindices(std::ostream & os) const
 {
     if (seq.size()!=0) {
         if (seq.size()>1) {