Skip to content

Commit

Permalink
tightening things up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
sbromberger committed Jul 29, 2015
1 parent 0e1e1be commit c273838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/BayesNets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ end

function removeEdges!(bn::BayesNet, pairs)
for p in pairs
rem_edge!(bn.dag, bn.index[p[1]], bn.index[p[2]])
removeEdge!(bn, p[1], p[2])
end
bn
end
Expand Down
4 changes: 2 additions & 2 deletions src/learning.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ end
function statistics(b::BayesNet, alpha = 0.)
n = length(b.names)
r = [length(domain(b, node).elements) for node in b.names]
parentList = [int(collect(in_neighbors(b.dag, i))) for i = 1:n]
parentList = [collect(in_neighbors(b.dag, i)) for i = 1:n]
N = cell(n)
for i = 1:n
q = 1
Expand All @@ -53,7 +53,7 @@ end
function statistics!(N::Vector{Any}, b::BayesNet, d::Matrix{Int})
r = [length(domain(b, node).elements) for node in b.names]
(n, m) = size(d)
parentList = [int(collect(in_neighbors(b.dag, i))) for i = 1:n]
parentList = [collect(in_neighbors(b.dag, i)) for i = 1:n]
for i = 1:n
p = parentList[i]
if !isempty(p)
Expand Down

0 comments on commit c273838

Please sign in to comment.