Skip to content

Commit 4c1417e

Browse files
committed
truncationunion defined in newest tensorkit version
1 parent 76e39df commit 4c1417e

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11

2-
function MatrixAlgebraKit.findtruncated(values::TensorKit.SectorVector, strategy::MatrixAlgebraKit.TruncationUnion)
3-
inds = map(Base.Fix1(MatrixAlgebraKit.findtruncated, values), strategy.components)
4-
@assert TensorKit._allequal(keys, inds) "missing blocks are not supported right now"
5-
sectors = keys(first(inds))
6-
vals = map(keys(first(inds))) do c
7-
mapreduce(Base.Fix2(getindex, c), MatrixAlgebraKit._ind_union, inds)
8-
end
9-
return TensorKit.SectorDict{eltype(sectors), eltype(vals)}(sectors, vals)
10-
end
11-
function MatrixAlgebraKit.findtruncated_svd(values::TensorKit.SectorVector, strategy::MatrixAlgebraKit.TruncationUnion)
12-
inds = map(Base.Fix1(MatrixAlgebraKit.findtruncated_svd, values), strategy.components)
13-
@assert TensorKit._allequal(keys, inds) "missing blocks are not supported right now"
14-
sectors = keys(first(inds))
15-
vals = map(keys(first(inds))) do c
16-
mapreduce(Base.Fix2(getindex, c), MatrixAlgebraKit._ind_union, inds)
17-
end
18-
return TensorKit.SectorDict{eltype(sectors), eltype(vals)}(sectors, vals)
19-
end
2+
# function MatrixAlgebraKit.findtruncated(values::TensorKit.SectorVector, strategy::MatrixAlgebraKit.TruncationUnion)
3+
# inds = map(Base.Fix1(MatrixAlgebraKit.findtruncated, values), strategy.components)
4+
# @assert TensorKit._allequal(keys, inds) "missing blocks are not supported right now"
5+
# sectors = keys(first(inds))
6+
# vals = map(keys(first(inds))) do c
7+
# mapreduce(Base.Fix2(getindex, c), MatrixAlgebraKit._ind_union, inds)
8+
# end
9+
# return TensorKit.SectorDict{eltype(sectors), eltype(vals)}(sectors, vals)
10+
# end
11+
# function MatrixAlgebraKit.findtruncated_svd(values::TensorKit.SectorVector, strategy::MatrixAlgebraKit.TruncationUnion)
12+
# inds = map(Base.Fix1(MatrixAlgebraKit.findtruncated_svd, values), strategy.components)
13+
# @assert TensorKit._allequal(keys, inds) "missing blocks are not supported right now"
14+
# sectors = keys(first(inds))
15+
# vals = map(keys(first(inds))) do c
16+
# mapreduce(Base.Fix2(getindex, c), MatrixAlgebraKit._ind_union, inds)
17+
# end
18+
# return TensorKit.SectorDict{eltype(sectors), eltype(vals)}(sectors, vals)
19+
# end

0 commit comments

Comments
 (0)