Skip to content

Commit 4a5db98

Browse files
committed
final simplifications
1 parent f8463bf commit 4a5db98

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

src/factorizations/diagonal.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ for f! in (:eig_vals!, :eigh_vals!, :svd_vals!)
127127
end
128128
end
129129

130-
function MAK.check_input(::typeof(eig_full!), t::DiagonalTensorMap, DV, ::DiagonalAlgorithm)
130+
function MAK.check_input(::typeof(eig_full!), t::AbstractTensorMap, DV, ::DiagonalAlgorithm)
131131
domain(t) == codomain(t) ||
132132
throw(ArgumentError("Eigenvalue decomposition requires square input tensor"))
133133

@@ -147,7 +147,7 @@ function MAK.check_input(::typeof(eig_full!), t::DiagonalTensorMap, DV, ::Diagon
147147
return nothing
148148
end
149149

150-
function MAK.check_input(::typeof(eigh_full!), t::DiagonalTensorMap, DV,
150+
function MAK.check_input(::typeof(eigh_full!), t::AbstractTensorMap, DV,
151151
::DiagonalAlgorithm)
152152
domain(t) == codomain(t) ||
153153
throw(ArgumentError("Eigenvalue decomposition requires square input tensor"))

src/factorizations/matrixalgebrakit.jl

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -212,28 +212,6 @@ function MAK.check_input(::typeof(eig_full!), t::AbstractTensorMap, DV, ::Abstra
212212
return nothing
213213
end
214214

215-
function MAK.check_input(::typeof(eig_full!), t::DiagonalTensorMap, DV, ::AbstractAlgorithm)
216-
domain(t) == codomain(t) ||
217-
throw(ArgumentError("Eigenvalue decomposition requires square input tensor"))
218-
219-
D, V = DV
220-
221-
# type checks
222-
@assert D isa DiagonalTensorMap
223-
@assert V isa AbstractTensorMap
224-
225-
# scalartype checks
226-
@check_scalar D t
227-
@check_scalar V t
228-
229-
# space checks
230-
V_D = fuse(domain(t))
231-
@check_space(D, V_D V_D)
232-
@check_space(V, codomain(t) V_D)
233-
234-
return nothing
235-
end
236-
237215
function MAK.check_input(::typeof(eigh_vals!), t::AbstractTensorMap, D, ::AbstractAlgorithm)
238216
@check_scalar D t real
239217
@assert D isa DiagonalTensorMap

0 commit comments

Comments
 (0)