|
1 | 1 | import Base: transpose |
2 | 2 |
|
3 | 3 | #! format: off |
4 | | -@deprecate permute(t::AbstractTensorMap, p1::IndexTuple, p2::IndexTuple; copy::Bool=false) permute(t, (p1, p2); copy=copy) |
5 | | -@deprecate transpose(t::AbstractTensorMap, p1::IndexTuple, p2::IndexTuple; copy::Bool=false) transpose(t, (p1, p2); copy=copy) |
6 | | -@deprecate braid(t::AbstractTensorMap, p1::IndexTuple, p2::IndexTuple, levels; copy::Bool=false) braid(t, (p1, p2), levels; copy=copy) |
| 4 | +Base.@deprecate(permute(t::AbstractTensorMap, p1::IndexTuple, p2::IndexTuple; copy::Bool=false), |
| 5 | + permute(t, (p1, p2); copy=copy)) |
| 6 | +Base.@deprecate(transpose(t::AbstractTensorMap, p1::IndexTuple, p2::IndexTuple; copy::Bool=false), |
| 7 | + transpose(t, (p1, p2); copy=copy)) |
| 8 | +Base.@deprecate(braid(t::AbstractTensorMap, p1::IndexTuple, p2::IndexTuple, levels; copy::Bool=false), |
| 9 | + braid(t, (p1, p2), levels; copy=copy)) |
7 | 10 |
|
8 | | -import LinearAlgebra: svd, svd! |
| 11 | +Base.@deprecate(tsvd(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...), |
| 12 | + tsvd(t, (p₁, p₂); kwargs...)) |
| 13 | +Base.@deprecate(leftorth(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...), |
| 14 | + leftorth(t, (p₁, p₂); kwargs...)) |
| 15 | +Base.@deprecate(rightorth(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...), |
| 16 | + rightorth(t, (p₁, p₂); kwargs...)) |
| 17 | +Base.@deprecate(leftnull(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...), |
| 18 | + leftnull(t, (p₁, p₂); kwargs...)) |
| 19 | +Base.@deprecate(rightnull(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...), |
| 20 | + rightnull(t, (p₁, p₂); kwargs...)) |
| 21 | +Base.@deprecate(LinearAlgebra.eigen(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...), |
| 22 | + LinearAlgebra.eigen(t, (p₁, p₂); kwargs...), false) |
| 23 | +Base.@deprecate(eig(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...), |
| 24 | + eig(t, (p₁, p₂); kwargs...)) |
| 25 | +Base.@deprecate(eigh(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...), |
| 26 | + eigh(t, (p₁, p₂); kwargs...)) |
9 | 27 |
|
10 | | -Base.@deprecate(svd(t::AbstractTensorMap, leftind::IndexTuple, rightind::IndexTuple; |
11 | | - trunc::TruncationScheme=notrunc(), p::Real=2, alg::SVDAlg=SDD()), |
12 | | - tsvd(t, (leftind, rightind); trunc=trunc, p=p, alg=alg)) |
13 | | -Base.@deprecate(svd(t::AbstractTensorMap; |
14 | | - trunc::TruncationScheme=notrunc(), p::Real=2, alg::SVDAlg=SDD()), |
15 | | - tsvd(t; trunc=trunc, p=p, alg=alg)) |
16 | | -Base.@deprecate(svd!(t::AbstractTensorMap; |
17 | | - trunc::TruncationScheme=notrunc(), p::Real=2, alg::SVDAlg=SDD()), |
18 | | - tsvd(t; trunc=trunc, p=p, alg=alg)) |
| 28 | +for f in (:rand, :randn, :zeros, :ones) |
| 29 | + @eval begin |
| 30 | + Base.@deprecate TensorMap(::typeof($f), T::Type, P::HomSpace) $f(T, P) |
| 31 | + Base.@deprecate TensorMap(::typeof($f), P::HomSpace) $f(P) |
| 32 | + Base.@deprecate TensorMap(::typeof($f), T::Type, cod::TensorSpace, dom::TensorSpace) $f(T, P, cod, dom) |
| 33 | + Base.@deprecate TensorMap(::typeof($f), cod::TensorSpace, dom::TensorSpace) $f(cod, dom) |
| 34 | + Base.@deprecate Tensor(::typeof($f), T::Type, space::TensorSpace) $f(T, space) |
| 35 | + Base.@deprecate Tensor(::typeof($f), space::TensorSpace) $f(space) |
| 36 | + end |
| 37 | +end |
19 | 38 |
|
20 | | -# TODO: deprecate |
21 | | - |
22 | | -tsvd(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...) = tsvd(t, (p₁, p₂); kwargs...) |
23 | | -leftorth(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...) = leftorth(t, (p₁, p₂); kwargs...) |
24 | | -rightorth(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...) = rightorth(t, (p₁, p₂); kwargs...) |
25 | | -leftnull(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...) = leftnull(t, (p₁, p₂); kwargs...) |
26 | | -rightnull(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...) = rightnull(t, (p₁, p₂); kwargs...) |
27 | | -LinearAlgebra.eigen(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...) = LinearAlgebra.eigen(t, (p₁, p₂); kwargs...) |
28 | | -eig(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...) = eig(t, (p₁, p₂); kwargs...) |
29 | | -eigh(t::AbstractTensorMap, p₁::IndexTuple, p₂::IndexTuple; kwargs...) = eigh(t, (p₁, p₂); kwargs...) |
| 39 | +Base.@deprecate EuclideanProduct() EuclideanInnerProduct() |
30 | 40 |
|
31 | 41 | #! format: on |
0 commit comments