JuliaArrays / JuliaArrays/StructArrays.jl
how to set the i,j,k index for a multidimensional structarray ?
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 402
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
Currently, to set the field values for the ijk struct, I convert first to linear indexing.
lh = LazyRow(h,i + Ny*(j-1) + Nx*Ny * (k-1));
setproperty!(lh,:x,hx)
setproperty!(lh,:y,hy)
setproperty!(lh,:z,hz)
I wonder if there is a direct way:
lh = LazyRow(h,(i,j,k));
setproperty!(lh,:x,hx)
setproperty!(lh,:y,hy)
setproperty!(lh,:z,hz)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing LazyRow and the current linear-indexing path for multidimensional struct arrays. Check how tuple indices are handled by the underlying array interface, then verify that LazyRow(h, (i,j,k)) updates x, y, and z consistently with the existing linear form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100