diff --git a/REQUIRE b/REQUIRE index 072a5ba5b..f94ed7e98 100644 --- a/REQUIRE +++ b/REQUIRE @@ -6,7 +6,6 @@ Optim 0.16.0 Distributions 0.16.4 StatsBase 0.25.0 KernelDensityEstimate 0.4.0 -HDF5 0.10.2 JLD2 0.1.2 FileIO 1.0.2 ProgressMeter 0.6.0 diff --git a/examples/ApproximateConvolution.jl b/examples/ApproximateConvolution.jl index 50c3e2ce6..90f34ff58 100644 --- a/examples/ApproximateConvolution.jl +++ b/examples/ApproximateConvolution.jl @@ -10,7 +10,7 @@ import IncrementalInference: getSample toggleYTicks() -type MultiModalConditional <: IncrementalInference.FunctorPairwise +mutable struct MultiModalConditional <: IncrementalInference.FunctorPairwise x::Vector{Distribution} hypo::Categorical MultiModalConditional{D <: Distribution}(x::Vector{D}, p::Categorical) = new(x, p) diff --git a/src/FactorGraph01.jl b/src/FactorGraph01.jl index bf9675435..6109dae44 100644 --- a/src/FactorGraph01.jl +++ b/src/FactorGraph01.jl @@ -151,7 +151,7 @@ function setDefaultNodeData!(v::Graphs.ExVertex, # dims = size(initval,1) # rows indicate dimensions sp = Int[0;] #round.(Int,range(dodims,stop=dodims+dims-1,length=dims)) gbw = getBW(pN)[:,1] - gbw2 = Array{Float64}(length(gbw),1) + gbw2 = Array{Float64}(undef, length(gbw),1) gbw2[:,1] = gbw[:] pNpts = getPoints(pN) data = VariableNodeData(initval, stdev, pNpts, @@ -299,7 +299,7 @@ function getVal(vA::Array{Graphs.ExVertex,1}) cols = cumsum(cols) sc = cols[end] rw = floor(Int,rows[1]) - val = Array{Float64,2}(rw, sc) + val = Array{Float64,2}(undef,rw, sc) for i in 1:(len-1) val[:,(cols[i]+1):cols[i+1]] = vals[i] end diff --git a/src/IncrementalInference.jl b/src/IncrementalInference.jl index a38701cd7..2a551e0fe 100644 --- a/src/IncrementalInference.jl +++ b/src/IncrementalInference.jl @@ -16,7 +16,6 @@ using Random, NLsolve, StatsBase, - HDF5, JLD2, FileIO, ProgressMeter, @@ -27,7 +26,7 @@ using const KDE = KernelDensityEstimate import Base: convert -import HDF5: root +# import HDF5: root import Distributions: sample import Random: rand, rand! import KernelDensityEstimate: kde! diff --git a/src/SolveTree01.jl b/src/SolveTree01.jl index 001f28b94..b643f8bc2 100644 --- a/src/SolveTree01.jl +++ b/src/SolveTree01.jl @@ -263,7 +263,7 @@ function productbelief(fg::FactorGraph, pGM = getPoints(dens[1]) else @warn "Unknown density product on vertid=$(vertid), lennonp=$(lennonp), lenpart=$(lenpart)" - pGM = Array{Float64,2}(0,1) + pGM = Array{Float64,2}(undef, 0,1) end return pGM