Sequoia
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
sequoia::physics::physical_value< ValueSpace, Unit, Basis, Origin, Validator > Class Template Reference
Inheritance diagram for sequoia::physics::physical_value< ValueSpace, Unit, Basis, Origin, Validator >:
sequoia::maths::coordinates_base< ConvexSpace, Basis, Validator, DisplacementCoordinates >

Public Types

using coordinates_type = to_coordinates_base_type< ValueSpace, Unit, Basis, Validator >
 
using space_type = ValueSpace
 
using units_type = Unit
 
using basis_type = Basis
 
using origin_type = Origin
 
using displacement_space_type = free_module_type_of_t< ValueSpace >
 
using intrinsic_validator_type = Unit::validator_type
 
using validator_type = Validator
 
using ring_type = commutative_ring_type_of_t< ValueSpace >
 
using value_type = ring_type
 
using displacement_type = coordinates_type::displacement_coordinates_type
 
- Public Types inherited from sequoia::maths::coordinates_base< ConvexSpace, Basis, Validator, DisplacementCoordinates >
using space_type = ConvexSpace
 
using basis_type = Basis
 
using validator_type = Validator
 
using set_type = ConvexSpace::set_type
 
using free_module_type = free_module_type_of_t< ConvexSpace >
 
using commutative_ring_type = commutative_ring_type_of_t< ConvexSpace >
 
using value_type = commutative_ring_type
 
using displacement_coordinates_type = DisplacementCoordinates
 
using basis_isomorphism_type = basis_isomorphism_type_of_t< Basis >
 

Public Member Functions

template<convex_space OtherValueSpace, basis_for< free_module_type_of_t< OtherValueSpace > > OtherBasis, class OtherOrigin >
requires (!std::same_as<space_type, OtherValueSpace>) && has_distinguished_origin_v<space_type> && (std::derived_from<OtherValueSpace, space_type>) && consistent_bases_v<basis_type, OtherBasis>
constexpr physical_valueoperator+= (const physical_value< OtherValueSpace, Unit, OtherBasis, OtherOrigin, Validator > &other) &noexcept(has_identity_validator)
 
template<convex_space OtherValueSpace, basis_for< free_module_type_of_t< OtherValueSpace > > OtherBasis, class OtherOrigin >
requires (!std::same_as<space_type, OtherValueSpace>) && has_distinguished_origin_v<space_type> && (std::derived_from<OtherValueSpace, space_type>) && consistent_bases_v<basis_type, OtherBasis>
constexpr physical_valueoperator+= (const physical_value< OtherValueSpace, Unit, OtherBasis, OtherOrigin, Validator > &) &&=delete
 
template<class LoweredValueSpace , class OtherUnit , basis_for< free_module_type_of_t< LoweredValueSpace > > OtherBasis, class OtherOrigin >
requires std::same_as<to_base_space_t<space_type>, to_base_space_t<LoweredValueSpace>> && consistent_bases_v<basis_type, OtherBasis>
constexpr operator physical_value< LoweredValueSpace, OtherUnit, OtherBasis, OtherOrigin, validator_type > () const noexcept
 
template<physical_unit OtherUnit, convex_space OtherSpace = conversion_space_t<ValueSpace, Unit, OtherUnit>, basis_for< free_module_type_of_t< OtherSpace > > OtherBasis = unit_defined_right_handed_basis<free_module_type_of_t<OtherSpace>, OtherUnit>, class OtherOrigin = to_origin_type_t<OtherSpace, OtherUnit>, validator_for< OtherSpace > OtherValidator = default_validator_t<OtherSpace, OtherUnit>>
requires has_quantity_conversion_v<physical_value, physical_value<OtherSpace, OtherUnit, OtherBasis, OtherOrigin, OtherValidator>>
constexpr physical_value< OtherSpace, OtherUnit, OtherBasis, OtherOrigin, OtherValidator > convert_to (OtherUnit) const noexcept(has_noexcept_coordinate_transformation_v< physical_value, physical_value< OtherSpace, OtherUnit, OtherBasis, OtherOrigin, OtherValidator > >)
 
constexpr physical_value convert_to (Unit) const noexcept
 
- Public Member Functions inherited from sequoia::maths::coordinates_base< ConvexSpace, Basis, Validator, DisplacementCoordinates >
constexpr coordinates_base (std::span< const value_type, D > vals) noexcept(has_identity_validator)
 
constexpr coordinates_base (std::span< const value_type, D > vals, basis_isomorphism_type) noexcept(has_identity_validator)
 
template<class... Ts>
requires admits_canonical_basis
&&D &&std::convertible_to< Ts, value_type > &&constexpr explicit (sizeof...(Ts)==1) coordinates_base(Ts... ts) noexcept(has_identity_validator)
 
template<class... Ts>
requires (D > 1) && (sizeof...(Ts) > 1) && is_units_terminated_pack_v<basis_type, value_type, Ts...>
constexpr coordinates_base (Ts... ts) noexcept(has_identity_validator)
 
constexpr coordinates_base (value_type val) noexcept(has_identity_validator) &&(D
 
constexpr const validator_type & validator () const noexcept
 
constexpr std::span< const value_type, D > values () const noexcept
 
constexpr std::span< value_type, D > values () noexcept
 
constexpr const value_type & value () const noexcept
 
constexpr value_type & value () noexcept
 
constexpr operator bool () const noexcept
 This is explicit since otherwise, given two vectors a,b, a/b is well-formed due to implicit boolean conversion.
 
constexpr value_type operator[] (std::size_t i) const
 
constexpr value_type & operator[] (std::size_t i)
 
constexpr auto begin () const noexcept
 
constexpr auto end () const noexcept
 
constexpr auto rbegin () const noexcept
 
constexpr auto rend () const noexcept
 
constexpr auto cbegin () const noexcept
 
constexpr auto cend () const noexcept
 
constexpr auto crbegin () const noexcept
 
constexpr auto crend () const noexcept
 
constexpr auto begin () noexcept
 
constexpr auto end () noexcept
 
constexpr auto rbegin () noexcept
 
constexpr auto rend () noexcept
 

Static Public Attributes

static constexpr std::size_t dimension {displacement_space_type::dimension}
 
static constexpr std::size_t D {dimension}
 
static constexpr bool has_identity_validator {coordinates_type::has_identity_validator}
 
template<convex_space RHSValueSpace, class RHSBasis >
static constexpr bool is_composable_with
 
template<convex_space RHSValueSpace, class RHSBasis >
static constexpr bool is_multipicable_with
 
template<convex_space RHSValueSpace, class RHSBasis >
static constexpr bool is_divisible_with
 
- Static Public Attributes inherited from sequoia::maths::coordinates_base< ConvexSpace, Basis, Validator, DisplacementCoordinates >
static constexpr bool has_distinguished_origin {has_distinguished_origin_v<ConvexSpace>}
 
static constexpr bool has_identity_validator {defines_identity_validator_v<Validator>}
 
static constexpr bool has_freely_mutable_components {has_identity_validator && has_distinguished_origin}
 
static constexpr bool admits_canonical_basis {admits_canonical_basis_v<free_module_type>}
 
static constexpr std::size_t dimension {free_module_type::dimension}
 
static constexpr std::size_t D {dimension}
 

Friends

template<convex_space OtherValueSpace, basis_for< free_module_type_of_t< OtherValueSpace > > OtherBasis, class OtherOrigin >
requires has_distinguished_origin_v<space_type> && (!std::is_same_v<space_type, OtherValueSpace>) && have_compatible_base_spaces_v<space_type, OtherValueSpace> && consistent_bases_v<basis_type, OtherBasis>
constexpr auto operator+ (const physical_value &lhs, const physical_value< OtherValueSpace, Unit, OtherBasis, OtherOrigin, Validator > &rhs)
 
template<class OtherValueSpace , basis_for< free_module_type_of_t< OtherValueSpace > > OtherBasis, class OtherOrigin >
requires (!std::same_as<OtherValueSpace, displacement_space_type>) && (!std::same_as<space_type, OtherValueSpace> && have_compatible_base_spaces_v<space_type, OtherValueSpace>) && consistent_bases_v<basis_type, OtherBasis>
constexpr auto operator- (const physical_value &lhs, const physical_value< OtherValueSpace, Unit, OtherBasis, OtherOrigin, Validator > &rhs) noexcept(has_identity_validator)
 
template<convex_space RHSValueSpace, physical_unit RHSUnit, basis_for< free_module_type_of_t< RHSValueSpace > > RHSBasis, class RHSOrigin , class RHSValidator >
requires is_multipicable_with<RHSValueSpace, RHSBasis>
constexpr auto operator* (const physical_value &lhs, const physical_value< RHSValueSpace, RHSUnit, RHSBasis, RHSOrigin, RHSValidator > &rhs)
 
template<convex_space RHSValueSpace, class RHSUnit , basis_for< free_module_type_of_t< RHSValueSpace > > RHSBasis, class RHSOrigin , class RHSValidator >
requires is_divisible_with<RHSValueSpace, RHSBasis>
constexpr auto operator/ (const physical_value &lhs, const physical_value< RHSValueSpace, RHSUnit, RHSBasis, RHSOrigin, RHSValidator > &rhs)
 
constexpr auto operator/ (value_type value, const physical_value &rhs)
 

Additional Inherited Members

- Protected Member Functions inherited from sequoia::maths::coordinates_base< ConvexSpace, Basis, Validator, DisplacementCoordinates >
 coordinates_base (const coordinates_base &)=default
 
 coordinates_base (coordinates_base &&) noexcept=default
 
coordinates_baseoperator= (const coordinates_base &)=default
 
coordinates_baseoperator= (coordinates_base &&) noexcept=default
 
template<class Self , class Fn >
requires std::invocable<Fn, value_type&, value_type>
constexpr Self && apply_to_each_element (this Self &&self, std::span< const value_type, D > rhs, Fn f)
 
template<class Self , class Fn >
requires std::invocable<Fn, value_type&>
constexpr Self & for_each_element (this Self &self, Fn f)
 

Member Data Documentation

◆ is_composable_with

template<convex_space ValueSpace, physical_unit Unit, basis_for< free_module_type_of_t< ValueSpace > > Basis = unit_defined_right_handed_basis<free_module_type_of_t<ValueSpace>, Unit>, class Origin = to_origin_type_t<ValueSpace, Unit>, validator_for< ValueSpace > Validator = default_validator_t<ValueSpace, Unit>>
template<convex_space RHSValueSpace, class RHSBasis >
constexpr bool sequoia::physics::physical_value< ValueSpace, Unit, Basis, Origin, Validator >::is_composable_with
staticconstexpr
Initial value:
{
consistent_bases_v<basis_type, RHSBasis>
&& (is_non_negative_orthant_v<space_type> || vector_space<space_type>)
&& (is_non_negative_orthant_v<RHSValueSpace> || vector_space<RHSValueSpace>)
}

◆ is_divisible_with

template<convex_space ValueSpace, physical_unit Unit, basis_for< free_module_type_of_t< ValueSpace > > Basis = unit_defined_right_handed_basis<free_module_type_of_t<ValueSpace>, Unit>, class Origin = to_origin_type_t<ValueSpace, Unit>, validator_for< ValueSpace > Validator = default_validator_t<ValueSpace, Unit>>
template<convex_space RHSValueSpace, class RHSBasis >
constexpr bool sequoia::physics::physical_value< ValueSpace, Unit, Basis, Origin, Validator >::is_divisible_with
staticconstexpr
Initial value:
{
weak_field<ring_type>
&& weak_field<commutative_ring_type_of_t<RHSValueSpace>>
&& is_composable_with<RHSValueSpace, RHSBasis>
&& (free_module_type_of_t<RHSValueSpace>::dimension == 1)
}

◆ is_multipicable_with

template<convex_space ValueSpace, physical_unit Unit, basis_for< free_module_type_of_t< ValueSpace > > Basis = unit_defined_right_handed_basis<free_module_type_of_t<ValueSpace>, Unit>, class Origin = to_origin_type_t<ValueSpace, Unit>, validator_for< ValueSpace > Validator = default_validator_t<ValueSpace, Unit>>
template<convex_space RHSValueSpace, class RHSBasis >
constexpr bool sequoia::physics::physical_value< ValueSpace, Unit, Basis, Origin, Validator >::is_multipicable_with
staticconstexpr
Initial value:
{
is_composable_with<RHSValueSpace, RHSBasis>
&& ((D == 1) || (free_module_type_of_t<RHSValueSpace>::dimension == 1))
}

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