# Diff of /trunk/escript/src/DataArrayView.h

revision 583 by gross, Wed Mar 8 08:15:34 2006 UTC revision 584 by gross, Thu Mar 9 23:03:38 2006 UTC
# Line 769  class DataArrayView { Line 769  class DataArrayView {
769                BinaryFunction operation,                BinaryFunction operation,
770                double initial_value) const;                double initial_value) const;
771
772     /**
773         \brief
774         Perform a matrix multiply of the given views.
775         This is purely a utility method and has no bearing on this view.
776
777         NB: Only multiplies together the two given views, ie: two data-points,
778         would need to call this over all data-points to multiply the entire
779         Data objects involved.
780
781         \param left - Input - The left hand side.
782         \param right - Input - The right hand side.
783         \param result - Output - The result of the operation.
784      */
785      static
786      void
787      matMult(const DataArrayView& left,
788              const DataArrayView& right,
789              DataArrayView& result);
790
791      /**
792         \brief
793         Determine the shape of the result array for a matrix multiplication
794         of the given views.
795         This is purely a utility method and has no bearing on this view.
796      */
797      static
798      ShapeType
799      determineResultShape(const DataArrayView& left,
800                           const DataArrayView& right);
801
802    /**    /**
803       \brief       \brief
804       solves a local eigenvalue problem       solves a local eigenvalue problem
# Line 781  class DataArrayView { Line 811  class DataArrayView {
811    static    static
812    inline    inline
813    void    void
814    DataArrayView::eigenvalues(DataArrayView& in,    eigenvalues(DataArrayView& in,
815                               ValueType::size_type inOffset,                ValueType::size_type inOffset,
816                               DataArrayView& ev,                DataArrayView& ev,
817                               ValueType::size_type evOffset)                ValueType::size_type evOffset)
818   {    {
819     double in00,in10,in20,in01,in11,in21,in02,in12,in22;     double in00,in10,in20,in01,in11,in21,in02,in12,in22;
820     double ev0,ev1,ev2;     double ev0,ev1,ev2;
821     int s=in.getShape()[0];     int s=in.getShape()[0];
# Line 820  class DataArrayView { Line 850  class DataArrayView {
850        (*(ev.m_data))[evOffset+ev.index(2)]=ev2;        (*(ev.m_data))[evOffset+ev.index(2)]=ev2;
851
852     }     }
853   }    }
854
855    /**    /**
856       \brief       \brief
# Line 837  class DataArrayView { Line 867  class DataArrayView {
867    static    static
868    inline    inline
869    void    void
870    DataArrayView::eigenvalues_and_eigenvectors(DataArrayView& in,    eigenvalues_and_eigenvectors(DataArrayView& in,
871                                                ValueType::size_type inOffset,                                 ValueType::size_type inOffset,
872                                                DataArrayView& ev,                                 DataArrayView& ev,
873                                                ValueType::size_type evOffset,                                 ValueType::size_type evOffset,
874                                                DataArrayView& V,                                 DataArrayView& V,
875                                                ValueType::size_type VOffset,                                 ValueType::size_type VOffset,
876                                                const double tol=1.e-13)                                 const double tol=1.e-13)
877    {    {
878     double in00,in10,in20,in01,in11,in21,in02,in12,in22;     double in00,in10,in20,in01,in11,in21,in02,in12,in22;
879     double V00,V10,V20,V01,V11,V21,V02,V12,V22;     double V00,V10,V20,V01,V11,V21,V02,V12,V22;
# Line 895  class DataArrayView { Line 925  class DataArrayView {
925
926     }     }
927   }   }
/**
\brief
Perform a matrix multiply of the given views.
This is purely a utility method and has no bearing on this view.

NB: Only multiplies together the two given views, ie: two data-points,
would need to call this over all data-points to multiply the entire
Data objects involved.

\param left - Input - The left hand side.
\param right - Input - The right hand side.
\param result - Output - The result of the operation.
*/
static
void
matMult(const DataArrayView& left,
const DataArrayView& right,
DataArrayView& result);

/**
\brief
Determine the shape of the result array for a matrix multiplication
of the given views.
This is purely a utility method and has no bearing on this view.
*/
static
ShapeType
determineResultShape(const DataArrayView& left,
const DataArrayView& right);

928   protected:   protected:
929
930   private:   private:

Legend:
 Removed from v.583 changed lines Added in v.584