lsst.afw  14.0-25-g0e8fc950e+5
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
lsst::afw::geom::LinearFunctor Class Reference

Concrete implementation of Functor subclass for testing. More...

#include <Functor.h>

Inheritance diagram for lsst::afw::geom::LinearFunctor:
lsst::afw::geom::Functor lsst::daf::base::Citizen

Public Types

typedef unsigned long memId
 
typedef memId(* memNewCallback) (const memId cid)
 
typedef memId(* memCallback) (const Citizen *ptr)
 

Public Member Functions

 LinearFunctor (double slope, double intercept)
 
 ~LinearFunctor ()
 
virtual std::shared_ptr< Functor > clone () const
 
virtual double operator() (double x) const
 
virtual double derivative (double x) const
 
virtual double inverse (double y, double tol=1e-10, unsigned int maxiter=1000) const
 
std::string repr () const
 
void markPersistent (void)
 
memId getId () const
 

Static Public Member Functions

static bool hasBeenCorrupted ()
 
static memId getNextMemId ()
 
static int init ()
 
static int census (int, memId startingMemId=0)
 
static void census (std::ostream &stream, memId startingMemId=0)
 
static const std::vector< const Citizen *> * census ()
 
static int census (int, memId startingMemId=0)
 
static void census (std::ostream &stream, memId startingMemId=0)
 
static const std::vector< const Citizen *> * census ()
 
static memId setNewCallbackId (memId id)
 
static memId setNewCallbackId (memId id)
 
static memId setDeleteCallbackId (memId id)
 
static memId setDeleteCallbackId (memId id)
 
static memNewCallback setNewCallback (memNewCallback func)
 
static memCallback setDeleteCallback (memCallback func)
 
static memCallback setCorruptionCallback (memCallback func)
 

Public Attributes

 magicSentinel
 

Detailed Description

Concrete implementation of Functor subclass for testing.

Implements a line: y = slope*x + intercept.

Definition at line 90 of file Functor.h.

Constructor & Destructor Documentation

◆ LinearFunctor()

lsst::afw::geom::LinearFunctor::LinearFunctor ( double  slope,
double  intercept 
)

◆ ~LinearFunctor()

lsst::afw::geom::LinearFunctor::~LinearFunctor ( )
inline

Definition at line 94 of file Functor.h.

Member Function Documentation

◆ clone()

virtual std::shared_ptr<Functor> lsst::afw::geom::LinearFunctor::clone ( ) const
virtual

◆ derivative()

virtual double lsst::afw::geom::LinearFunctor::derivative ( double  x) const
virtual
Returns
df(x)/dx evaluated at x. This is used in the inverse(...) member function.

Implements lsst::afw::geom::Functor.

◆ inverse()

virtual double lsst::afw::geom::Functor::inverse ( double  y,
double  tol = 1e-10,
unsigned int  maxiter = 1000 
) const
virtualinherited
Parameters
ydesired value of functor
tolConvergence tolerance for the Newton-Raphson search such that abs(x_{iter} - x_{iter-1}) < tol.
maxiterMaximum number of iterations in the N-R search.
Returns
The x value such that y = f(x).
Exceptions
lsst::pex::exceptions::OutOfRangeErrorif (tol <= 0) or (tol > 1) or (maxiter < 1).
lsst::pex::exceptions::RuntimeErrorif the number of N-R iterations > maxiter.

◆ operator()()

virtual double lsst::afw::geom::LinearFunctor::operator() ( double  x) const
virtual
Returns
y = f(x)

Implements lsst::afw::geom::Functor.


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