/[escript]/trunk/escript/src/Data.cpp
ViewVC logotype

Diff of /trunk/escript/src/Data.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2083 by caltinay, Fri Nov 21 01:28:31 2008 UTC revision 2084 by jfenwick, Fri Nov 21 05:20:42 2008 UTC
# Line 1722  Data::nonsymmetric() const Line 1722  Data::nonsymmetric() const
1722       }       }
1723  }  }
1724    
   
 // Doing a lazy version of this would require some thought.  
 // First it needs a parameter (which DataLazy doesn't support at the moment).  
 // (secondly although it does not apply to trace) we can't handle operations which return  
 // multiple results (like eigenvectors_values) or return values of different shapes to their input  
 // (like eigenvalues).  
1725  Data  Data
1726  Data::trace(int axis_offset) const  Data::trace(int axis_offset) const
1727  {  {    
1728       if (isLazy())       if (isLazy())
1729       {       {
1730      Data temp(*this);   // to get around the fact that you can't resolve a const Data      DataLazy* c=new DataLazy(borrowDataPtr(),TRACE,axis_offset);
1731      temp.resolve();      return Data(c);
     return temp.trace(axis_offset);  
1732       }       }
1733       DataTypes::ShapeType s=getDataPointShape();       DataTypes::ShapeType s=getDataPointShape();
1734       if (getDataPointRank()==2) {       if (getDataPointRank()==2) {
# Line 1789  Data::transpose(int axis_offset) const Line 1782  Data::transpose(int axis_offset) const
1782  {      {    
1783       if (isLazy())       if (isLazy())
1784       {       {
1785      Data temp(*this);   // to get around the fact that you can't resolve a const Data      DataLazy* c=new DataLazy(borrowDataPtr(),TRANS,axis_offset);
1786      temp.resolve();      return Data(c);
     return temp.transpose(axis_offset);  
1787       }       }
1788       DataTypes::ShapeType s=getDataPointShape();       DataTypes::ShapeType s=getDataPointShape();
1789       DataTypes::ShapeType ev_shape;       DataTypes::ShapeType ev_shape;

Legend:
Removed from v.2083  
changed lines
  Added in v.2084

  ViewVC Help
Powered by ViewVC 1.1.26