lsst.afw  14.0-27-gbdf48f848+1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lsst::afw::geom::Point2Endpoint Class Reference

An endpoint for Point2D. More...

#include <Endpoint.h>

Inheritance diagram for lsst::afw::geom::Point2Endpoint:
lsst::afw::geom::BaseVectorEndpoint< Point2D > lsst::afw::geom::BaseEndpoint< Point2D, std::vector< Point2D > >

Public Types

using Array = std::vector< Point2D >
 
using Point = Point2D
 

Public Member Functions

 Point2Endpoint (Point2Endpoint const &)=default
 
 Point2Endpoint (Point2Endpoint &&)=default
 
Point2Endpoint & operator= (Point2Endpoint const &)=delete
 
Point2Endpoint & operator= (Point2Endpoint &&)=delete
 
 Point2Endpoint ()
 Construct a Point2Endpoint. More...
 
 Point2Endpoint (int nAxes)
 Construct a Point2Endpoint with nAxes specified; nAxes must equal template parameter N. More...
 
virtual ~Point2Endpoint ()
 
virtual std::vector< double > dataFromPoint (Point const &point) const override
 Get raw data from a single point. More...
 
virtual ndarray::Array< double, 2, 2 > dataFromArray (Array const &arr) const override
 Get raw data from an array of points. More...
 
virtual Point pointFromData (std::vector< double > const &data) const override
 Get a single point from raw data. More...
 
virtual Array arrayFromData (ndarray::Array< double, 2, 2 > const &data) const override
 Get an array of points from raw data. More...
 
virtual void normalizeFrame (std::shared_ptr< ast::Frame > framePtr) const override
 Check that framePtr points to a Frame, not a subclass. More...
 
virtual int getNPoints (Array const &arr) const override
 Return the number of points in an array. More...
 
int getNAxes () const
 
virtual std::shared_ptr< ast::Frame > makeFrame () const
 Create a Frame that can be used with this end point in a Transform. More...
 

Static Public Member Functions

static std::string getClassPrefix ()
 Get the class name prefix, e.g. "Point2" for "Point2Endpoint". More...
 

Protected Member Functions

void _assertNAxes (int nAxes) const
 
int _getNAxes (ndarray::Array< double, 2, 2 > const &data) const
 
int _getNAxes (ndarray::Array< double, 1, 1 > const &data) const
 
int _getNAxes (std::vector< double > const &data) const
 
int _getNPoints (ndarray::Array< double, 2, 2 > const &data) const
 

Detailed Description

An endpoint for Point2D.

Definition at line 236 of file Endpoint.h.

Member Typedef Documentation

◆ Array

Definition at line 172 of file Endpoint.h.

◆ Point

Definition at line 173 of file Endpoint.h.

Constructor & Destructor Documentation

◆ Point2Endpoint() [1/4]

lsst::afw::geom::Point2Endpoint::Point2Endpoint ( Point2Endpoint const &  )
default

◆ Point2Endpoint() [2/4]

lsst::afw::geom::Point2Endpoint::Point2Endpoint ( Point2Endpoint &&  )
default

◆ Point2Endpoint() [3/4]

lsst::afw::geom::Point2Endpoint::Point2Endpoint ( )
inlineexplicit

Construct a Point2Endpoint.

Definition at line 246 of file Endpoint.h.

◆ Point2Endpoint() [4/4]

lsst::afw::geom::Point2Endpoint::Point2Endpoint ( int  nAxes)
explicit

Construct a Point2Endpoint with nAxes specified; nAxes must equal template parameter N.

This constructor is primarily used by Transform; other users are encouraged to use the default constructor.

Parameters
[in]nAxesThe number of axes in a point; must equal template parameter N
Exceptions
lsst.pex.exceptions.InvalidParameterErrorif nAxes != N

◆ ~Point2Endpoint()

virtual lsst::afw::geom::Point2Endpoint::~Point2Endpoint ( )
inlinevirtual

Definition at line 260 of file Endpoint.h.

Member Function Documentation

◆ _assertNAxes()

void lsst::afw::geom::BaseEndpoint< Point2D , std::vector< Point2D > >::_assertNAxes ( int  nAxes) const
protectedinherited

◆ _getNAxes() [1/3]

int lsst::afw::geom::BaseEndpoint< Point2D , std::vector< Point2D > >::_getNAxes ( ndarray::Array< double, 2, 2 > const &  data) const
inlineprotectedinherited

Definition at line 152 of file Endpoint.h.

◆ _getNAxes() [2/3]

int lsst::afw::geom::BaseEndpoint< Point2D , std::vector< Point2D > >::_getNAxes ( ndarray::Array< double, 1, 1 > const &  data) const
inlineprotectedinherited

Definition at line 154 of file Endpoint.h.

◆ _getNAxes() [3/3]

int lsst::afw::geom::BaseEndpoint< Point2D , std::vector< Point2D > >::_getNAxes ( std::vector< double > const &  data) const
inlineprotectedinherited

Definition at line 156 of file Endpoint.h.

◆ _getNPoints()

int lsst::afw::geom::BaseEndpoint< Point2D , std::vector< Point2D > >::_getNPoints ( ndarray::Array< double, 2, 2 > const &  data) const
inlineprotectedinherited

Definition at line 158 of file Endpoint.h.

◆ arrayFromData()

virtual Array lsst::afw::geom::Point2Endpoint::arrayFromData ( ndarray::Array< double, 2, 2 > const &  data) const
overridevirtual

Get an array of points from raw data.

Parameters
[in]dataRaw data for an array of points, as a 2-D ndarray array [nPoints, nAxes] in C order, so the in-memory view is, for example, x0, y0, x1, y1, x2, y2, ...
Returns
an array of points
Exceptions
lsst::pex::exceptions::InvalidParameterErrorif the array has the wrong nAxes dimension

Implements lsst::afw::geom::BaseEndpoint< Point2D, std::vector< Point2D > >.

◆ dataFromArray()

virtual ndarray::Array<double, 2, 2> lsst::afw::geom::Point2Endpoint::dataFromArray ( Array const &  arr) const
overridevirtual

Get raw data from an array of points.

Parameters
[in]arrArray of points
Returns
the data as a 2-D ndarray array [nAxes, nPoints] in C order, so the in-memory view is, for example, x0, x1, x2, ..., y0, y1, y2, ...
Exceptions
lsst::pex::exceptions::InvalidParameterErrorif the array has the wrong nAxes dimension

Implements lsst::afw::geom::BaseEndpoint< Point2D, std::vector< Point2D > >.

◆ dataFromPoint()

virtual std::vector<double> lsst::afw::geom::Point2Endpoint::dataFromPoint ( Point const &  point) const
overridevirtual

Get raw data from a single point.

Parameters
[in]pointdata for a single point
Returns
the values in the point as a vector of size NAxess
Exceptions
lsst::pex::exceptions::InvalidParameterErrorif the point has the wrong number of axes

Implements lsst::afw::geom::BaseEndpoint< Point2D, std::vector< Point2D > >.

◆ getClassPrefix()

static std::string lsst::afw::geom::Point2Endpoint::getClassPrefix ( )
inlinestatic

Get the class name prefix, e.g. "Point2" for "Point2Endpoint".

Definition at line 282 of file Endpoint.h.

◆ getNAxes()

int lsst::afw::geom::BaseEndpoint< Point2D , std::vector< Point2D > >::getNAxes ( ) const
inlineinherited

Definition at line 79 of file Endpoint.h.

◆ getNPoints()

virtual int lsst::afw::geom::BaseVectorEndpoint< Point2D >::getNPoints ( Array const &  arr) const
overridevirtualinherited

Return the number of points in an array.

Implements lsst::afw::geom::BaseEndpoint< Point2D, std::vector< Point2D > >.

◆ makeFrame()

virtual std::shared_ptr<ast::Frame> lsst::afw::geom::BaseEndpoint< Point2D , std::vector< Point2D > >::makeFrame ( ) const
virtualinherited

Create a Frame that can be used with this end point in a Transform.

◆ normalizeFrame()

virtual void lsst::afw::geom::Point2Endpoint::normalizeFrame ( std::shared_ptr< ast::Frame >  framePtr) const
overridevirtual

Check that framePtr points to a Frame, not a subclass.

Subclasses are forbidden because Point2D is assumed to be cartesian and subclasses of Frame are not (e.g. SkyFrame, SpecFrame and TimeFrame). Note that SpecFrame and TimeFrame are 1-dimensional so they cannot be used in any case. A CmpFrame could be cartesian, but we play it safe and reject these (however, a cartesian CmpFrame ought to simplify to a Frame).

Reimplemented from lsst::afw::geom::BaseEndpoint< Point2D, std::vector< Point2D > >.

◆ operator=() [1/2]

Point2Endpoint& lsst::afw::geom::Point2Endpoint::operator= ( Point2Endpoint const &  )
delete

◆ operator=() [2/2]

Point2Endpoint& lsst::afw::geom::Point2Endpoint::operator= ( Point2Endpoint &&  )
delete

◆ pointFromData()

virtual Point lsst::afw::geom::Point2Endpoint::pointFromData ( std::vector< double > const &  data) const
overridevirtual

Get a single point from raw data.

Parameters
[in]dataData as a vector of length NAxes
Returns
the corresponding point

Implements lsst::afw::geom::BaseEndpoint< Point2D, std::vector< Point2D > >.


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