You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Determines the promoted numeric element type for convenience constructors of component `C`. The promotion is computed across the values of `coercive_fields(C)`, extracted from the normalized `NamedTuple` `ntv` produced by [`validate!`](@ref). This ensures all numeric fields that participate in calculations share a common element type (e.g., `Float64`, `Measurement{Float64}`).
5
+
6
+
# Arguments
7
+
8
+
- `::Type{C}`: Component type \\[dimensionless\\].
9
+
- `ntv`: Normalized `NamedTuple` returned by `validate!` \\[dimensionless\\].
10
+
- `_order::Tuple`: Ignored by this method; present for arity symmetry with `_coerced_args` \\[dimensionless\\].
11
+
12
+
# Returns
13
+
14
+
- The promoted numeric element type \\[dimensionless\\].
@inline_promotion_T(::Type{C}, ntv, _order::Tuple) where {C} =
2
23
resolve_T((getfield(ntv, k) for k incoercive_fields(C))...)
3
24
25
+
"""
26
+
$(TYPEDSIGNATURES)
27
+
28
+
Builds the positional argument tuple to feed the **typed core** constructor, coercing only the fields returned by `coercive_fields(C)` to type `Tp`. Non‑coercive fields (e.g., integer flags) are passed through unchanged. Field order is controlled by `order` (a tuple of symbols), typically `(required_fields(C)..., keyword_fields(C)...)`.
29
+
30
+
# Arguments
31
+
32
+
- `::Type{C}`: Component type \\[dimensionless\\].
33
+
- `ntv`: Normalized `NamedTuple` returned by `validate!` \\[dimensionless\\].
34
+
- `Tp`: Target element type for numeric coercion \\[dimensionless\\].
35
+
- `order::Tuple`: Field order used to assemble the positional tuple \\[dimensionless\\].
36
+
37
+
# Returns
38
+
39
+
- A `Tuple` of arguments in the requested order, with coercions applied where configured.
0 commit comments