LSSTApplications  20.0.0
LSSTDataManagementBasePackage
Public Types | Public Member Functions | List of all members
lsst::geom::Extent< T, N > Class Template Reference

A coordinate class intended to represent offsets and dimensions. More...

#include <CoordinateBase.h>

Public Types

typedef Super::EigenVector EigenVector
 

Public Member Functions

 Extent (T val=static_cast< T >(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
 Construct an Extent with all elements set to the same scalar value. More...
 
 Extent (EigenVector const &vector) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
 Construct an Extent from an Eigen vector. More...
 
 Extent (Point< T, N > const &other) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
 Explicit constructor from Point. More...
 
template<typename U >
 Extent (Extent< U, N > const &other) noexcept(IS_NOTHROW_CONVERTIBLE< T, U >)
 Explicit constructor from Extent of different type (if allowed) More...
 
template<typename U >
 Extent (Point< U, N > const &other) noexcept(IS_NOTHROW_CONVERTIBLE< T, U >)
 
 Extent (Extent const &other)=default
 
 Extent (Extent &&other)=default
 
 ~Extent ()=default
 
Extentoperator= (Extent const &other)=default
 
Extentoperator= (Extent &&other)=default
 
computeSquaredNorm () const
 Return the squared L2 norm of the Extent (x^2 + y^2 + ...). More...
 
computeNorm () const
 Return the L2 norm of the Extent (sqrt(x^2 + y^2 + ...)). More...
 
void swap (Extent &other) noexcept
 

Detailed Description

template<typename T, int N>
class lsst::geom::Extent< T, N >

A coordinate class intended to represent offsets and dimensions.

Much of the functionality of Extent is provided by its CRTP base class, ExtentBase.

See Operators on Point and Extent for mathematical operators on Extent.

Definition at line 41 of file CoordinateBase.h.

Member Typedef Documentation

◆ EigenVector

template<typename T , int N>
typedef Super::EigenVector lsst::geom::Extent< T, N >::EigenVector

Definition at line 214 of file Extent.h.

Constructor & Destructor Documentation

◆ Extent() [1/7]

template<typename T , int N>
lsst::geom::Extent< T, N >::Extent ( val = static_cast<T>(0))
inlineexplicitnoexcept

Construct an Extent with all elements set to the same scalar value.

Definition at line 217 of file Extent.h.

217 : Super(val) {}

◆ Extent() [2/7]

template<typename T , int N>
lsst::geom::Extent< T, N >::Extent ( EigenVector const &  vector)
inlineexplicitnoexcept

Construct an Extent from an Eigen vector.

Definition at line 220 of file Extent.h.

220 : Super(vector) {}

◆ Extent() [3/7]

template<typename T , int N>
lsst::geom::Extent< T, N >::Extent ( Point< T, N > const &  other)
explicitnoexcept

Explicit constructor from Point.

Definition at line 31 of file Extent.cc.

32  : Super(other.asEigen()) {}

◆ Extent() [4/7]

template<typename T , int N>
template<typename U >
lsst::geom::Extent< T, N >::Extent ( Extent< U, N > const &  other)
explicitnoexcept

Explicit constructor from Extent of different type (if allowed)

◆ Extent() [5/7]

template<typename T , int N>
template<typename U >
lsst::geom::Extent< T, N >::Extent ( Point< U, N > const &  other)
explicitnoexcept

◆ Extent() [6/7]

template<typename T , int N>
lsst::geom::Extent< T, N >::Extent ( Extent< T, N > const &  other)
default

◆ Extent() [7/7]

template<typename T , int N>
lsst::geom::Extent< T, N >::Extent ( Extent< T, N > &&  other)
default

◆ ~Extent()

template<typename T , int N>
lsst::geom::Extent< T, N >::~Extent ( )
default

Member Function Documentation

◆ computeNorm()

template<typename T , int N>
T lsst::geom::Extent< T, N >::computeNorm ( ) const
inline

Return the L2 norm of the Extent (sqrt(x^2 + y^2 + ...)).

Definition at line 243 of file Extent.h.

243 { return this->asEigen().norm(); }

◆ computeSquaredNorm()

template<typename T , int N>
T lsst::geom::Extent< T, N >::computeSquaredNorm ( ) const
inline

Return the squared L2 norm of the Extent (x^2 + y^2 + ...).

Definition at line 240 of file Extent.h.

240 { return this->asEigen().squaredNorm(); }

◆ operator=() [1/2]

template<typename T , int N>
Extent& lsst::geom::Extent< T, N >::operator= ( Extent< T, N > &&  other)
default

◆ operator=() [2/2]

template<typename T , int N>
Extent& lsst::geom::Extent< T, N >::operator= ( Extent< T, N > const &  other)
default

◆ swap()

template<typename T , int N>
void lsst::geom::Extent< T, N >::swap ( Extent< T, N > &  other)
inlinenoexcept

Definition at line 245 of file Extent.h.

245 { this->_swap(other); }

The documentation for this class was generated from the following files:
val
ImageT val
Definition: CR.cc:146
other
ItemVariant const * other
Definition: Schema.cc:56
lsst::geom::asEigen
Eigen::Vector3d asEigen(sphgeom::Vector3d const &vector) noexcept
Definition: sphgeomUtils.h:36