Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosanjose committed Dec 5, 2024
1 parent 08a16c7 commit 4f22e5a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/specialmatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -663,22 +663,23 @@ Broadcast.broadcast_unalias(dest::AbstractOrbitalArray, src::AbstractOrbitalArra
# the product. x is a scalar. Inspired by LowRankMatrices.jl
#region

struct EigenProduct{T,M<:AbstractMatrix{Complex{T}},O<:OrbitalBlockStructure} <: AbstractMatrix{T}
# U and V may be SubArrays with different index type, so we need MU and MV
struct EigenProduct{T,MU<:AbstractMatrix{Complex{T}},MV<:AbstractMatrix{Complex{T}},O<:OrbitalBlockStructure} <: AbstractMatrix{T}
blockstruct::O
U::M
V::M
U::MU
V::MV
phi::T
x::Complex{T}
function EigenProduct{T,M,O}(blockstruct::O, U::M, V::M, phi::T, x::Complex{T}) where {T,M<:AbstractMatrix{Complex{T}},O<:OrbitalBlockStructure}
function EigenProduct{T,MU,MV,O}(blockstruct::O, U::MU, V::MV, phi::T, x::Complex{T}) where {T,MU<:AbstractMatrix{Complex{T}},MV<:AbstractMatrix{Complex{T}},O<:OrbitalBlockStructure}
axes(U, 2) != axes(V, 2) && argerror("U and V must have identical column axis")
return new(blockstruct, U, V, phi, x)
end
end

#region ## Constructors ##

EigenProduct(blockstruct::O, U::M, V::M, phi = zero(T), x = one(Complex{T})) where {T,M<:AbstractMatrix{Complex{T}},O<:OrbitalBlockStructure} =
EigenProduct{T,M,O}(blockstruct, U, V, T(phi), Complex{T}(x))
EigenProduct(blockstruct::O, U::MU, V::MV, phi = zero(T), x = one(Complex{T})) where {T,MU<:AbstractMatrix{Complex{T}},MV<:AbstractMatrix{Complex{T}},O<:OrbitalBlockStructure} =
EigenProduct{T,MU,MV,O}(blockstruct, U, V, T(phi), Complex{T}(x))

#endregion

Expand Down

0 comments on commit 4f22e5a

Please sign in to comment.