14namespace sequoia::physics
16 template<physical_unit T>
19 template<physical_unit T>
20 requires std::is_same_v<typename T::validator_type, std::identity>
21 || std::is_same_v<typename T::validator_type, maths::half_line_validator>
25 template<physical_unit T>
28 template<physical_unit T>
32namespace sequoia::maths
34 template<physics::physical_unit T>
35 requires physics::is_invertible_unit_v<T>
38 using validator_type = T::validator_type;
48 template<physics::physical_unit T>
49 requires (!physics::is_invertible_unit_v<T>)
52 using validator_type = void;
56namespace sequoia::physics
58 using namespace maths;
72 template<
class T,
class... Us>
75 using type = reduced_validator_t<T, reduced_validator_t<Us...>>;
85 template<physical_unit... Ts>
88 using validator_type = reduced_validator_t<
typename Ts::validator_type...>;
92 inline constexpr bool has_arena_type_v{
93 requires {
typename T::arena_type;}
103 requires has_arena_type_v<T>
106 using type = T::arena_type;
109 template<convex_space T>
110 requires (!has_arena_type_v<dual<T>>)
113 using type = arena_type_of_t<T>;
116 template<convex_space... Ts>
120 using type = std::common_type_t<arena_type_of_t<Ts>...>;
130 template<
class... Ts>
133 template<convex_space... Ts>
134 requires (free_module<Ts> || ...)
139 using commutative_ring_type = commutative_ring_type_of_t<direct_product_t>;
140 using is_free_module = std::true_type;
142 constexpr static std::size_t dimension{std::ranges::max({dimension_of<Ts>...})};
145 template<convex_space... Ts>
146 requires (!affine_space<Ts> && ...)
152 using is_convex_space = std::true_type;
156 template<physical_unit T, physical_unit U>
180 template<convex_space T, convex_space U>
186 template<convex_space... Ts, convex_space U>
192 template<convex_space T, convex_space... Us>
198 template<convex_space... Ts, convex_space... Us>
207 using type = std::identity;
211 requires (!std::is_same_v<T, std::identity>)
214 using type = std::identity;
223 template<convex_space ValueSpace, physical_unit Unit>
224 inline constexpr bool has_distinguished_origin{
225 free_module<ValueSpace>
226 || (!affine_space<ValueSpace> && defines_half_line_v<typename Unit::validator_type>)
229 template<convex_space ValueSpace, physical_unit Unit,
class Origin>
230 inline constexpr bool has_consistent_origin{
231 ( has_distinguished_origin<ValueSpace, Unit> && std::is_same_v<Origin, distinguished_origin>)
232 || (!has_distinguished_origin<ValueSpace, Unit> && !std::is_same_v<Origin, distinguished_origin>)
235 template<convex_space ValueSpace, val
idator_for<ValueSpace> Val
idator>
236 inline constexpr bool has_consistent_validator{
237 !affine_space<ValueSpace> || std::is_same_v<Validator, std::identity>
240 template<convex_space ValueSpace, physical_unit Unit>
241 inline constexpr bool has_consistent_unit{
242 !is_dual_v<Unit> || vector_space<ValueSpace> || (!affine_space<ValueSpace> && is_invertible_unit_v<dual_of_t<Unit>>)
245 template<convex_space ValueSpace, physical_unit Unit, basis_for<free_module_type_of_t<ValueSpace>> Basis,
class Origin, val
idator_for<ValueSpace> Val
idator>
246 requires has_consistent_unit<ValueSpace, Unit>
247 && has_consistent_validator<ValueSpace, Validator>
248 && has_consistent_origin<ValueSpace, Unit, Origin>
249 class physical_value;
251 template<physical_unit Unit>
254 template<affine_space T>
257 template<convex_space ValueSpace, physical_unit Unit>
260 template<convex_space ValueSpace, physical_unit Unit>
261 requires (!has_distinguished_origin<ValueSpace, Unit>) && (!affine_space<ValueSpace>)
267 template<convex_space ValueSpace, physical_unit Unit>
270 template<convex_space ValueSpace, physical_unit Unit>
271 requires has_distinguished_origin<ValueSpace, Unit>
277 template<convex_space ValueSpace, physical_unit Unit>
278 requires (!has_distinguished_origin<ValueSpace, Unit> && affine_space<ValueSpace>)
279 struct to_origin_type<ValueSpace, Unit>
281 using type = implicit_affine_origin<ValueSpace>;
284 template<convex_space ValueSpace, physical_unit Unit, basis_for<free_module_type_of_t<ValueSpace>> Basis,
class Origin,
class Val
idator>
285 using to_coordinates_base_type
291 physical_value<free_module_type_of_t<ValueSpace>, Unit, Basis, distinguished_origin, std::identity>>;
294 inline constexpr bool has_base_space_v{
295 requires {
typename T::base_space; }
298 template<convex_space T>
304 template<convex_space T>
305 using to_base_space_t = to_base_space<T>::type;
307 template<convex_space T>
308 requires has_base_space_v<T>
311 using type = T::base_space;
314 template<convex_space T>
320 template<convex_space T>
321 requires has_base_space_v<T>
327 template<convex_space... Ts>
330 using sorted_direct_product_t = meta::stable_sort_t<direct_product<to_base_space_t<Ts>...>, meta::type_comparator>;
331 using type = impl::to_composite_space_t<reduction<impl::reduce_t<impl::count_and_combine_t<sorted_direct_product_t>>>>;
334 template<convex_space T, convex_space U>
335 inline constexpr bool have_compatible_base_spaces_v{
336 has_base_space_v<T> && has_base_space_v<U> && (free_module_type_of_t<T>::dimension == free_module_type_of_t<U>::dimension) &&
requires {
337 typename std::common_type<typename T::base_space, typename U::base_space>::type;
341 template<convex_space T, convex_space U>
344 template<convex_space T, convex_space U>
347 template<convex_space T>
350 using type = free_module_type_of_t<T>;
353 template<convex_space T, convex_space U>
354 requires (!std::is_same_v<T, U>) && have_compatible_base_spaces_v<T, U>
357 using type = free_module_type_of_t<std::common_type_t<typename T::base_space, typename U::base_space>>;
360 template<
class Basis1,
class Basis2>
363 template<
class Basis1,
class Basis2>
366 template<free_module M1, free_module M2>
369 template<free_module M>
373 template<
class T,
class U>
376 template<
class T,
class U>
379 template<convex_space C>
380 inline constexpr bool is_1d_euclidean_v{
381 std::is_same_v<euclidean_vector_space<commutative_ring_type_of_t<C>, 1, arena_type_of_t<C>>, C>
382 || std::is_same_v<euclidean_half_space<commutative_ring_type_of_t<C>, arena_type_of_t<C>>, C>
386 convex_space LHSValueSpace,
physical_unit LHSUnit, basis_for<free_module_type_of_t<LHSValueSpace>> LHSBasis,
class LHSValidator,
387 convex_space RHSValueSpace,
physical_unit RHSUnit, basis_for<free_module_type_of_t<RHSValueSpace>> RHSBasis, class RHSValidator
389 requires consistent_bases_v<LHSBasis, RHSBasis> && (!is_1d_euclidean_v<LHSValueSpace> && !is_1d_euclidean_v<RHSValueSpace>)
393 using value_space_type = impl::to_composite_space_t<reduction_t<direct_product<LHSValueSpace, RHSValueSpace>>>;
397 impl::to_composite_space_t<reduction_t<direct_product<LHSUnit, RHSUnit>>>,
400 reduced_validator_t<LHSValidator, RHSValidator>
405 convex_space LHSValueSpace,
physical_unit LHSUnit, basis_for<free_module_type_of_t<LHSValueSpace>> LHSBasis,
class LHSValidator,
406 convex_space RHSValueSpace,
physical_unit RHSUnit, basis_for<free_module_type_of_t<RHSValueSpace>> RHSBasis, class RHSValidator
408 requires consistent_bases_v<LHSBasis, RHSBasis> && is_1d_euclidean_v<LHSValueSpace>
418 reduced_validator_t<LHSValidator, RHSValidator>
423 convex_space LHSValueSpace, physical_unit LHSUnit, basis_for<free_module_type_of_t<LHSValueSpace>> LHSBasis,
class LHSValidator,
424 convex_space RHSValueSpace, physical_unit RHSUnit, basis_for<free_module_type_of_t<RHSValueSpace>> RHSBasis, class RHSValidator
426 requires consistent_bases_v<LHSBasis, RHSBasis> && is_1d_euclidean_v<RHSValueSpace>
427 struct physical_value_product<physical_value<LHSValueSpace, LHSUnit, LHSBasis, distinguished_origin, LHSValidator>,
428 physical_value<RHSValueSpace, RHSUnit, RHSBasis, distinguished_origin, RHSValidator>>
435 distinguished_origin,
436 reduced_validator_t<LHSValidator, RHSValidator>
441 convex_space ValueSpace,
443 basis_for<free_module_type_of_t<ValueSpace>> Basis = canonical_right_handed_basis<free_module_type_of_t<ValueSpace>>,
444 class Origin = to_origin_type_t<ValueSpace, Unit>,
445 validator_for<ValueSpace> Validator =
typename Unit::validator_type
447 requires has_consistent_unit<ValueSpace, Unit>
448 && has_consistent_validator<ValueSpace, Validator>
449 && has_consistent_origin<ValueSpace, Unit, Origin>
454 using space_type = ValueSpace;
455 using units_type = Unit;
456 using basis_type = Basis;
457 using origin_type = Origin;
458 using displacement_space_type = free_module_type_of_t<ValueSpace>;
459 using intrinsic_validator_type = Unit::validator_type;
460 using validator_type = Validator;
461 using ring_type = commutative_ring_type_of_t<ValueSpace>;
462 using value_type = ring_type;
463 using displacement_type = coordinates_type::displacement_coordinates_type;
465 constexpr static std::size_t dimension{displacement_space_type::dimension};
466 constexpr static std::size_t D{dimension};
468 constexpr static bool is_intrinsically_absolute{
469 (D == 1) && !affine_space<space_type> && defines_half_line_v<intrinsic_validator_type>
472 constexpr static bool is_effectively_absolute{is_intrinsically_absolute && std::is_same_v<Validator, intrinsic_validator_type>};
473 constexpr static bool has_identity_validator{coordinates_type::has_identity_validator};
475 template<convex_space RHSValueSpace,
class RHSUnit,
class RHSBasis,
class RHSOrigin,
class RHSVal
idator>
476 constexpr static bool is_composable_with{
477 consistent_bases_v<basis_type, RHSBasis>
478 && (is_intrinsically_absolute || vector_space<space_type>)
482 template<convex_space RHSValueSpace,
class RHSUnit,
class RHSBasis,
class RHSOrigin,
class RHSVal
idator>
483 constexpr static bool is_multipicable_with{
484 consistent_bases_v<basis_type, RHSBasis>
485 && is_composable_with<RHSValueSpace, RHSUnit, RHSBasis, RHSOrigin, RHSValidator>
489 template<convex_space RHSValueSpace,
class RHSUnit,
class RHSBasis,
class RHSOrigin,
class RHSVal
idator>
490 constexpr static bool is_divisible_with{
491 weak_field<ring_type>
492 && weak_field<commutative_ring_type_of_t<RHSValueSpace>>
493 && consistent_bases_v<basis_type, RHSBasis>
494 && is_composable_with<RHSValueSpace, RHSUnit, RHSBasis, RHSOrigin, RHSValidator>
500 constexpr physical_value(value_type val, units_type)
requires (D == 1)
504 constexpr physical_value(std::span<const value_type, D> val, units_type)
509 constexpr physical_value operator-()
const noexcept(has_identity_validator)
510 requires (coordinates_type::has_distinguished_origin) && (!std::is_unsigned_v<ring_type>) && (!is_effectively_absolute)
512 return physical_value{utilities::to_array(this->values(), [](value_type t) {
return -t; }), units_type{}};
515 using coordinates_type::operator+=;
517 template<convex_space OtherValueSpace, basis_for<free_module_type_of_t<OtherValueSpace>> OtherBasis>
518 requires is_intrinsically_absolute && (std::is_base_of_v<ValueSpace, OtherValueSpace>) && consistent_bases_v<basis_type, OtherBasis>
521 this->apply_to_each_element(other.values(), [](value_type& lhs, value_type rhs){ lhs += rhs; });
525 using coordinates_type::operator-=;
527 template<convex_space OtherValueSpace, basis_for<free_module_type_of_t<OtherValueSpace>> OtherBasis>
528 requires is_intrinsically_absolute && (std::is_base_of_v<ValueSpace, OtherValueSpace>) && consistent_bases_v<basis_type, OtherBasis>
531 this->apply_to_each_element(other.values(), [](value_type& lhs, value_type rhs){ lhs -= rhs; });
535 template<convex_space OtherValueSpace, basis_for<free_module_type_of_t<OtherValueSpace>> OtherBasis>
536 requires (!std::is_same_v<ValueSpace, OtherValueSpace>) && have_compatible_base_spaces_v<ValueSpace, OtherValueSpace> && consistent_bases_v<basis_type, OtherBasis>
540 using value_space_t = std::common_type_t<typename ValueSpace::base_space, typename OtherValueSpace::base_space>;
541 using physical_value_t
543 return physical_value_t{lhs.values(), units_type{}} += rhs;
546 template<
class OtherValueSpace, basis_for<free_module_type_of_t<OtherValueSpace>> OtherBasis>
547 requires (!std::is_same_v<OtherValueSpace, displacement_space_type>)
548 && (std::is_same_v<ValueSpace, OtherValueSpace> || have_compatible_base_spaces_v<ValueSpace, OtherValueSpace>) && consistent_bases_v<basis_type, OtherBasis>
551 noexcept(has_identity_validator)
553 using disp_space_t = to_displacement_space_t<ValueSpace, OtherValueSpace>;
555 using disp_t = to_coordinates_base_type<disp_space_t, Unit, basis_t, Origin, Validator>::displacement_coordinates_type;
556 return[&] <std::size_t... Is>(std::index_sequence<Is...>) {
557 return disp_t{std::array{(lhs.values()[Is] - rhs.values()[Is])...}, units_type{}};
558 }(std::make_index_sequence<D>{});
561 template<convex_space RHSValueSpace, physical_unit RHSUnit, basis_for<free_module_type_of_t<RHSValueSpace>> RHSBasis,
class RHSOrigin,
class RHSVal
idator>
562 requires is_multipicable_with<RHSValueSpace, RHSUnit, RHSBasis, RHSOrigin, RHSValidator>
567 using physical_value_t
568 = physical_value_product_t<
573 using derived_units_type = physical_value_t::units_type;
574 return physical_value_t{lhs.value() * rhs.value(), derived_units_type{}};
577 template<convex_space RHSValueSpace,
class RHSUnit, basis_for<free_module_type_of_t<RHSValueSpace>> RHSBasis,
class RHSOrigin,
class RHSVal
idator>
578 requires is_divisible_with<RHSValueSpace, RHSUnit, RHSBasis, RHSOrigin, RHSValidator>
583 using physical_value_t
584 = physical_value_product_t<
588 using derived_units_type = physical_value_t::units_type;
589 if constexpr(dimension == 1)
591 return physical_value_t{lhs.value() / rhs.value(), derived_units_type{}};
595 return[&] <std::size_t... Is>(std::index_sequence<Is...>) {
596 return physical_value_t{std::array{(lhs.values()[Is] / rhs.value())...}, derived_units_type{}};
597 }(std::make_index_sequence<D>{});
601 [[nodiscard]]
friend constexpr auto operator/(value_type value,
const physical_value& rhs)
602 requires ((D == 1) && (is_intrinsically_absolute || vector_space<ValueSpace>))
605 using derived_units_type = physical_value_t::units_type;
606 return physical_value_t{value / rhs.value(), derived_units_type{}};
610 template<
class LoweredValueSpace,
class OtherUnit, basis_for<free_module_type_of_t<LoweredValueSpace>> OtherBasis>
611 requires std::same_as<to_base_space_t<space_type>, to_base_space_t<LoweredValueSpace>> && consistent_bases_v<basis_type, OtherBasis>
615 using value_space_t = to_base_space_t<LoweredValueSpace>;
618 if constexpr(dimension == 1)
620 return physical_value_t{this->value(), OtherUnit{}};
624 return [
this] <std::size_t... Is>(std::index_sequence<Is...>) {
625 return physical_value_t{std::array{this->values()[Is]...}, OtherUnit{}};
626 }(std::make_index_sequence<D>{});
631 namespace sets::classical
633 template<
class Arena>
636 using arena_type = Arena;
639 template<
class Arena>
642 using arena_type = Arena;
645 template<
class Arena>
648 using arena_type = Arena;
651 template<
class Arena>
654 using arena_type = Arena;
657 template<
class Arena>
660 using arena_type = Arena;
663 template<
class Arena>
666 using arena_type = Arena;
669 template<
class Arena>
672 using arena_type = Arena;
675 template<
class Arena>
678 using arena_type = Arena;
681 template<
class PhysicalValueSet>
684 using physical_value_set_type = PhysicalValueSet;
688 template<
class Space>
691 constexpr static std::size_t dimension{Space::dimension};
693 using commutative_ring_type = Space::representation_type;
694 using is_free_module = std::true_type;
695 using arena_type = Space::arena_type;
698 template<
class Space>
699 requires has_base_space_v<Space>
702 constexpr static std::size_t dimension{Space::dimension};
704 using commutative_ring_type = Space::representation_type;
705 using is_free_module = std::true_type;
707 using arena_type = Space::arena_type;
710 template<
class PhysicalValueSet, arithmetic Rep, std::
size_t D,
class Derived>
713 constexpr static std::size_t dimension{D};
714 using set_type = PhysicalValueSet;
715 using representation_type = Rep;
717 using is_convex_space = std::true_type;
718 using arena_type = PhysicalValueSet::arena_type;
721 template<
class PhysicalValueSet, arithmetic Rep, std::
size_t D,
class Derived>
724 constexpr static std::size_t dimension{D};
725 using set_type = PhysicalValueSet;
726 using representation_type = Rep;
728 using is_affine_space = std::true_type;
729 using arena_type = PhysicalValueSet::arena_type;
732 template<
class PhysicalValueSet, arithmetic Rep, std::
size_t D,
class Derived>
735 constexpr static std::size_t dimension{D};
736 using set_type = PhysicalValueSet;
737 using representation_type = Rep;
738 using field_type = Rep;
739 using is_vector_space = std::true_type;
742 template<std::
floating_po
int Rep,
class Arena>
746 using arena_type = Arena;
750 template<std::
floating_po
int Rep,
class Arena>
754 using arena_type = Arena;
758 template<std::
floating_po
int Rep,
class Arena>
762 using arena_type = Arena;
766 template<std::
floating_po
int Rep,
class Arena>
769 using arena_type = Arena;
773 template<arithmetic Rep,
class Arena>
777 using arena_type = Arena;
781 template<arithmetic Rep,
class Arena>
787 template<arithmetic Rep,
class Arena>
793 template<arithmetic Rep,
class Arena>
797 using arena_type = Arena;
800 template<arithmetic Rep,
class Arena>
803 using arena_type = Arena;
806 template<arithmetic Rep, std::
size_t D,
class Arena>
809 using arena_type = Arena;
814 template<physical_unit U>
815 inline constexpr bool has_symbol_v{
817 { U::symbol } -> std::convertible_to<std::string_view>; }
826 using validator_type = std::identity;
827 constexpr static std::string_view symbol{
"A"};
833 constexpr static std::string_view symbol{
"kg"};
839 constexpr static std::string_view symbol{
"m"};
845 constexpr static std::string_view symbol{
"s"};
851 constexpr static std::string_view symbol{
"K"};
856 using validator_type = std::identity;
857 constexpr static std::string_view symbol{
"C"};
862 using validator_type = std::identity;
863 constexpr static std::string_view symbol{
"rad"};
871 template<std::
floating_po
int T>
873 constexpr T operator()(
const T val)
const
875 if(val < T(-273.15))
throw std::domain_error{std::format(
"Value {} less than -273.15", val)};
882 constexpr static std::string_view symbol{
"degC"};
885 inline constexpr ampere_t ampere{};
886 inline constexpr kilogram_t kilogram{};
887 inline constexpr metre_t metre{};
888 inline constexpr second_t second{};
889 inline constexpr kelvin_t kelvin{};
890 inline constexpr coulomb_t coulomb{};
891 inline constexpr radian_t radian{};
893 inline constexpr celsius_t celsius{};
896 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
897 using mass = physical_value<mass_space<T, Arena>, units::kilogram_t>;
899 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
900 using length = physical_value<length_space<T, Arena>, units::metre_t>;
902 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
903 using time_interval = physical_value<time_interval_space<T, Arena>, units::second_t>;
905 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
906 using temperature = physical_value<temperature_space<T, Arena>, units::kelvin_t>;
908 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
909 using electrical_current = physical_value<electrical_current_space<T, Arena>, units::ampere_t>;
911 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
912 using angle = physical_value<angular_space<T, Arena>, units::radian_t>;
914 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
915 using width = physical_value<width_space<T, Arena>, units::metre_t>;
917 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
918 using height = physical_value<height_space<T, Arena>, units::metre_t>;
921 std::floating_point T,
922 class Arena=implicit_common_arena,
923 class Origin=implicit_affine_origin<time_space<T, Arena>>
925 using time = physical_value<time_space<T, Arena>, units::second_t, canonical_right_handed_basis<free_module_type_of_t<time_space<T, Arena>>>, Origin, std::identity>;
928 std::floating_point T,
930 class Arena = implicit_common_arena,
931 basis_for<free_module_type_of_t<position_space<T, D, Arena>>> Basis = canonical_right_handed_basis<free_module_type_of_t<position_space<T, D, Arena>>>,
932 class Origin = implicit_affine_origin<position_space<T, D, Arena>>
934 using position = physical_value<position_space<T, D, Arena>, units::metre_t, Basis, Origin, std::identity>;
937 template<vector_space ValueSpace, physical_unit Unit,
class Basis,
class Origin, val
idator_for<ValueSpace> Val
idator>
938 requires (dimension_of<ValueSpace> == 1)
940 constexpr physical_value<ValueSpace, Unit, Basis, Origin, Validator> abs(physical_value<ValueSpace, Unit, Basis, Origin, Validator> q)
942 return {std::abs(q.value()), Unit{}};
945 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
947 constexpr T sin(physical_value<angular_space<T, Arena>, si::units::radian_t> theta)
949 return std::sin(theta.value());
952 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
954 constexpr T cos(physical_value<angular_space<T, Arena>, si::units::radian_t> theta)
956 return std::cos(theta.value());
959 template<std::
floating_po
int T,
class Arena=implicit_common_arena>
961 constexpr T tan(physical_value<angular_space<T, Arena>, si::units::radian_t> theta)
963 return std::tan(theta.value());
966 template<
class Arena=implicit_common_arena, std::
floating_po
int T>
968 constexpr physical_value<angular_space<T, Arena>, si::units::radian_t> asin(T x)
970 return {std::asin(x), si::units::radian};
973 template<
class Arena=implicit_common_arena, std::
floating_po
int T>
975 constexpr physical_value<angular_space<T, Arena>, si::units::radian_t> acos(T x)
977 return {std::acos(x), si::units::radian};
980 template<
class Arena=implicit_common_arena, std::
floating_po
int T>
982 constexpr physical_value<angular_space<T, Arena>, si::units::radian_t> atan(T x)
984 return {std::atan(x), si::units::radian};
988 convex_space ValueSpace,
990 validator_for<ValueSpace> Validator=
typename Unit::validator_type
992 requires has_consistent_validator<ValueSpace, Validator>
993 using quantity = physical_value<ValueSpace, Unit, canonical_right_handed_basis<free_module_type_of_t<ValueSpace>>, to_origin_type_t<ValueSpace, Unit>, Validator>;
996 template<std::
floating_po
int Rep,
class Arena=implicit_common_arena>
997 using euclidean_1d_vector_quantity = quantity<euclidean_vector_space<Rep, 1, Arena>, no_unit_t, std::identity>;
999 template<std::
floating_po
int Rep,
class Arena=implicit_common_arena>
1000 using euclidean_half_line_quantity = quantity<euclidean_half_space<Rep, Arena>, no_unit_t>;
1009 requires (sequoia::maths::dimension_of<ValueSpace> == 1)
1012 constexpr auto parse(
auto& ctx)
1019 if constexpr(sequoia::physics::has_symbol_v<Unit>)
1020 return std::format_to(ctx.out(),
"{} {}", q.value(), Unit::symbol);
1022 return std::format_to(ctx.out(),
"{}", q.value());
Class designed for inheritance by concerete coordinate types.
Definition: Spaces.hpp:1076
Definition: PhysicalValues.hpp:451
concept for convex spaces
Definition: Spaces.hpp:517
concept to check if a validator is compatible with a convex space.
Definition: Spaces.hpp:676
Definition: PhysicalValuesDetails.hpp:33
Right-handed bases for arbitrary D, build recursively from 1D.
Definition: Spaces.hpp:1531
Definition: Spaces.hpp:774
Definition: Spaces.hpp:763
Type to indicate a distinguished origin, relevant for free modules.
Definition: Spaces.hpp:1010
Specialization for units, such as degrees Celsius, for which the corresponding quantity cannot be inv...
Definition: PhysicalValues.hpp:37
Primary class template for defining duals.
Definition: Spaces.hpp:896
A validator the the half line.
Definition: Spaces.hpp:703
Definition: PhysicalValues.hpp:768
Definition: PhysicalValues.hpp:119
Definition: PhysicalValues.hpp:97
Definition: PhysicalValues.hpp:690
Definition: PhysicalValues.hpp:131
Definition: PhysicalValues.hpp:87
Definition: PhysicalValues.hpp:361
Definition: PhysicalValues.hpp:761
Definition: PhysicalValues.hpp:790
Definition: PhysicalValues.hpp:789
Definition: PhysicalValues.hpp:255
Definition: PhysicalValues.hpp:812
Definition: PhysicalValues.hpp:17
Definition: PhysicalValues.hpp:776
Definition: PhysicalValues.hpp:745
Definition: PhysicalValues.hpp:79
Definition: PhysicalValues.hpp:723
Definition: PhysicalValues.hpp:712
Definition: PhysicalValues.hpp:374
Definition: PhysicalValues.hpp:734
Definition: PhysicalValues.hpp:808
Definition: PhysicalValues.hpp:61
Definition: PhysicalValues.hpp:125
Definition: PhysicalValues.hpp:677
Definition: PhysicalValues.hpp:683
Definition: PhysicalValues.hpp:647
Definition: PhysicalValues.hpp:671
Definition: PhysicalValues.hpp:635
Definition: PhysicalValues.hpp:665
Definition: PhysicalValues.hpp:641
Definition: PhysicalValues.hpp:659
Definition: PhysicalValues.hpp:653
Definition: PhysicalValues.hpp:825
Definition: PhysicalValues.hpp:870
Definition: PhysicalValues.hpp:868
Definition: PhysicalValues.hpp:855
Definition: PhysicalValues.hpp:849
Definition: PhysicalValues.hpp:831
Definition: PhysicalValues.hpp:837
Definition: PhysicalValues.hpp:861
Definition: PhysicalValues.hpp:843
Definition: PhysicalValues.hpp:753
Definition: PhysicalValues.hpp:796
Definition: PhysicalValues.hpp:802
Definition: PhysicalValues.hpp:300
Definition: PhysicalValues.hpp:342
Definition: PhysicalValues.hpp:258
Definition: PhysicalValues.hpp:252
Definition: PhysicalValues.hpp:784
Definition: PhysicalValues.hpp:783