JuliaPhysics / JuliaPhysics/Measurements.jl
Proposal: new types for independent measurements and dependent measurements
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 536
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
We could make Measurement type abstract, and define two concrete types, IndependentMeasurement and DependentMeasurement (the latter may be an abuse of language but gives the idea):
abstract Measurement{T<:AbstractFloat} <: AbstractFloat
immutable IndependentMeasurement{T<:AbstractFloat} <: Measurement{T}
val::T
err::T
tag::Float64
end
immutable DependentMeasurement{T<:AbstractFloat} <: Measurement{T}
val::T
err::T
der::Derivatives{Tuple{T, T, Float64}, T}
end
measurement function would create IndependentMeasurement objects, while result function in src/math.jl would create DependentMeasurement objects. This function could have a specialized method for IndependentMeasurement only arguments, which could be fairly efficient.
Ideally, there would not be user-visible changes, apart from performance improvements.
I'm not sure this proposal will actually improve performance, I'm leaving this as a memo for me open for discussion.
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 reading the proposed Measurement, IndependentMeasurement, and DependentMeasurement definitions, then inspect src/math.jl and the measurement and result entry points. Determine whether the separation can preserve user-visible behavior and improve performance; the work is done only if the design is agreed and those effects are demonstrated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100