Conversation
Codecov ReportAttention: Patch coverage is
🚀 New features to boost your workflow:
|
|
Very clean PR and nice tests. Only comment/question is that |
Good question. I actually chose that name because at first I had A use case I could think of for Any suggestions for other names? Maybe struct TruncationComposition{F,T<:Tuple{Vararg{TruncationStrategy}}} <: TruncationStrategy
f::F
components::T
endwith a definition: function Base.:&(trunc1::TruncationStrategy, trunc2::TruncationStrategy)
return TruncationComposition(intersect, (trunc1, trunc2))
end
function findtruncated(values::AbstractVector, strategy::TruncationComposition)
inds = map(Base.Fix1(findtruncated, values), strategy.components)
return strategy.f(inds...)
end |
|
TensorKit had The proposed general |
Yes, I would picture these types would be internal (maybe we would use them internally in ITensor to implement some fancier truncation schemes, though even in those cases I imagine
I guess I could imagine other set operations ( For now I'll go with |
|
Looks good to me. I also liked the But the current |
Yes, that would be something we'd need to work out. I was thinking we could still have a tuple field, but if the
I'm good with this being merged. I'd be happy to implement the more general |
* Truncation composition * Add tests for truncation objects * Fix truncated SVD test logic * Change name to TruncationIntersection
Same as #15 with a cleaner git history.