|
Celeritas 0.7+cf8d83d
|
Create and convert arrays of quantities. More...
#include <cstddef>#include <type_traits>#include "corecel/Types.hh"#include "corecel/cont/Array.hh"#include "Quantity.hh"#include <ostream>Functions | |
| template<class Q , class... Args> | |
| constexpr Array< Q, sizeof...(Args)> | celeritas::make_quantity_array (Args const &... args) noexcept |
| Construct an array of quantities from raw values. | |
| template<class Q , std::size_t N> | |
| constexpr Array< Q, N > | celeritas::make_quantity_array (Array< typename Q::value_type, N > const &arr) noexcept |
| Construct an array of quantities from raw values. | |
| template<class UnitT , class ValueT , std::size_t N> | |
| constexpr auto | celeritas::native_value_from (Array< Quantity< UnitT, ValueT >, N > const &quant) noexcept |
| Convert an array of quantities to native values. | |
| template<class Q , class T , std::size_t N> | |
| constexpr auto | celeritas::native_value_to (Array< T, N > const &value) noexcept |
| Convert an array of native values to an array of quantities. | |
| template<class Q , std::size_t N> | |
| constexpr auto | celeritas::value_as (Array< Q, N > const &quant) noexcept -> std::enable_if_t< is_quantity_v< Q >, Array< typename Q::value_type, N > > |
| Get the values from an array of quantities. | |
| template<class UnitT , class ValueT , std::size_t N> | |
| std::ostream & | celeritas::operator<< (std::ostream &os, Array< Quantity< UnitT, ValueT >, N > const &q) |
| Output a quantity array with its label. | |
Create and convert arrays of quantities.
|
inlineconstexprnoexcept |
Construct an array of quantities from raw values.
This helper function allows concise construction of arrays of quantities:
|
inlineconstexprnoexcept |
Construct an array of quantities from raw values.
This helper function allows concise construction of arrays of quantities:
|
inlineconstexprnoexcept |
Convert an array of quantities to native values.
This applies native_value_from element-wise to each component.
|
inlineconstexprnoexcept |
Convert an array of native values to an array of quantities.
This applies native_value_to element-wise to each component.
| std::ostream & celeritas::operator<< | ( | std::ostream & | os, |
| Array< Quantity< UnitT, ValueT >, N > const & | q | ||
| ) |
Output a quantity array with its label.
This overload is more specialized than the generic Array operator<< and is therefore preferred by partial ordering for Quantity element types.