/[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 104 by jgs, Fri Dec 17 07:43:12 2004 UTC revision 106 by jgs, Thu Dec 23 07:20:12 2004 UTC
# Line 539  Data::ln() const Line 539  Data::ln() const
539    return escript::unaryOp(*this,(Data::UnaryDFunPtr)::log);    return escript::unaryOp(*this,(Data::UnaryDFunPtr)::log);
540  }  }
541    
542  double  Data
543  Data::Lsup() const  Data::sign() const
544  {  {
545    //    return escript::unaryOp(*this,escript::fsign);
   // set the initial absolute maximum value to zero  
   return algorithm(DataAlgorithmAdapter<AbsMax>(0));  
546  }  }
547    
548  double  Data
549  Data::sup() const  Data::abs() const
550  {  {
551    //    return escript::unaryOp(*this,(Data::UnaryDFunPtr)::fabs);
   // set the initial maximum value to min possible double  
   return algorithm(DataAlgorithmAdapter<FMax>(numeric_limits<double>::min()));  
552  }  }
553    
554  double  Data
555  Data::inf() const  Data::neg() const
556  {  {
557    //    return escript::unaryOp(*this,negate<double>());
   // set the initial minimum value to max possible double  
   return algorithm(DataAlgorithmAdapter<FMin>(numeric_limits<double>::max()));  
558  }  }
559    
560  Data  Data
561  Data::maxval() const  Data::pos() const
562  {  {
   // not implemented - will use dp_algorithm  
563    return (*this);    return (*this);
564  }  }
565    
566  Data  Data
567  Data::minval() const  Data::exp() const
568  {  {
569    // not implemented - will use dp_algorithm    return escript::unaryOp(*this,(Data::UnaryDFunPtr)::exp);
   return (*this);  
570  }  }
571    
572  Data  Data
573  Data::length() const  Data::sqrt() const
574  {  {
575    // not implemented - will use dp_algorithm    return escript::unaryOp(*this,(Data::UnaryDFunPtr)::sqrt);
   return (*this);  
576  }  }
577    
578  Data  double
579  Data::trace() const  Data::Lsup() const
580  {  {
581    // not implemented - will use dp_algorithm    //
582    return (*this);    // set the initial absolute maximum value to zero
583      return algorithm(DataAlgorithmAdapter<AbsMax>(0));
584  }  }
585    
586  Data  double
587  Data::transpose(int axis) const  Data::sup() const
588  {  {
589    // not implemented    //
590    return (*this);    // set the initial maximum value to min possible double
591      return algorithm(DataAlgorithmAdapter<FMax>(numeric_limits<double>::min()));
592  }  }
593    
594  Data  double
595  Data::sign() const  Data::inf() const
596  {  {
597    return escript::unaryOp(*this,escript::fsign);    //
598      // set the initial minimum value to max possible double
599      return algorithm(DataAlgorithmAdapter<FMin>(numeric_limits<double>::max()));
600  }  }
601    
602  Data  Data
603  Data::abs() const  Data::maxval() const
604  {  {
605    return escript::unaryOp(*this,(Data::UnaryDFunPtr)::fabs);    return dp_algorithm(DataAlgorithmAdapter<FMax>(numeric_limits<double>::min()));
606  }  }
607    
608  Data  Data
609  Data::neg() const  Data::minval() const
610  {  {
611    return escript::unaryOp(*this,negate<double>());    return dp_algorithm(DataAlgorithmAdapter<FMin>(numeric_limits<double>::max()));
612  }  }
613    
614  Data  Data
615  Data::pos() const  Data::length() const
616  {  {
617    return (*this);    return dp_algorithm(DataAlgorithmAdapter<Length>(0));
618  }  }
619    
620  Data  Data
621  Data::exp() const  Data::trace() const
622  {  {
623    return escript::unaryOp(*this,(Data::UnaryDFunPtr)::exp);    return dp_algorithm(DataAlgorithmAdapter<Trace>(0));
624  }  }
625    
626  Data  Data
627  Data::sqrt() const  Data::transpose(int axis) const
628  {  {
629    return escript::unaryOp(*this,(Data::UnaryDFunPtr)::sqrt);    // not implemented
630      throw DataException("Error - Data::transpose not implemented yet.");
631      return Data();
632  }  }
633    
634  void  void

Legend:
Removed from v.104  
changed lines
  Added in v.106

  ViewVC Help
Powered by ViewVC 1.1.26