LSSTApplications  18.1.0
LSSTDataManagementBasePackage
Public Member Functions | List of all members
lsst::afw::image::pixel::variance_divides< T1 > Struct Template Reference

Calculate the variance when we divide two Pixels. More...

#include <Pixel.h>

Public Member Functions

T1 operator() (T1 const &x, T1 const &y, T1 const &vx, T1 const &vy) const
 
T1 operator() (T1 const &, T1 const &y, T1 const &vx) const
 

Detailed Description

template<typename T1>
struct lsst::afw::image::pixel::variance_divides< T1 >

Calculate the variance when we divide two Pixels.

Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,

Definition at line 47 of file Pixel.h.

Member Function Documentation

◆ operator()() [1/2]

template<typename T1 >
T1 lsst::afw::image::pixel::variance_divides< T1 >::operator() ( T1 const &  x,
T1 const &  y,
T1 const &  vx,
T1 const &  vy 
) const
inline

Definition at line 360 of file Pixel.h.

360  {
361  T1 const x2 = x * x;
362  T1 const y2 = y * y;
363  T1 const iy2 = 1.0 / y2;
364  return x2 * vy * iy2 * iy2 + vx * iy2;
365  }
int y
Definition: SpanSet.cc:49
double x

◆ operator()() [2/2]

template<typename T1 >
T1 lsst::afw::image::pixel::variance_divides< T1 >::operator() ( T1 const &  ,
T1 const &  y,
T1 const &  vx 
) const
inline

Definition at line 367 of file Pixel.h.

367 { return vx / (y * y); }
int y
Definition: SpanSet.cc:49

The documentation for this struct was generated from the following file: