Skip to content

Commit

Permalink
Merge pull request #68 from JuliaRobotics/21Q1/maint/recordchoosen
Browse files Browse the repository at this point in the history
general updates, bump v0.5.4
  • Loading branch information
dehann authored Jan 10, 2021
2 parents 2549317 + 91280d1 commit caab2b1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "KernelDensityEstimate"
uuid = "2472808a-b354-52ea-a80e-1658a3c6056d"
keywords = ["NBP", "nonparametric", "kernel density", "functional products", "multiscale", "Gibbs sampling", "KDE"]
desc = "A modified version of the multiscale Gibbs product and KDE"
version = "0.5.3"
version = "0.5.4"

[deps]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Expand Down
20 changes: 10 additions & 10 deletions src/KDE01.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ end
Return the points (centers) used to construct the KDE.
"""
function getPoints(bd::BallTreeDensity)
pts=zeros(bd.bt.dims, bd.bt.num_points)
perm = bd.bt.permutation[(bd.bt.num_points + 1):end]
bd.bt.num_points, bd.bt.dims
res = reshape(bd.bt.centers[(bd.bt.dims*bd.bt.num_points+1):end], bd.bt.dims, bd.bt.num_points)
##for i in 1:bd.bt.dims
pts[:, perm ] = res[:,:]
##end
pts = pts[:,1:bd.bt.num_points]
return pts
function getPoints(bd::BallTreeDensity, idx=1:bd.bt.num_points)
perm = bd.bt.permutation[(bd.bt.num_points + 1):end]
bd.bt.num_points, bd.bt.dims
res = reshape(bd.bt.centers[(bd.bt.dims*bd.bt.num_points+1):end], bd.bt.dims, bd.bt.num_points)
# return res[:,perm[idx]]
pts=zeros(bd.bt.dims, bd.bt.num_points)
pts[:, perm ] = res[:,:]
return pts[:,idx]
# pts = pts[:,idx]
# return pts
end


Expand Down
4 changes: 2 additions & 2 deletions src/MSGibbs01.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mutable struct GbGlb
recordChoosen::Bool
end

function makeEmptyGbGlb()
function makeEmptyGbGlb(;recordChoosen::Bool=false)
return GbGlb( zeros(0,0),
zeros(0,0),
zeros(0),
Expand All @@ -52,7 +52,7 @@ function makeEmptyGbGlb()
Float64[0.0;], Float64[0.0;],
zeros(0), zeros(0),
Dict{Int,Dict{Int,Dict{Int,Int}}}(),
false )
recordChoosen )
end


Expand Down

0 comments on commit caab2b1

Please sign in to comment.