@@ -2,6 +2,9 @@ struct Partials{N,V} <: AbstractVector{V}
22 values:: NTuple{N,V}
33end
44
5+ Partials (values:: NTuple{N, Any} ) where {N} =
6+ Partials {N, mapreduce(typeof, typejoin, values)} (values)
7+
58# #############################
69# Utility/Accessor Functions #
710# #############################
@@ -197,27 +200,27 @@ end
197200 return tupexpr (i -> :(rand (V)), N)
198201end
199202
200- @generated function scale_tuple (tup:: NTuple{N} , x) where N
203+ @generated function scale_tuple (tup:: NTuple{N, Any } , x) where N
201204 return tupexpr (i -> :(tup[$ i] * x), N)
202205end
203206
204- @generated function div_tuple_by_scalar (tup:: NTuple{N} , x) where N
207+ @generated function div_tuple_by_scalar (tup:: NTuple{N, Any } , x) where N
205208 return tupexpr (i -> :(tup[$ i] / x), N)
206209end
207210
208- @generated function add_tuples (a:: NTuple{N} , b:: NTuple{N} ) where N
211+ @generated function add_tuples (a:: NTuple{N, Any } , b:: NTuple{N, Any } ) where N
209212 return tupexpr (i -> :(a[$ i] + b[$ i]), N)
210213end
211214
212- @generated function sub_tuples (a:: NTuple{N} , b:: NTuple{N} ) where N
215+ @generated function sub_tuples (a:: NTuple{N, Any } , b:: NTuple{N, Any } ) where N
213216 return tupexpr (i -> :(a[$ i] - b[$ i]), N)
214217end
215218
216- @generated function minus_tuple (tup:: NTuple{N} ) where N
219+ @generated function minus_tuple (tup:: NTuple{N, Any } ) where N
217220 return tupexpr (i -> :(- tup[$ i]), N)
218221end
219222
220- @generated function mul_tuples (a:: NTuple{N} , b:: NTuple{N} , afactor, bfactor) where N
223+ @generated function mul_tuples (a:: NTuple{N, Any } , b:: NTuple{N, Any } , afactor, bfactor) where N
221224 return tupexpr (i -> :((afactor * a[$ i]) + (bfactor * b[$ i])), N)
222225end
223226
0 commit comments