v2.0.0 — imap, MappedRef, modular source layout#10
Merged
AFeuerpfeil merged 6 commits intomainfrom Apr 2, 2026
Merged
Conversation
Breaking changes:
- PeriodicArray type signature: {T,N,A,F} → {T,N,A,F,G} (adds imap type param G)
- Internal field renamed from .map to .fmap; new .imap field added
- Source split into types.jl, indexing.jl, broadcast.jl, vector_interface.jl,
repeat.jl, circshift.jl, reverse.jl, mapped_ref.jl
New features:
- PeriodicArray now accepts an explicit imap for setindex! (defaults to
NegatedShiftMap(fmap) when omitted, preserving previous behaviour)
- New MappedRef type and mapped_ref(arr, I...) for lazy mutable out-of-bounds
element access, fixing iterated mutation (e.g. x[i][j] = v)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PeriodicArraytype signature extended from{T,N,A,F}to{T,N,A,F,G}— addsGfor the inverse map type; internal field renamed from.mapto.fmap, new.imapfield addedtypes.jl,indexing.jl,broadcast.jl,vector_interface.jl,repeat.jl,circshift.jl,reverse.jl,mapped_ref.jl)PeriodicArrayaccepts an explicitimapargument forsetindex!; defaults toNegatedShiftMap(fmap)(i.e.(x, shifts...) -> fmap(x, -shifts...)) preserving previous behaviourMappedReftype andmapped_ref(arr, I...)— lazy mutable wrapper for out-of-bounds elements that appliesfmapon reads andimapon writes, fixing the long-standing limitation where iterated mutation (x[i][j] = v) silently did nothing