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
Public Member Functions | Private Attributes | List of all members
lsst::meas::algorithms::shapelet::BVec Class Reference

#include <BVec.h>

Inheritance diagram for lsst::meas::algorithms::shapelet::BVec:
lsst::meas::algorithms::shapelet::AssignableToBVec lsst::meas::algorithms::ShapeletImpl

Public Member Functions

 BVec (int order, double sigma)
 
 BVec (int order, double sigma, double *bvec)
 
 BVec (int order, double sigma, const DVector &bvec)
 
 BVec (const BVec &rhs)
 
 ~BVec ()
 
BVecoperator= (const AssignableToBVec &rhs)
 
BVecoperator= (const BVec &rhs)
 
void assignTo (BVec &bvec) const
 
DVectorvec ()
 
const DVectorvec () const
 
double & operator() (int i)
 
double operator() (int i) const
 
int getOrder () const
 
double getSigma () const
 
const DVectorgetValues () const
 
size_t size () const
 
void setSigma (double sigma)
 
void setValues (const DVector &v)
 
template<typename V >
void setValues (const V &v)
 
void normalize ()
 
void conjugateSelf ()
 
- Public Member Functions inherited from lsst::meas::algorithms::shapelet::AssignableToBVec
virtual ~AssignableToBVec ()
 

Private Attributes

int _order
 
double _sigma
 
DVector _b
 

Detailed Description

Definition at line 25 of file BVec.h.

Constructor & Destructor Documentation

lsst::meas::algorithms::shapelet::BVec::BVec ( int  order,
double  sigma 
)
inline

Definition at line 30 of file BVec.h.

30  :
31  _order(order), _sigma(sigma),
32  _b((_order+1)*(_order+2)/2)
33  { _b.setZero(); }
afw::table::Key< double > sigma
Definition: GaussianPsf.cc:43
lsst::meas::algorithms::shapelet::BVec::BVec ( int  order,
double  sigma,
double *  bvec 
)
inline

Definition at line 35 of file BVec.h.

35  :
36  _order(order), _sigma(sigma),
37 #ifdef USE_TMV
38  _b((_order+1)*(_order+2)/2,bvec)
39 #else
40  _b(DVector::Map(bvec,(_order+1)*(_order+1)/2))
41 #endif
42  {}
afw::table::Key< double > sigma
Definition: GaussianPsf.cc:43
lsst::meas::algorithms::shapelet::BVec::BVec ( int  order,
double  sigma,
const DVector bvec 
)
inline

Definition at line 44 of file BVec.h.

44  :
45  _order(order), _sigma(sigma), _b(bvec)
46  {}
afw::table::Key< double > sigma
Definition: GaussianPsf.cc:43
lsst::meas::algorithms::shapelet::BVec::BVec ( const BVec rhs)
inline

Definition at line 48 of file BVec.h.

48  :
49  _order(rhs._order), _sigma(rhs._sigma), _b(rhs._b)
50  {}
lsst::meas::algorithms::shapelet::BVec::~BVec ( )
inline

Definition at line 52 of file BVec.h.

52 {}

Member Function Documentation

void lsst::meas::algorithms::shapelet::BVec::assignTo ( BVec bvec) const
virtual

Implements lsst::meas::algorithms::shapelet::AssignableToBVec.

Definition at line 51 of file BVec.cc.

52  {
53  rhs.setSigma(_sigma);
54  rhs.setValues(_b);
55  }
void lsst::meas::algorithms::shapelet::BVec::conjugateSelf ( )

Definition at line 70 of file BVec.cc.

71  {
72  const int N = getOrder();
73  for(int n=1,k=1;n<=N;++n) {
74  for(int m=n;m>=0;m-=2) {
75  if (m==0) ++k;
76  else {
77  _b(k+1) *= -1.0;
78  k+=2;
79  }
80  }
81  }
82  }
tuple m
Definition: lsstimport.py:48
int lsst::meas::algorithms::shapelet::BVec::getOrder ( ) const
inlinevirtual

Implements lsst::meas::algorithms::shapelet::AssignableToBVec.

Definition at line 64 of file BVec.h.

64 { return _order; }
double lsst::meas::algorithms::shapelet::BVec::getSigma ( ) const
inlinevirtual

Implements lsst::meas::algorithms::shapelet::AssignableToBVec.

Definition at line 65 of file BVec.h.

65 { return _sigma; }
const DVector& lsst::meas::algorithms::shapelet::BVec::getValues ( ) const
inline

Definition at line 66 of file BVec.h.

66 { return _b; }
void lsst::meas::algorithms::shapelet::BVec::normalize ( )
inline

Definition at line 84 of file BVec.h.

84 { _b /= _b(0); }
double& lsst::meas::algorithms::shapelet::BVec::operator() ( int  i)
inline

Definition at line 61 of file BVec.h.

61 { return _b(i); }
double lsst::meas::algorithms::shapelet::BVec::operator() ( int  i) const
inline

Definition at line 62 of file BVec.h.

62 { return _b(i); }
BVec & lsst::meas::algorithms::shapelet::BVec::operator= ( const AssignableToBVec rhs)

Definition at line 39 of file BVec.cc.

40  {
41  rhs.assignTo(*this);
42  return *this;
43  }
BVec & lsst::meas::algorithms::shapelet::BVec::operator= ( const BVec rhs)

Definition at line 45 of file BVec.cc.

46  {
47  rhs.assignTo(*this);
48  return *this;
49  }
void lsst::meas::algorithms::shapelet::BVec::setSigma ( double  sigma)
inline

Definition at line 69 of file BVec.h.

69 { _sigma = sigma; }
afw::table::Key< double > sigma
Definition: GaussianPsf.cc:43
void lsst::meas::algorithms::shapelet::BVec::setValues ( const DVector v)

Definition at line 57 of file BVec.cc.

58  {
59  if (_b.size() == v.size()) {
60  _b = v;
61  } else if (_b.size() > v.size()) {
62  _b.TMV_subVector(0,v.size()) = v;
63  _b.TMV_subVector(v.size(),_b.size()).setZero();
64  } else {
65  xdbg<<"Warning truncating information in BVec::setValues\n";
66  _b = v.TMV_subVector(0,_b.size());
67  }
68  }
#define xdbg
Definition: dbg.h:70
template<typename V >
void lsst::meas::algorithms::shapelet::BVec::setValues ( const V &  v)
inline

Definition at line 78 of file BVec.h.

79  {
80  Assert(v.size() == size());
81  _b = v;
82  }
#define Assert(x)
Definition: dbg.h:73
size_t lsst::meas::algorithms::shapelet::BVec::size ( ) const
inline

Definition at line 67 of file BVec.h.

67 { return _b.size(); }
DVector& lsst::meas::algorithms::shapelet::BVec::vec ( )
inline

Definition at line 59 of file BVec.h.

59 { return _b; }
const DVector& lsst::meas::algorithms::shapelet::BVec::vec ( ) const
inline

Definition at line 60 of file BVec.h.

60 { return _b; }

Member Data Documentation

DVector lsst::meas::algorithms::shapelet::BVec::_b
private

Definition at line 92 of file BVec.h.

int lsst::meas::algorithms::shapelet::BVec::_order
private

Definition at line 90 of file BVec.h.

double lsst::meas::algorithms::shapelet::BVec::_sigma
private

Definition at line 91 of file BVec.h.


The documentation for this class was generated from the following files: