@@ -84,7 +84,7 @@ Given a vector where each entry evals[t] is a uwreal array of eigenvalues, this
...
@@ -84,7 +84,7 @@ Given a vector where each entry evals[t] is a uwreal array of eigenvalues, this
The index t here runs from 1:T=lenght(evals), while the index i stands for the number of energy levels computed: i = length(evals[t])
The index t here runs from 1:T=lenght(evals), while the index i stands for the number of energy levels computed: i = length(evals[t])
It returns a vector array eff_en where each entry eff_en[t] contains the first N states energies as uwreal objects
It returns a vector array eff_en where each entry eff_en[t] contains the first N states energies as uwreal objects
"""
"""
function energies(evals::Union{Vector{Vector{uwreal}},Array{Array{uwreal}}})
function energies(evals::Union{Vector{Vector{uwreal}},Array{Array{uwreal}}};wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}},Nothing}=nothing)
time=length(evals)
time=length(evals)
n=length(evals[1])
n=length(evals[1])
eff_en=Array{Array{uwreal}}(undef,n)
eff_en=Array{Array{uwreal}}(undef,n)
...
@@ -94,7 +94,7 @@ function energies(evals::Union{Vector{Vector{uwreal}},Array{Array{uwreal}} })
...
@@ -94,7 +94,7 @@ function energies(evals::Union{Vector{Vector{uwreal}},Array{Array{uwreal}} })
ratio=evals[t][i]/evals[t+1][i]
ratio=evals[t][i]/evals[t+1][i]
aux_en[t]=0.5*log(ratio*ratio)
aux_en[t]=0.5*log(ratio*ratio)
end
end
uwerr.(aux_en)
isnothing(wpm)?uwerr.(aux_en):uwerr.(aux_en,wpm)
eff_en[i]=copy(aux_en)
eff_en[i]=copy(aux_en)
end
end
returneff_en
returneff_en
...
@@ -332,12 +332,10 @@ function make_householder(a::Vector{uwreal})
...
@@ -332,12 +332,10 @@ function make_householder(a::Vector{uwreal})
v[1]=uwreal(1.0)
v[1]=uwreal(1.0)
H=idty(n)
H=idty(n)
H=H-(2.0/uwdot(v,v))*uwdot(reshape(v,:,1),transpose(v))#this last term is a vector product
H=H-(2.0/uwdot(v,v))*uwdot(reshape(v,:,1),transpose(v))#this last term is a vector product