Commit 94928d0d authored by simon's avatar simon

Added diag method for estimation of K_ii

parent 5469261b
Pipeline #44702 passed with stage
in 14 seconds
......@@ -220,6 +220,12 @@ function Base.:*(p::Partition,y :: Vector)
p*reshape(y,:,1) |> vec
end
function LinearAlgebra.:diag(p::Partition)
w = 1 ./ p.sizep
w[p.part]
end
function average(p::Partition,y :: Real)
repeat([y],p.nparts)
end
......@@ -290,3 +296,4 @@ end
function sum(p::Partition,y :: Vector)
sum(p,reshape(y,:,1)) |> vec
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment