/[escript]/trunk/escript/src/WrappedArray.h
ViewVC logotype

Diff of /trunk/escript/src/WrappedArray.h

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

revision 2118 by jfenwick, Tue Dec 2 01:58:34 2008 UTC revision 2119 by jfenwick, Tue Dec 2 06:06:04 2008 UTC
# Line 29  public: Line 29  public:
29      WrappedArray(const boost::python::object& obj_in);      WrappedArray(const boost::python::object& obj_in);
30      unsigned int getRank() const;      unsigned int getRank() const;
31      const DataTypes::ShapeType& getShape() const;      const DataTypes::ShapeType& getShape() const;
32        double getElt() const;
33      double getElt(unsigned int i) const;      double getElt(unsigned int i) const;
34      double getElt(unsigned int i, unsigned int j) const;      double getElt(unsigned int i, unsigned int j) const;
35      double getElt(unsigned int i, unsigned int j, unsigned int k) const;      double getElt(unsigned int i, unsigned int j, unsigned int k) const;
# Line 36  public: Line 37  public:
37  private:  private:
38      const boost::python::object& obj;      const boost::python::object& obj;
39      int rank;      int rank;
40      DataTypes::ShapeType shape;      escript::DataTypes::ShapeType shape;
41        double m_scalar;
42  };  };
43    
44  inline unsigned int  inline unsigned int
# Line 52  WrappedArray::getShape() const Line 54  WrappedArray::getShape() const
54  }  }
55    
56  inline double  inline double
57   WrappedArray::getElt(unsigned int i) const  WrappedArray::getElt() const
58    {
59        return m_scalar;
60    }
61    
62    
63    inline double
64    WrappedArray::getElt(unsigned int i) const
65  {  {
66      return boost::python::extract<double>(obj[i]);      return boost::python::extract<double>(obj[i]);
67  }  }

Legend:
Removed from v.2118  
changed lines
  Added in v.2119

  ViewVC Help
Powered by ViewVC 1.1.26