LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Legendre2D.h
Go to the documentation of this file.
1 #ifndef MeasAlgoShapeletLegendre2D_H
2 #define MeasAlgoShapeletLegendre2D_H
3 
4 #include <iostream>
6 
7 namespace lsst {
8 namespace meas {
9 namespace algorithms {
10 namespace shapelet {
11 
12  class Legendre2D : public Function2D
13  {
14 
15  public:
16 
18 
19  Legendre2D(double xMin,double xMax,double yMin,double yMax) :
20  Function2D(), _bounds(xMin,xMax,yMin,yMax) {}
21 
22  Legendre2D(const Bounds& b) : Function2D(), _bounds(b) {}
23 
24  Legendre2D(const Legendre2D& rhs) :
25  Function2D(rhs), _bounds(rhs._bounds) {}
26 
27  Legendre2D(const Bounds& b, const DMatrix& a) :
28  Function2D(a.TMV_colsize()-1,a.TMV_rowsize()-1,a), _bounds(b) {}
29 
30  Legendre2D(int xo, int yo, const Bounds& b) :
31  Function2D(xo,yo), _bounds(b) {}
32 
33  Legendre2D(std::istream& fin);
34 
35  virtual ~Legendre2D() {}
36 
37  virtual void write(std::ostream& fout) const;
38 
39  virtual std::auto_ptr<Function2D> dFdX() const;
40 
41  virtual std::auto_ptr<Function2D> dFdY() const;
42 
43  virtual std::auto_ptr<Function2D> copy() const
44  { return std::auto_ptr<Function2D>(new Legendre2D(*this)); }
45 
46  virtual void addLinear(double a, double b, double c);
47 
48  virtual void linearPreTransform(
49  double a, double b, double c, double d, double e, double f);
50 
51  virtual void operator+=(const Function2D& rhs);
52 
53  double getXMin() const {return _bounds.getXMin();}
54 
55  double getXMax() const {return _bounds.getXMax();}
56 
57  double getYMin() const {return _bounds.getYMin();}
58 
59  double getYMax() const {return _bounds.getYMax();}
60 
61  const Bounds& getBounds() const {return _bounds;}
62 
63  virtual void setFunction(
64  int xorder, int yorder, const DVector& fvect);
65 
66  private:
67 
69  using Function2D::_xOrder;
70  using Function2D::_yOrder;
71  using Function2D::_coeffs;
72 
74  int order,double xy,double min,double max) const;
75 
76  virtual DVector definePX(int order, double x) const;
77 
78  virtual DVector definePY(int order, double y) const;
79 
80  };
81 
82 }}}}
83 
84 #endif
int y
Legendre2D(double xMin, double xMax, double yMin, double yMax)
Definition: Legendre2D.h:19
#define TMV_rowsize()
Definition: MyMatrix.h:174
Legendre2D(int xo, int yo, const Bounds &b)
Definition: Legendre2D.h:30
virtual void write(std::ostream &fout) const
Definition: Legendre2D.cc:85
#define TMV_colsize()
Definition: MyMatrix.h:175
virtual std::auto_ptr< Function2D > dFdY() const
Definition: Legendre2D.cc:189
virtual DVector definePY(int order, double y) const
Definition: Legendre2D.cc:248
virtual std::auto_ptr< Function2D > copy() const
Definition: Legendre2D.h:43
DVector definePXY(int order, double xy, double min, double max) const
Definition: Legendre2D.cc:227
virtual void addLinear(double a, double b, double c)
Definition: Legendre2D.cc:107
int x
virtual void linearPreTransform(double a, double b, double c, double d, double e, double f)
Definition: Legendre2D.cc:119
virtual DVector definePX(int order, double x) const
Definition: Legendre2D.cc:238
afw::table::Key< double > b
virtual std::auto_ptr< Function2D > dFdX() const
Definition: Legendre2D.cc:149
virtual void operator+=(const Function2D &rhs)
Definition: Legendre2D.cc:126
virtual void setFunction(int xorder, int yorder, const DVector &fvect)
Definition: Legendre2D.cc:51
Legendre2D(const Bounds &b, const DMatrix &a)
Definition: Legendre2D.h:27