Add Data{N} type, undef constructors, and data/block indexing#150
Merged
Conversation
- Add `Data{N}` indexing type with `Block`/`Data` conversions
- Add `SectorMatrix` undef constructors using `similar(D, axes)`
- Add `FusedGradedMatrix` undef constructors (BlockedOneTo innermost)
- Add `Data` view/getindex/setindex! on FusedGradedMatrix and AbelianGradedArray
- Add `Block` setindex! on FusedGradedMatrix for SectorMatrix values
- Restructure SectorMatrix accessors: sector/data primitive, sectoraxes/axes derived
- Use `similar(D, axes)` instead of `D(undef, ...)` in all undef constructors
- Use explicit type params in convert/similar, infer elsewhere
- Add `SectorOneTo(::SectorRange, ::Base.OneTo)` constructor
- Use `blockdiagindices` in FusedGradedMatrix blocks accessor
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #150 +/- ##
==========================================
+ Coverage 85.52% 86.12% +0.60%
==========================================
Files 19 20 +1
Lines 1112 1139 +27
==========================================
+ Hits 951 981 +30
+ Misses 161 158 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, use accessor in convert Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ructor, cleanup
- Move Block/Data view/getindex/setindex! to AbstractGradedArray generic interface
- Concrete types only implement view(a, ::Block{N}) as primitive
- Add parameterized FusedGradedMatrix{T,D,S} inner constructor
- Use AbstractGradedMatrix{T} as supertype for FusedGradedMatrix
- Simplify FusedGradedMatrix undef constructor with eachblockaxis
- Add AbelianSectorArray{T,N,A,S}(::AbelianSectorDelta, data) constructor
- Use accessor in AbelianSectorArray convert
- Add Tuple(::Data), SectorOneTo(::SectorRange, ::Base.OneTo)
- Use view(m, I) .= value for Block setindex! on FusedGradedMatrix
- Clean up AbelianGradedArray undef constructor with eachblockaxis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… interface - Add check_mul_axes for FusedGradedMatrix - Use blockdiagindices + view(m, Data(I)) in mul! and * - Rewrite FusedGradedMatrix(::AbelianGradedMatrix) with undef constructor + Data indexing - Rewrite AbelianGradedArray(::FusedGradedMatrix) with Data indexing - Fix Array(a[bI]) → copy(view(a, Data(bI))) - Use eachblockstoredindex in blocks (blockdiagindices depends on blocks) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ersion Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…xes(a)) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Data{N}indexing type for raw block data access without sector wrappers, withBlock/Dataconversionsundefconstructors forSectorMatrixandFusedGradedMatrixusingsimilar(D, axes)patternDataview/getindex/setindex! onFusedGradedMatrixandAbelianGradedArray, andBlocksetindex! onFusedGradedMatrixSectorMatrixaccessors sosector/dataare primitive andsectoraxes/axesare derivedconvert/similarconstructors; infer elsewhereSectorOneTo(::SectorRange, ::Base.OneTo)constructorblockdiagindicesinFusedGradedMatrixblocksaccessorsimilar(D, axes)instead ofD(undef, ...)in existingAbelianGradedArrayundef constructorTest plan
test_data.jlwith 20 tests forDataindexing on both typestest_sectormatrix.jlandtest_abelianarray.jlData🤖 Generated with Claude Code