Skip to content

Support TruncationMultiplets - #602

Open
kshyatt wants to merge 4 commits into
mainfrom
ksh/degen
Open

kshyatt wants to merge 4 commits into
mainfrom
ksh/degen

Conversation

@kshyatt

@kshyatt kshyatt commented Oct 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@kshyatt
kshyatt requested a review from lkdvos October 29, 2026 12:42
return keep
end

function _ind_to_mask!(keep::SectorVector{Bool}, inds::SectorVector{Bool})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any (re)use of calling the _ind_to_mask! from MAK itself on the parents?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAK just has ind_to_mask (no !) that's not in place

Comment thread src/factorizations/truncation.jl Outdated
Comment on lines +351 to +354
to_keep = collect(parent(_ind_to_mask!(keep, inds)))
kept_values = collect(parent(values))
perm = sortperm(kept_values; by = abs, rev = true)
MAK._keep_multiplets!(to_keep, kept_values, perm, strategy)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the collect here? Does MAK not do this itself? In particular, if we can avoid doing it here, then better support in MAK automatically transfers.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try without!

@kshyatt kshyatt mentioned this pull request Oct 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants