LSSTApplications  11.0-13-gbb96280,12.1.rc1,12.1.rc1+1,12.1.rc1+2,12.1.rc1+5,12.1.rc1+8,12.1.rc1-1-g06d7636+1,12.1.rc1-1-g253890b+5,12.1.rc1-1-g3d31b68+7,12.1.rc1-1-g3db6b75+1,12.1.rc1-1-g5c1385a+3,12.1.rc1-1-g83b2247,12.1.rc1-1-g90cb4cf+6,12.1.rc1-1-g91da24b+3,12.1.rc1-2-g3521f8a,12.1.rc1-2-g39433dd+4,12.1.rc1-2-g486411b+2,12.1.rc1-2-g4c2be76,12.1.rc1-2-gc9c0491,12.1.rc1-2-gda2cd4f+6,12.1.rc1-3-g3391c73+2,12.1.rc1-3-g8c1bd6c+1,12.1.rc1-3-gcf4b6cb+2,12.1.rc1-4-g057223e+1,12.1.rc1-4-g19ed13b+2,12.1.rc1-4-g30492a7
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
double x
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
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