Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.

[ENHANCEMENT] Define tools to blockpermute axes #21

@ogauthe

Description

@ogauthe

As mentioned in ITensor/BlockSparseArrays.jl#52

I think it could be reasonable to make functionality like:

    GradedUnitRanges.blockmergesortperm
    GradedUnitRanges.blockmergesort
    GradedUnitRanges.blocksortperm
    GradedUnitRanges.blocksort (not defined yet but probably should be).

part of the public interface of GradedUnitRanges.jl, since sorting by sector and merging common sectors is a pretty common operation. However, maybe they should be renamed to:

    GradedUnitRanges.sectormergesortperm
    GradedUnitRanges.sectormergesort
    GradedUnitRanges.sectorsortperm
    GradedUnitRanges.sectorsort

to make it clearer that the sorting/merging is done by sector. I don't think there is a need for GradedUnitRanges.blockpermute(a::AbstractBlockedUnitRange, indices::AbstractVector{<:Block{1}}) since if I understand what you mean by that, that is already defined through indexing syntax like a[indices], or to get it as a new axis you can do only(axes(a[indices])) as I suggest in the comment above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions