- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2
 
AbstractBlockPermutation <: AbstractBlockTuple #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
          Codecov ReportAttention: Patch coverage is  
 
 Additional details and impacted files@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
+ Coverage   90.47%   92.54%   +2.07%     
==========================================
  Files          16       16              
  Lines         336      322      -14     
==========================================
- Hits          304      298       -6     
+ Misses         32       24       -8     
 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry.  | 
    
          
 I think we should just follow the design of  abstract type AbstractBlockPermutation <: AbstractBlockTuple end
struct BlockedPermutation{BlockLengths,Flat} <: AbstractBlockPermutation
  flat::Flat
  function BlockedPermutation{BlockLengths}(flat::Tuple) where {BlockLengths}
    length(flat) != sum(BlockLengths) && throw(DimensionMismatch("Invalid total length"))
    return new{BlockLengths,typeof(flat)}(flat)
  end
end(also note the rename   | 
    
| 
           I realized   | 
    
          
 Ah, good point, that sounds like a good plan. I think we should also expose   | 
    
| 
           I think this is ready to merge. I plan to start using it in   | 
    
| 
           Looks good, thanks! The constructors for   | 
    
This PR refactors
AbstractBlockedPermutationto become a subtype ofAbstractBlockTuple.It also generalizes
AbstractBlockTuple, which does not assume any type parameter convention.TBD: refactor
AbstractBlockedPermutationtype parameters to useBlockLengths,Flatinstead ofBlocks?