JuliaData / JuliaData/PooledArrays.jl
constuctor to create PooledArray sharing a pool from another PooledArray
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 49
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
In the case where you have 2+ PooledArrays and you want them to share a single pool, it would be useful to have a constructor that's something like
foo = PooledArray(rand(["a","b","c"], 5000))
bar = PooledArray(rand(["a","b","c"], 100), foo)
where bar is a PooledArray of 100 elements that share the pool of foo. Therefore, if one was to change foo.pool[1] = "zebra", every occurrence of "a" in bar would become "zebra"
The constructor would look something like
PooledArray(x, y::PooledArray)
I'm not sure of what a clean and efficient process for that would look like. Perhaps since the pool already exists, replacing every occurrence of a unique element with the corresponding pool index?
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 locating the PooledArray constructor and examining how an existing PooledArray stores its pool and element indices. Define the shared-pool behavior for PooledArray(x, y::PooledArray), including the example where changing foo.pool[1] affects bar, then verify that both arrays use the same pool.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100