@@ -5,18 +5,18 @@ _repack_diagonal(d::DiagonalTensorMap) = Diagonal(d.data)
55for f in (:svd_compact , :svd_full , :svd_trunc , :svd_vals , :qr_compact , :qr_full , :qr_null ,
66 :lq_compact , :lq_full , :lq_null , :eig_full , :eig_trunc , :eig_vals , :eigh_full ,
77 :eigh_trunc , :eigh_vals , :left_polar , :right_polar )
8- @eval copy_input (:: typeof ($ f), d:: DiagonalTensorMap ) = copy (d)
8+ @eval MAK . copy_input (:: typeof ($ f), d:: DiagonalTensorMap ) = copy (d)
99end
1010
1111for f! in (:eig_full! , :eig_trunc! )
12- @eval function initialize_output (:: typeof ($ f!), d:: AbstractTensorMap ,
12+ @eval function MAK . initialize_output (:: typeof ($ f!), d:: AbstractTensorMap ,
1313 :: DiagonalAlgorithm )
1414 return d, similar (d)
1515 end
1616end
1717
1818for f! in (:eigh_full! , :eigh_trunc! )
19- @eval function initialize_output (:: typeof ($ f!), d:: AbstractTensorMap ,
19+ @eval function MAK . initialize_output (:: typeof ($ f!), d:: AbstractTensorMap ,
2020 :: DiagonalAlgorithm )
2121 if scalartype (d) <: Real
2222 return d, similar (d)
@@ -27,36 +27,36 @@ for f! in (:eigh_full!, :eigh_trunc!)
2727end
2828
2929for f! in (:qr_full! , :qr_compact! )
30- @eval function initialize_output (:: typeof ($ f!), d:: AbstractTensorMap ,
30+ @eval function MAK . initialize_output (:: typeof ($ f!), d:: AbstractTensorMap ,
3131 :: DiagonalAlgorithm )
3232 return d, similar (d)
3333 end
3434 # to avoid ambiguities
35- @eval function initialize_output (:: typeof ($ f!), d:: AdjointTensorMap ,
35+ @eval function MAK . initialize_output (:: typeof ($ f!), d:: AdjointTensorMap ,
3636 :: DiagonalAlgorithm )
3737 return d, similar (d)
3838 end
3939end
4040for f! in (:lq_full! , :lq_compact! )
41- @eval function initialize_output (:: typeof ($ f!), d:: AbstractTensorMap ,
41+ @eval function MAK . initialize_output (:: typeof ($ f!), d:: AbstractTensorMap ,
4242 :: DiagonalAlgorithm )
4343 return similar (d), d
4444 end
4545 # to avoid ambiguities
46- @eval function initialize_output (:: typeof ($ f!), d:: AdjointTensorMap ,
46+ @eval function MAK . initialize_output (:: typeof ($ f!), d:: AdjointTensorMap ,
4747 :: DiagonalAlgorithm )
4848 return similar (d), d
4949 end
5050end
5151
52- function initialize_output (:: typeof (left_orth!), d:: DiagonalTensorMap )
52+ function MAK . initialize_output (:: typeof (left_orth!), d:: DiagonalTensorMap )
5353 return d, similar (d)
5454end
55- function initialize_output (:: typeof (right_orth!), d:: DiagonalTensorMap )
55+ function MAK . initialize_output (:: typeof (right_orth!), d:: DiagonalTensorMap )
5656 return similar (d), d
5757end
5858
59- function initialize_output (:: typeof (svd_full!), t:: AbstractTensorMap , :: DiagonalAlgorithm )
59+ function MAK . initialize_output (:: typeof (svd_full!), t:: AbstractTensorMap , :: DiagonalAlgorithm )
6060 V_cod = fuse (codomain (t))
6161 V_dom = fuse (domain (t))
6262 U = similar (t, codomain (t) ← V_cod)
6868for f! in
6969 (:qr_full! , :qr_compact! , :lq_full! , :lq_compact! , :eig_full! , :eig_trunc! , :eigh_full! ,
7070 :eigh_trunc! , :right_orth! , :left_orth! )
71- @eval function $f! (d:: DiagonalTensorMap , F, alg:: DiagonalAlgorithm )
72- check_input ($ f!, d, F, alg)
71+ @eval function MAK . $f! (d:: DiagonalTensorMap , F, alg:: DiagonalAlgorithm )
72+ MAK . check_input ($ f!, d, F, alg)
7373 $ f! (_repack_diagonal (d), _repack_diagonal .(F), alg)
7474 return F
7575 end
7676end
7777
7878for f! in (:qr_full! , :qr_compact! )
79- @eval function check_input (:: typeof ($ f!), d:: AbstractTensorMap , QR,
79+ @eval function MAK . check_input (:: typeof ($ f!), d:: AbstractTensorMap , QR,
8080 :: DiagonalAlgorithm )
8181 Q, R = QR
8282 @assert d isa DiagonalTensorMap
@@ -91,7 +91,7 @@ for f! in (:qr_full!, :qr_compact!)
9191end
9292
9393for f! in (:lq_full! , :lq_compact! )
94- @eval function check_input (:: typeof ($ f!), d:: AbstractTensorMap , LQ,
94+ @eval function MAK . check_input (:: typeof ($ f!), d:: AbstractTensorMap , LQ,
9595 :: DiagonalAlgorithm )
9696 L, Q = LQ
9797 @assert d isa DiagonalTensorMap
@@ -106,25 +106,25 @@ for f! in (:lq_full!, :lq_compact!)
106106end
107107
108108# disambiguate
109- svd_compact! (t:: AbstractTensorMap , USVᴴ, alg:: DiagonalAlgorithm ) = svd_full! (t, USVᴴ, alg)
109+ MAK . svd_compact! (t:: AbstractTensorMap , USVᴴ, alg:: DiagonalAlgorithm ) = svd_full! (t, USVᴴ, alg)
110110
111111# f_vals
112112# ------
113113
114114for f! in (:eig_vals! , :eigh_vals! , :svd_vals! )
115- @eval function $f! (d:: AbstractTensorMap , V, alg:: DiagonalAlgorithm )
116- check_input ($ f!, d, V, alg)
115+ @eval function MAK . $f! (d:: AbstractTensorMap , V, alg:: DiagonalAlgorithm )
116+ MAK . check_input ($ f!, d, V, alg)
117117 $ f! (_repack_diagonal (d), diagview (_repack_diagonal (V)), alg)
118118 return V
119119 end
120- @eval function initialize_output (:: typeof ($ f!), d:: DiagonalTensorMap ,
120+ @eval function MAK . initialize_output (:: typeof ($ f!), d:: DiagonalTensorMap ,
121121 alg:: DiagonalAlgorithm )
122- data = initialize_output ($ f!, _repack_diagonal (d), alg)
122+ data = MAK . initialize_output ($ f!, _repack_diagonal (d), alg)
123123 return DiagonalTensorMap (data, d. domain)
124124 end
125125end
126126
127- function check_input (:: typeof (eig_full!), t:: DiagonalTensorMap , DV, :: DiagonalAlgorithm )
127+ function MAK . check_input (:: typeof (eig_full!), t:: DiagonalTensorMap , DV, :: DiagonalAlgorithm )
128128 domain (t) == codomain (t) ||
129129 throw (ArgumentError (" Eigenvalue decomposition requires square input tensor" ))
130130
@@ -144,7 +144,7 @@ function check_input(::typeof(eig_full!), t::DiagonalTensorMap, DV, ::DiagonalAl
144144 return nothing
145145end
146146
147- function check_input (:: typeof (eigh_full!), t:: DiagonalTensorMap , DV, :: DiagonalAlgorithm )
147+ function MAK . check_input (:: typeof (eigh_full!), t:: DiagonalTensorMap , DV, :: DiagonalAlgorithm )
148148 domain (t) == codomain (t) ||
149149 throw (ArgumentError (" Eigenvalue decomposition requires square input tensor" ))
150150
@@ -164,21 +164,21 @@ function check_input(::typeof(eigh_full!), t::DiagonalTensorMap, DV, ::DiagonalA
164164 return nothing
165165end
166166
167- function check_input (:: typeof (eig_vals!), t:: AbstractTensorMap , D, :: DiagonalAlgorithm )
167+ function MAK . check_input (:: typeof (eig_vals!), t:: AbstractTensorMap , D, :: DiagonalAlgorithm )
168168 @assert D isa DiagonalTensorMap
169169 @check_scalar D t
170170 @check_space D space (t)
171171 return nothing
172172end
173173
174- function check_input (:: typeof (eigh_vals!), t:: AbstractTensorMap , D, :: DiagonalAlgorithm )
174+ function MAK . check_input (:: typeof (eigh_vals!), t:: AbstractTensorMap , D, :: DiagonalAlgorithm )
175175 @assert D isa DiagonalTensorMap
176176 @check_scalar D t real
177177 @check_space D space (t)
178178 return nothing
179179end
180180
181- function check_input (:: typeof (svd_vals!), t:: AbstractTensorMap , D, :: DiagonalAlgorithm )
181+ function MAK . check_input (:: typeof (svd_vals!), t:: AbstractTensorMap , D, :: DiagonalAlgorithm )
182182 @assert D isa DiagonalTensorMap
183183 @check_scalar D t real
184184 @check_space D space (t)
0 commit comments