What is the best way to combine an SVector
and an SMatrix
, in a cat(2, vec, mat)
style?
D = 3
k = 2 # arguments
Q = rand(SMatrix{D,k})
u = rand(SVector{D})
# 1
@btime cat(2, u, Q) #doesn't return SMatrix
# 2
@btime SMatrix{D, k}(u..., Q...) # slower than 1
Or it is in general not possible / not advised?