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

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

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

revision 97 by jgs, Tue Dec 14 05:39:33 2004 UTC revision 100 by jgs, Wed Dec 15 03:48:48 2004 UTC
# Line 38  Line 38 
38  #include "escript/Data/DataAlgorithm.h"  #include "escript/Data/DataAlgorithm.h"
39  #include "escript/Data/FunctionSpaceFactory.h"  #include "escript/Data/FunctionSpaceFactory.h"
40  #include "escript/Data/AbstractContinuousDomain.h"  #include "escript/Data/AbstractContinuousDomain.h"
 #include "escript/Data/UnaryFuncs.h"  
41    
42  using namespace std;  using namespace std;
43  using namespace boost::python;  using namespace boost::python;
# Line 50  Data::Data() Line 49  Data::Data()
49    //    //
50    // Default data is type DataEmpty    // Default data is type DataEmpty
51    DataAbstract* temp=new DataEmpty();    DataAbstract* temp=new DataEmpty();
52    shared_ptr<DataAbstract> temp_data(temp);    m_data=shared_ptr<DataAbstract>(temp);
   m_data=temp_data;  
53  }  }
54    
55  Data::Data(double value,  Data::Data(double value,
# Line 77  Data::Data(double value, Line 75  Data::Data(double value,
75    initialise(temp.getView(),what,expanded);    initialise(temp.getView(),what,expanded);
76  }  }
77    
78  Data::Data(const Data& inData)  Data::Data(const Data& inData):
79      m_data(inData.m_data)
80  {  {
   m_data=inData.m_data;  
81  }  }
82    
83  Data::Data(const Data& inData,  Data::Data(const Data& inData,
84             const DataArrayView::RegionType& region)             const DataArrayView::RegionType& region)
85  {  {
86    //    //
87    // Create Data which is a slice of another Data    // Create data which is a subset(slice) of another Data
88    DataAbstract* tmp = inData.m_data->getSlice(region);    DataAbstract* tmp=inData.m_data->getSlice(region);
89    shared_ptr<DataAbstract> temp_data(tmp);    m_data=shared_ptr<DataAbstract>(tmp);
   m_data=temp_data;  
90  }  }
91    
92  Data::Data(const Data& inData,  Data::Data(const Data& inData,
# Line 120  Data::Data(const DataTagged::TagListType Line 117  Data::Data(const DataTagged::TagListType
117             bool expanded)             bool expanded)
118  {  {
119    DataAbstract* temp=new DataTagged(tagKeys,values,defaultValue,what);    DataAbstract* temp=new DataTagged(tagKeys,values,defaultValue,what);
120    shared_ptr<DataAbstract> temp_data(temp);    m_data=shared_ptr<DataAbstract>(temp);
   m_data=temp_data;  
121    if (expanded) {    if (expanded) {
122      expand();      expand();
123    }    }
# Line 216  Data::copy(const Data& other) Line 212  Data::copy(const Data& other)
212        //        //
213        // Construct a DataExpanded copy        // Construct a DataExpanded copy
214        DataAbstract* newData=new DataExpanded(*temp);        DataAbstract* newData=new DataExpanded(*temp);
215        shared_ptr<DataAbstract> temp_data(newData);        m_data=shared_ptr<DataAbstract>(newData);
       m_data=temp_data;  
216        return;        return;
217      }      }
218    }    }
# Line 225  Data::copy(const Data& other) Line 220  Data::copy(const Data& other)
220      DataTagged* temp=dynamic_cast<DataTagged*>(other.m_data.get());      DataTagged* temp=dynamic_cast<DataTagged*>(other.m_data.get());
221      if (temp!=0) {      if (temp!=0) {
222        //        //
223        // Construct a DataTagged copy        // Construct a DataTaggeded copy
224        DataAbstract* newData=new DataTagged(*temp);        DataAbstract* newData=new DataTagged(*temp);
225        shared_ptr<DataAbstract> temp_data(newData);        m_data=shared_ptr<DataAbstract>(newData);
       m_data=temp_data;  
226        return;        return;
227      }      }
228    }    }
# Line 238  Data::copy(const Data& other) Line 232  Data::copy(const Data& other)
232        //        //
233        // Construct a DataConstant copy        // Construct a DataConstant copy
234        DataAbstract* newData=new DataConstant(*temp);        DataAbstract* newData=new DataConstant(*temp);
235        shared_ptr<DataAbstract> temp_data(newData);        m_data=shared_ptr<DataAbstract>(newData);
       m_data=temp_data;  
       return;  
     }  
   }  
   {  
     DataEmpty* temp=dynamic_cast<DataEmpty*>(other.m_data.get());  
     if (temp!=0) {  
       //  
       // Construct a DataEmpty copy  
       DataAbstract* newData=new DataEmpty();  
       shared_ptr<DataAbstract> temp_data(newData);  
       m_data=temp_data;  
236        return;        return;
237      }      }
238    }    }
# Line 302  Data::isConstant() const Line 284  Data::isConstant() const
284    return (temp!=0);    return (temp!=0);
285  }  }
286    
287    Data
288    Data::getSlice(const DataArrayView::RegionType& region) const
289    {
290      return Data(*this,region);
291    }
292    
293    void
294    Data::setSlice(const Data& value,
295                   const DataArrayView::RegionType& region)
296    {
297      m_data->setSlice(value.m_data.get(), region);
298    }
299    
300  void  void
301  Data::expand()  Data::expand()
302  {  {
303    if (isConstant()) {    if (isConstant()) {
304      DataConstant* tempDataConst=dynamic_cast<DataConstant*>(m_data.get());      DataConstant* tempDataConst=dynamic_cast<DataConstant*>(m_data.get());
305      DataAbstract* temp=new DataExpanded(*tempDataConst);      DataAbstract* temp=new DataExpanded(*tempDataConst);
306      shared_ptr<DataAbstract> temp_data(temp);      m_data=shared_ptr<DataAbstract>(temp);
     m_data=temp_data;  
307    } else if (isTagged()) {    } else if (isTagged()) {
308      DataTagged* tempDataTag=dynamic_cast<DataTagged*>(m_data.get());      DataTagged* tempDataTag=dynamic_cast<DataTagged*>(m_data.get());
309      DataAbstract* temp=new DataExpanded(*tempDataTag);      DataAbstract* temp=new DataExpanded(*tempDataTag);
310      shared_ptr<DataAbstract> temp_data(temp);      m_data=shared_ptr<DataAbstract>(temp);
     m_data=temp_data;  
311    } else if (isExpanded()) {    } else if (isExpanded()) {
312      //      //
313      // do nothing      // do nothing
# Line 326  Data::expand() Line 319  Data::expand()
319  }  }
320    
321  void  void
322    Data::reshapeDataPoint(const DataArrayView::ShapeType& shape)
323    {
324      m_data->reshapeDataPoint(shape);
325    }
326    
327    void
328  Data::tag()  Data::tag()
329  {  {
330    if (isConstant()) {    if (isConstant()) {
331      DataConstant* tempDataConst=dynamic_cast<DataConstant*>(m_data.get());      DataConstant* tempDataConst=dynamic_cast<DataConstant*>(m_data.get());
332      DataAbstract* temp=new DataTagged(*tempDataConst);      DataAbstract* temp=new DataTagged(*tempDataConst);
333      shared_ptr<DataAbstract> temp_data(temp);      m_data=shared_ptr<DataAbstract>(temp);
     m_data=temp_data;  
334    } else if (isTagged()) {    } else if (isTagged()) {
335      // do nothing      // do nothing
336    } else if (isExpanded()) {    } else if (isExpanded()) {
# Line 344  Data::tag() Line 342  Data::tag()
342    }    }
343  }  }
344    
 void  
 Data::reshapeDataPoint(const DataArrayView::ShapeType& shape)  
 {  
   m_data->reshapeDataPoint(shape);  
 }  
   
345  Data  Data
346  Data::wherePositive() const  Data::wherePositive() const
347  {  {
# Line 357  Data::wherePositive() const Line 349  Data::wherePositive() const
349  }  }
350    
351  Data  Data
 Data::whereNegative() const  
 {  
   return escript::unaryOp(*this,bind2nd(less<double>(),0.0));  
 }  
   
 Data  
352  Data::whereNonNegative() const  Data::whereNonNegative() const
353  {  {
354    return escript::unaryOp(*this,bind2nd(greater_equal<double>(),0.0));    return escript::unaryOp(*this,bind2nd(greater_equal<double>(),0.0));
355  }  }
356    
357  Data  Data
358  Data::whereNonPositive() const  Data::whereNegative() const
359  {  {
360    return escript::unaryOp(*this,bind2nd(less_equal<double>(),0.0));    return escript::unaryOp(*this,bind2nd(less<double>(),0.0));
361  }  }
362    
363  Data  Data
# Line 381  Data::whereZero() const Line 367  Data::whereZero() const
367  }  }
368    
369  Data  Data
 Data::whereNonZero() const  
 {  
   return escript::unaryOp(*this,bind2nd(not_equal_to<double>(),0.0));  
 }  
   
 Data  
370  Data::interpolate(const FunctionSpace& functionspace) const  Data::interpolate(const FunctionSpace& functionspace) const
371  {  {
372    return Data(*this,functionspace);    return Data(*this,functionspace);
# Line 543  double Line 523  double
523  Data::Lsup() const  Data::Lsup() const
524  {  {
525    //    //
526    // set the initial absolute maximum value to zero    // set the initial absolute maximum value to min possible
527    return algorithm(DataAlgorithmAdapter<AbsMax>(0));    return algorithm(DataAlgorithmAdapter<AbsMax>(numeric_limits<double>::min()));
528  }  }
529    
530  double  double
531  Data::sup() const  Data::sup() const
532  {  {
533    //    //
534    // set the initial maximum value to min possible double    // set the initial maximum value to min possible
535    return algorithm(DataAlgorithmAdapter<FMax>(numeric_limits<double>::min()));    return algorithm(DataAlgorithmAdapter<FMax>(numeric_limits<double>::min()));
536  }  }
537    
# Line 559  double Line 539  double
539  Data::inf() const  Data::inf() const
540  {  {
541    //    //
542    // set the initial minimum value to max possible double    // set the initial minimum value to max possible
543    return algorithm(DataAlgorithmAdapter<FMin>(numeric_limits<double>::max()));    return algorithm(DataAlgorithmAdapter<FMin>(numeric_limits<double>::max()));
544  }  }
545    
546  Data  Data& Data::operator+=(const Data& right)
 Data::maxval() const  
 {  
   // not implemented - will use dp_algorithm  
   return (*this);  
 }  
   
 Data  
 Data::minval() const  
 {  
   // not implemented - will use dp_algorithm  
   return (*this);  
 }  
   
 Data  
 Data::length() const  
 {  
   // not implemented - will use dp_algorithm  
   return (*this);  
 }  
   
 Data  
 Data::trace() const  
 {  
   // not implemented - will use dp_algorithm  
   return (*this);  
 }  
   
 Data  
 Data::transpose(int axis) const  
 {  
   // not implemented  
   return (*this);  
 }  
   
 Data  
 Data::sign() const  
 {  
   return escript::unaryOp(*this,escript::fsign);  
 }  
   
 Data  
 Data::abs() const  
 {  
   return escript::unaryOp(*this,(Data::UnaryDFunPtr)::fabs);  
 }  
   
 Data  
 Data::neg() const  
 {  
   return escript::unaryOp(*this,negate<double>());  
 }  
   
 Data  
 Data::pos() const  
 {  
   return (*this);  
 }  
   
 Data  
 Data::exp() const  
 {  
   return escript::unaryOp(*this,(Data::UnaryDFunPtr)::exp);  
 }  
   
 Data  
 Data::sqrt() const  
 {  
   return escript::unaryOp(*this,(Data::UnaryDFunPtr)::sqrt);  
 }  
   
 Data&  
 Data::operator+=(const Data& right)  
547  {  {
548    binaryOp(right,plus<double>());    binaryOp(right,plus<double>());
549    return (*this);    return (*this);
550  }  }
551    
552  Data&  Data& Data::operator+=(const boost::python::object& right)
 Data::operator+=(const boost::python::object& right)  
553  {  {
554    binaryOp(right,plus<double>());    binaryOp(right,plus<double>());
555    return (*this);    return (*this);
556  }  }
557    
558  Data&  Data& Data::operator-=(const Data& right)
 Data::operator-=(const Data& right)  
559  {  {
560    binaryOp(right,minus<double>());    binaryOp(right,minus<double>());
561    return (*this);    return (*this);
562  }  }
563    
564  Data&  Data& Data::operator-=(const boost::python::object& right)
 Data::operator-=(const boost::python::object& right)  
565  {  {
566    binaryOp(right,minus<double>());    binaryOp(right,minus<double>());
567    return (*this);    return (*this);
568  }  }
569    
570  Data&  Data& Data::operator*=(const Data& right)
 Data::operator*=(const Data& right)  
571  {  {
572    binaryOp(right,multiplies<double>());    binaryOp(right,multiplies<double>());
573    return (*this);    return (*this);
574  }  }
575    
576  Data&  Data& Data::operator*=(const boost::python::object& right)
 Data::operator*=(const boost::python::object& right)  
577  {  {
578    binaryOp(right,multiplies<double>());    binaryOp(right,multiplies<double>());
579    return (*this);    return (*this);
580  }  }
581    
582  Data&  Data& Data::operator/=(const Data& right)
 Data::operator/=(const Data& right)  
583  {  {
584    binaryOp(right,divides<double>());    binaryOp(right,divides<double>());
585    return (*this);    return (*this);
586  }  }
587    
588  Data&  Data& Data::operator/=(const boost::python::object& right)
 Data::operator/=(const boost::python::object& right)  
589  {  {
590    binaryOp(right,divides<double>());    binaryOp(right,divides<double>());
591    return (*this);    return (*this);
592  }  }
593    
594  Data  Data Data::powO(const boost::python::object& right) const
 Data::powO(const boost::python::object& right) const  
595  {  {
596    Data result;    Data result;
597    result.copy(*this);    result.copy(*this);
# Line 699  Data::powO(const boost::python::object& Line 599  Data::powO(const boost::python::object&
599    return result;    return result;
600  }  }
601    
602  Data  Data Data::powD(const Data& right) const
 Data::powD(const Data& right) const  
603  {  {
604    Data result;    Data result;
605    result.copy(*this);    result.copy(*this);
# Line 710  Data::powD(const Data& right) const Line 609  Data::powD(const Data& right) const
609    
610  //  //
611  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
612  Data  Data escript::operator+(const Data& left, const Data& right)
 escript::operator+(const Data& left, const Data& right)  
613  {  {
614    Data result;    Data result;
615    //    //
# Line 723  escript::operator+(const Data& left, con Line 621  escript::operator+(const Data& left, con
621    
622  //  //
623  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
624  Data  Data escript::operator-(const Data& left, const Data& right)
 escript::operator-(const Data& left, const Data& right)  
625  {  {
626    Data result;    Data result;
627    //    //
# Line 736  escript::operator-(const Data& left, con Line 633  escript::operator-(const Data& left, con
633    
634  //  //
635  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
636  Data  Data escript::operator*(const Data& left, const Data& right)
 escript::operator*(const Data& left, const Data& right)  
637  {  {
638    Data result;    Data result;
639    //    //
# Line 749  escript::operator*(const Data& left, con Line 645  escript::operator*(const Data& left, con
645    
646  //  //
647  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
648  Data  Data escript::operator/(const Data& left, const Data& right)
 escript::operator/(const Data& left, const Data& right)  
649  {  {
650    Data result;    Data result;
651    //    //
# Line 762  escript::operator/(const Data& left, con Line 657  escript::operator/(const Data& left, con
657    
658  //  //
659  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
660  Data  Data escript::operator+(const Data& left, const boost::python::object& right)
 escript::operator+(const Data& left, const boost::python::object& right)  
661  {  {
662    //    //
663    // Convert to DataArray format if possible    // Convert to DataArray format if possible
# Line 778  escript::operator+(const Data& left, con Line 672  escript::operator+(const Data& left, con
672    
673  //  //
674  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
675  Data  Data escript::operator-(const Data& left, const boost::python::object& right)
 escript::operator-(const Data& left, const boost::python::object& right)  
676  {  {
677    //    //
678    // Convert to DataArray format if possible    // Convert to DataArray format if possible
# Line 794  escript::operator-(const Data& left, con Line 687  escript::operator-(const Data& left, con
687    
688  //  //
689  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
690  Data  Data escript::operator*(const Data& left, const boost::python::object& right)
 escript::operator*(const Data& left, const boost::python::object& right)  
691  {  {
692    //    //
693    // Convert to DataArray format if possible    // Convert to DataArray format if possible
# Line 810  escript::operator*(const Data& left, con Line 702  escript::operator*(const Data& left, con
702    
703  //  //
704  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
705  Data  Data escript::operator/(const Data& left, const boost::python::object& right)
 escript::operator/(const Data& left, const boost::python::object& right)  
706  {  {
707    //    //
708    // Convert to DataArray format if possible    // Convert to DataArray format if possible
# Line 826  escript::operator/(const Data& left, con Line 717  escript::operator/(const Data& left, con
717    
718  //  //
719  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
720  Data  Data escript::operator+(const boost::python::object& left, const Data& right)
 escript::operator+(const boost::python::object& left, const Data& right)  
721  {  {
722    //    //
723    // Construct the result using the given value and the other parameters    // Construct the result using the given value and the other parameters
# Line 839  escript::operator+(const boost::python:: Line 729  escript::operator+(const boost::python::
729    
730  //  //
731  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
732  Data  Data escript::operator-(const boost::python::object& left, const Data& right)
 escript::operator-(const boost::python::object& left, const Data& right)  
733  {  {
734    //    //
735    // Construct the result using the given value and the other parameters    // Construct the result using the given value and the other parameters
# Line 852  escript::operator-(const boost::python:: Line 741  escript::operator-(const boost::python::
741    
742  //  //
743  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
744  Data  Data escript::operator*(const boost::python::object& left, const Data& right)
 escript::operator*(const boost::python::object& left, const Data& right)  
745  {  {
746    //    //
747    // Construct the result using the given value and the other parameters    // Construct the result using the given value and the other parameters
# Line 865  escript::operator*(const boost::python:: Line 753  escript::operator*(const boost::python::
753    
754  //  //
755  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
756  Data  Data escript::operator/(const boost::python::object& left, const Data& right)
 escript::operator/(const boost::python::object& left, const Data& right)  
757  {  {
758    //    //
759    // Construct the result using the given value and the other parameters    // Construct the result using the given value and the other parameters
# Line 878  escript::operator/(const boost::python:: Line 765  escript::operator/(const boost::python::
765    
766  //  //
767  // NOTE: It is essential to specify the namepsace this operator belongs to  // NOTE: It is essential to specify the namepsace this operator belongs to
768  //bool escript::operator==(const Data& left, const Data& right)  bool escript::operator==(const Data& left, const Data& right)
 //{  
 //  /*  
 //  NB: this operator does very little at this point, and isn't to  
 //  be relied on. Requires further implementation.  
 //  */  
 //  
 //  bool ret;  
 //  
 //  if (left.isEmpty()) {  
 //    if(!right.isEmpty()) {  
 //      ret = false;  
 //    } else {  
 //      ret = true;  
 //    }  
 //  }  
 //  
 //  if (left.isConstant()) {  
 //    if(!right.isConstant()) {  
 //      ret = false;  
 //    } else {  
 //      ret = true;  
 //    }  
 // }  
 //  
 //  if (left.isTagged()) {  
 //   if(!right.isTagged()) {  
 //      ret = false;  
 //    } else {  
 //      ret = true;  
 //    }  
 //  }  
 //  
 //  if (left.isExpanded()) {  
 //    if(!right.isExpanded()) {  
 //      ret = false;  
 //    } else {  
 //      ret = true;  
 //    }  
 //  }  
 //  
 //  return ret;  
 //}  
   
 Data  
 Data::getItem(const boost::python::object& key) const  
769  {  {
770    const DataArrayView& view=getPointDataView();    /*
771      NB: this operator does very little at this point, and isn't to
772      be relied on. Requires further implementation.
773      */
774    
775      bool ret;
776    
777      if (left.isEmpty()) {
778        if(!right.isEmpty()) {
779          ret = false;
780        } else {
781          ret = true;
782        }
783      }
784    
785    DataArrayView::RegionType slice_region=view.getSliceRegion(key);    if (left.isConstant()) {
786        if(!right.isConstant()) {
787          ret = false;
788        } else {
789          ret = true;
790        }
791      }
792    
793    if (slice_region.size()!=view.getRank()) {    if (left.isTagged()) {
794      throw DataException("Error - slice size does not match Data rank.");      if(!right.isTagged()) {
795          ret = false;
796        } else {
797          ret = true;
798        }
799    }    }
800    
801    return getSlice(slice_region);    if (left.isExpanded()) {
802  }      if(!right.isExpanded()) {
803          ret = false;
804        } else {
805          ret = true;
806        }
807      }
808    
809  Data    return ret;
 Data::getSlice(const DataArrayView::RegionType& region) const  
 {  
   return Data(*this,region);  
810  }  }
811    
812  void  Data
813  Data::setItemO(const boost::python::object& key,  Data::getItem(const boost::python::object& key) const
                const boost::python::object& value)  
814  {  {
815    Data tempData(value,getFunctionSpace());     const DataArrayView& view=getPointDataView();
816    setItemD(key,tempData);     DataArrayView::RegionType slice_region=view.getSliceRegion(key);
817       if (slice_region.size()!=view.getRank()) {
818         throw DataException("Error - slice size does not match Data rank.");
819         return Data();
820       }
821       //
822       // Create a new Data which is a slice of this one
823       return getSlice(slice_region);
824  }  }
825    
826  void  void
827  Data::setItemD(const boost::python::object& key,  Data::setItem(const boost::python::object& key,
828                 const Data& value)                const Data& value)
829  {  {
830    const DataArrayView& view=getPointDataView();    const DataArrayView& view=getPointDataView();
831    DataArrayView::RegionType slice_region=view.getSliceRegion(key);    DataArrayView::RegionType slice_region=view.getSliceRegion(key);
832    if (slice_region.size()!=view.getRank()) {    if (slice_region.size()!=view.getRank()) {
833      throw DataException("Error - slice size does not match Data rank.");      throw DataException("Error - slice size does not match Data rank.");
834    }    }
835      typeMatch(value);
836    setSlice(value,slice_region);    setSlice(value,slice_region);
837  }  }
838    
839  void  void
840  Data::setSlice(const Data& value,  Data::typeMatch(const Data& right)
                const DataArrayView::RegionType& region)  
 {  
   Data tempValue(value);  
   typeMatchLeft(tempValue);  
   typeMatchRight(tempValue);  
   m_data->setSlice(tempValue.m_data.get(),region);  
 }  
   
 void  
 Data::typeMatchLeft(Data& right) const  
 {  
   if (isExpanded()){  
     right.expand();  
   } else if (isTagged()) {  
     if (right.isConstant()) {  
       right.tag();  
     }  
   }  
 }  
   
 void  
 Data::typeMatchRight(const Data& right)  
841  {  {
842      //
843      // match the type of this to the RHS
844    if (isTagged()) {    if (isTagged()) {
845      if (right.isExpanded()) {      if (right.isExpanded()) {
846          //
847          // if the right hand side is expanded so must this
848        expand();        expand();
849      }      }
850    } else if (isConstant()) {    } else if (isConstant()) {
851      if (right.isExpanded()) {      if (right.isExpanded()) {
852          //
853          // if the right hand side is expanded so must this
854        expand();        expand();
855      } else if (right.isTagged()) {      } else if (right.isTagged()) {
856          //
857          // if the right hand side is tagged so must this
858        tag();        tag();
859      }      }
860    }    }

Legend:
Removed from v.97  
changed lines
  Added in v.100

  ViewVC Help
Powered by ViewVC 1.1.26