/[escript]/branches/schroedinger/escript/src/DataMaths.h
ViewVC logotype

Diff of /branches/schroedinger/escript/src/DataMaths.h

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

revision 1900 by jfenwick, Tue Oct 14 03:54:42 2008 UTC revision 1901 by jfenwick, Wed Oct 22 02:44:34 2008 UTC
# Line 18  Line 18 
18  #include "DataException.h"  #include "DataException.h"
19  #include "LocalOps.h"  #include "LocalOps.h"
20    
21    /**
22    \file DataMaths.h
23    \brief Describes binary operations performed on DataVector.
24    
25    
26    For operations on DataAbstract see BinaryOp.h.
27    For operations on double* see LocalOps.h.
28    */
29    
30    
31  namespace escript  namespace escript
32  {  {
33  namespace DataMaths  namespace DataMaths
# Line 31  In order to properly identify the datapo Line 41  In order to properly identify the datapo
41  Note that vector in this context refers to a data vector storing datapoints not a mathematical vector. (However, datapoints within the data vector could represent scalars, vectors, matricies, ...).  Note that vector in this context refers to a data vector storing datapoints not a mathematical vector. (However, datapoints within the data vector could represent scalars, vectors, matricies, ...).
42  */  */
43    
 //  /**  
 //     \brief  
 //     Perform the unary operation on the data point specified by the view's  
 //     default offset. Applies the specified operation to each value in the data  
 //     point.  
 //  
 //     Called by escript::unaryOp.  
 //  
 //     \param operation - Input -  
 //                  Operation to apply. Operation must be a pointer to a function.  
 //  */  
 //   template <class UnaryFunction>  
 //   void  
 //   unaryOp(DataAbstract& data, UnaryFunction operation);  
   
 // I'm going to try not to have the above function. It relies on the value of the offset already  
 // being known.   I don't want that, offsets need to be explicit.  
   
   
44    
45    /**    /**
46       \brief       \brief
# Line 71  Note that vector in this context refers Line 62  Note that vector in this context refers
62            DataTypes::ValueType::size_type offset,            DataTypes::ValueType::size_type offset,
63            UnaryFunction operation);            UnaryFunction operation);
64    
 //  /**  
 //     \brief  
 //     Perform the binary operation on the data points specified by the default  
 //     offsets in this view and in view "right". Applies the specified operation  
 //     to corresponding values in both data points. Operation must be a pointer  
 //     to a function.  
 //  
 //     Called by escript::binaryOp.  
 //  
 //     \param right - Input -  
 //                  View to act as RHS in given binary operation.  
 //     \param operation - Input -  
 //                  Operation to apply. Must be a pointer to a function.  
 //  */  
 //   template <class BinaryFunction>  
 //   void  
 //   binaryOp(DataAbstract& left, const DataAbstract& right,  
 //            BinaryFunction operation);  
   
 // trying to avoid having this one as well. Again, implicit offset  
   
65    /**    /**
66       \brief       \brief
67       Perform the binary operation on the data points specified by the given       Perform the binary operation on the data points specified by the given
# Line 140  Note that vector in this context refers Line 110  Note that vector in this context refers
110             double right,             double right,
111             BinaryFunction operation);             BinaryFunction operation);
112    
 //  /**  
 //     \brief  
 //     Perform the given data point reduction operation on the data point  
 //     specified by the default offset into the view. Reduces all elements of  
 //     the data point using the given operation, returning the result as a  
 //     scalar. Operation must be a pointer to a function.  
 //  
 //     Called by escript::algorithm.  
 //  
 //     \param operation - Input -  
 //                  Operation to apply. Must be a pointer to a function.  
 //  */  
 //   template <class BinaryFunction>  
 //   double  
 //   reductionOp(const DataAbstract& left, BinaryFunction operation,  
 //               double initial_value);  
   
 // implicit offset  
   
113    /**    /**
114       \brief       \brief
115       Perform the given data point reduction operation on the data point       Perform the given data point reduction operation on the data point
# Line 852  Note that vector in this context refers Line 803  Note that vector in this context refers
803     Inline function definitions.     Inline function definitions.
804  */  */
805    
 // template <class UnaryFunction>  
 // inline  
 // void  
 // DataArrayView::unaryOp(UnaryFunction operation)  
 // {  
 //   unaryOp(m_offset,operation);  
 // }  
   
   
806  inline  inline
807  bool  bool
808  checkOffset(const DataTypes::ValueType& data,  checkOffset(const DataTypes::ValueType& data,

Legend:
Removed from v.1900  
changed lines
  Added in v.1901

  ViewVC Help
Powered by ViewVC 1.1.26