|
1 | 1 |
|
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