LSSTApplications  18.0.0+106,18.0.0+50,19.0.0,19.0.0+1,19.0.0+10,19.0.0+11,19.0.0+13,19.0.0+17,19.0.0+2,19.0.0-1-g20d9b18+6,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+6,19.0.0-1-g6fe20d0+1,19.0.0-1-g7011481+9,19.0.0-1-g8c57eb9+6,19.0.0-1-gb5175dc+11,19.0.0-1-gdc0e4a7+9,19.0.0-1-ge272bc4+6,19.0.0-1-ge3aa853,19.0.0-10-g448f008b,19.0.0-12-g6990b2c,19.0.0-2-g0d9f9cd+11,19.0.0-2-g3d9e4fb2+11,19.0.0-2-g5037de4,19.0.0-2-gb96a1c4+3,19.0.0-2-gd955cfd+15,19.0.0-3-g2d13df8,19.0.0-3-g6f3c7dc,19.0.0-4-g725f80e+11,19.0.0-4-ga671dab3b+1,19.0.0-4-gad373c5+3,19.0.0-5-ga2acb9c+2,19.0.0-5-gfe96e6c+2,w.2020.01
LSSTDataManagementBasePackage
Public Member Functions | Public Attributes | List of all members
lsst::geom::polynomials::Index2d Struct Reference

A custom tuple that relates the indices of two 1-d functions for x and y to the flattened index for the 2-d function they form. More...

#include <PackedIndex.h>

Public Member Functions

constexpr Index2d () noexcept
 Construct an index with zero entries. More...
 
constexpr Index2d (std::size_t flat_, std::size_t nx_, std::size_t ny_) noexcept
 Construct with the provided values. More...
 
constexpr bool operator== (Index2d const &other) const noexcept
 Equality comparison. More...
 
constexpr bool operator!= (Index2d const &other) const noexcept
 Inequality comparison. More...
 

Public Attributes

std::size_t flat
 Index into the flattened 2-d function. More...
 
std::size_t nx
 Index into the 1-d function for nx. More...
 
std::size_t ny
 Index into the 1-d functoin for ny. More...
 

Detailed Description

A custom tuple that relates the indices of two 1-d functions for x and y to the flattened index for the 2-d function they form.

The packing algorithm is not specified by Index2d itself; it is intended to be a common data structure for other classes that define possibly different algorithms (e.g. PackedIndexIterator).

Definition at line 69 of file PackedIndex.h.

Constructor & Destructor Documentation

◆ Index2d() [1/2]

constexpr lsst::geom::polynomials::Index2d::Index2d ( )
inlinenoexcept

Construct an index with zero entries.

Definition at line 72 of file PackedIndex.h.

72 : flat(0), nx(0), ny(0) {}
std::size_t nx
Index into the 1-d function for nx.
Definition: PackedIndex.h:90
std::size_t ny
Index into the 1-d functoin for ny.
Definition: PackedIndex.h:91
std::size_t flat
Index into the flattened 2-d function.
Definition: PackedIndex.h:89

◆ Index2d() [2/2]

constexpr lsst::geom::polynomials::Index2d::Index2d ( std::size_t  flat_,
std::size_t  nx_,
std::size_t  ny_ 
)
inlinenoexcept

Construct with the provided values.

Definition at line 75 of file PackedIndex.h.

75  :
76  flat(flat_), nx(nx_), ny(ny_)
77  {}
std::size_t nx
Index into the 1-d function for nx.
Definition: PackedIndex.h:90
std::size_t ny
Index into the 1-d functoin for ny.
Definition: PackedIndex.h:91
std::size_t flat
Index into the flattened 2-d function.
Definition: PackedIndex.h:89

Member Function Documentation

◆ operator!=()

constexpr bool lsst::geom::polynomials::Index2d::operator!= ( Index2d const &  other) const
inlinenoexcept

Inequality comparison.

Definition at line 85 of file PackedIndex.h.

85  {
86  return !(*this == other);
87  }
ItemVariant const * other
Definition: Schema.cc:56

◆ operator==()

constexpr bool lsst::geom::polynomials::Index2d::operator== ( Index2d const &  other) const
inlinenoexcept

Equality comparison.

Definition at line 80 of file PackedIndex.h.

80  {
81  return flat == other.flat && nx == other.nx && ny == other.ny;
82  }
std::size_t nx
Index into the 1-d function for nx.
Definition: PackedIndex.h:90
std::size_t ny
Index into the 1-d functoin for ny.
Definition: PackedIndex.h:91
ItemVariant const * other
Definition: Schema.cc:56
std::size_t flat
Index into the flattened 2-d function.
Definition: PackedIndex.h:89

Member Data Documentation

◆ flat

std::size_t lsst::geom::polynomials::Index2d::flat

Index into the flattened 2-d function.

Definition at line 89 of file PackedIndex.h.

◆ nx

std::size_t lsst::geom::polynomials::Index2d::nx

Index into the 1-d function for nx.

Definition at line 90 of file PackedIndex.h.

◆ ny

std::size_t lsst::geom::polynomials::Index2d::ny

Index into the 1-d functoin for ny.

Definition at line 91 of file PackedIndex.h.


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