ARTS 2.5.11 (git: 725533f0)
FixedGrid< b, Sizes > Class Template Reference

Row-major fixed grid creation. More...

#include <grids.h>

Public Types

using base = b
 

Public Member Functions

template<typename... Inds>
constexpr FixedGrid (Inds... inds) noexcept
 
constexpr FixedGrid () noexcept
 
constexpr FixedGrid (FixedGrid &&g) noexcept
 
constexpr FixedGridoperator= (FixedGrid &&g) noexcept
 
template<typename... Inds>
constexpr baseoperator() (Inds... inds) noexcept
 
template<typename... Inds>
constexpr const baseoperator() (Inds... inds) const noexcept
 
constexpr baseoperator[] (std::size_t ind) noexcept
 
constexpr const baseoperator[] (std::size_t ind) const noexcept
 

Static Public Attributes

static constexpr std::size_t N = sizeof...(Sizes)
 

Private Attributes

std::array< b, mul(Sizes...)> ptr
 

Friends

std::ostream & operator<< (std::ostream &os, const FixedGrid &g)
 

Detailed Description

template<typename b, std::size_t... Sizes>
class FixedGrid< b, Sizes >

Row-major fixed grid creation.

Definition at line 132 of file grids.h.

Member Typedef Documentation

◆ base

template<typename b , std::size_t... Sizes>
using FixedGrid< b, Sizes >::base = b

Base unit of the Grid

Definition at line 141 of file grids.h.

Constructor & Destructor Documentation

◆ FixedGrid() [1/3]

template<typename b , std::size_t... Sizes>
template<typename... Inds>
constexpr FixedGrid< b, Sizes >::FixedGrid ( Inds...  inds)
inlineconstexprnoexcept

throw-away constructor so that Grid and FixedGrid can be output in same templates

Definition at line 147 of file grids.h.

◆ FixedGrid() [2/3]

template<typename b , std::size_t... Sizes>
constexpr FixedGrid< b, Sizes >::FixedGrid ( )
inlineconstexprnoexcept

Standard constructor uses standard constructor of the base

Definition at line 152 of file grids.h.

◆ FixedGrid() [3/3]

template<typename b , std::size_t... Sizes>
constexpr FixedGrid< b, Sizes >::FixedGrid ( FixedGrid< b, Sizes > &&  g)
inlineconstexprnoexcept

Move initialization

Definition at line 155 of file grids.h.

Member Function Documentation

◆ operator()() [1/2]

template<typename b , std::size_t... Sizes>
template<typename... Inds>
constexpr const base & FixedGrid< b, Sizes >::operator() ( Inds...  inds) const
inlineconstexprnoexcept

Access operator

Definition at line 171 of file grids.h.

References gridsize_from_index(), index_from_gridsize(), and FixedGrid< b, Sizes >::ptr.

◆ operator()() [2/2]

template<typename b , std::size_t... Sizes>
template<typename... Inds>
constexpr base & FixedGrid< b, Sizes >::operator() ( Inds...  inds)
inlineconstexprnoexcept

Access operator

Definition at line 165 of file grids.h.

References gridsize_from_index(), index_from_gridsize(), and FixedGrid< b, Sizes >::ptr.

◆ operator=()

template<typename b , std::size_t... Sizes>
constexpr FixedGrid & FixedGrid< b, Sizes >::operator= ( FixedGrid< b, Sizes > &&  g)
inlineconstexprnoexcept

Move and set operator

Definition at line 158 of file grids.h.

References FixedGrid< b, Sizes >::ptr.

◆ operator[]() [1/2]

template<typename b , std::size_t... Sizes>
constexpr const base & FixedGrid< b, Sizes >::operator[] ( std::size_t  ind) const
inlineconstexprnoexcept

Access operator for VectorType

Definition at line 182 of file grids.h.

References FixedGrid< b, Sizes >::N, and FixedGrid< b, Sizes >::ptr.

◆ operator[]() [2/2]

template<typename b , std::size_t... Sizes>
constexpr base & FixedGrid< b, Sizes >::operator[] ( std::size_t  ind)
inlineconstexprnoexcept

Access operator for VectorType

Definition at line 176 of file grids.h.

References FixedGrid< b, Sizes >::N, and FixedGrid< b, Sizes >::ptr.

Friends And Related Symbol Documentation

◆ operator<<

template<typename b , std::size_t... Sizes>
std::ostream & operator<< ( std::ostream &  os,
const FixedGrid< b, Sizes > &  g 
)
friend

Friendly stream operator

Definition at line 188 of file grids.h.

Member Data Documentation

◆ N

template<typename b , std::size_t... Sizes>
constexpr std::size_t FixedGrid< b, Sizes >::N = sizeof...(Sizes)
staticconstexpr

Number of dimensions

Definition at line 138 of file grids.h.

Referenced by FixedGrid< b, Sizes >::operator[](), and FixedGrid< b, Sizes >::operator[]().

◆ ptr

template<typename b , std::size_t... Sizes>
std::array<b, mul(Sizes...)> FixedGrid< b, Sizes >::ptr
private

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