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
When I'm dealing with a nested structure, I have to use many circle structure if I wanna traverse more than a layer in a nested structure.
I mean, do we need a new operater like "dot dot" which's similar to the dot operater, to implement multi-layer
nested structure traversing?
For example:
a = b = c = h = rand(10, 1)
d = e = f = [a, b, c]
g = [d, e, f]
ar = Array{Any, 1}(undef, 3)
Usually I do this:
for i in 1 : length(g)
ar[i] = g[i] .* h
end
Could we make a "dot dot" operater working like this:
ar = g ..* h
or some forms look more scientific.
Actually I don't have a nice idea on forming this operater, if you think it's a good idea as well, I believe you can struct a great operater for us.
Sorry for bothering.
The text was updated successfully, but these errors were encountered:
fredrikekre
changed the title
Do we need a operater to easily traverse each layer in a nested structure?
Broadcasting for nested structs
May 30, 2022
When I'm dealing with a nested structure, I have to use many circle structure if I wanna traverse more than a layer in a nested structure.
I mean, do we need a new operater like "dot dot" which's similar to the dot operater, to implement multi-layer
nested structure traversing?
For example:
Usually I do this:
Could we make a "dot dot" operater working like this:
or some forms look more scientific.
Actually I don't have a nice idea on forming this operater, if you think it's a good idea as well, I believe you can struct a great operater for us.
Sorry for bothering.
The text was updated successfully, but these errors were encountered: