Skip to content

Commit

Permalink
Changed from LightGraphs to Graphs, fixed docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
mossr committed Jun 29, 2022
1 parent 77b67b3 commit e9a83e8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Discretizers = "6e83dbb3-75ca-525b-8ae2-3751f0dd50b4"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GraphPlot = "a2cc645c-3eea-5389-862e-a155d0052231"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
LightXML = "9c8b4983-aa76-5018-a973-4c85ecc9e179"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Expand All @@ -32,7 +32,7 @@ Distributions = "0.17,0.18,0.19,0.20,0.21,0.22,0.23,0.24, 0.25"
Documenter = "0.26, 0.27"
GraphPlot = "0.3,0.3.1,0.4,0.4.1"
IterTools = "1.3"
LightGraphs = "1.0"
Graphs = "1.0"
LightXML = "0.8,0.9"
NBInclude = "2.0"
Parameters = "0.10,0.11,0.12"
Expand Down
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
push!(LOAD_PATH, "../src")
import Pkg
Pkg.add("BayesNets")
Pkg.develop(path=".")
Pkg.add("TikzPictures")
Pkg.add("TikzGraphs")
Pkg.add("Documenter")
Expand All @@ -25,6 +25,6 @@ makedocs(
)

deploydocs(
repo = "github.com/dwijenchawra/BayesNets.jl.git",
repo = "github.com/sisl/BayesNets.jl.git",
)
return true
2 changes: 1 addition & 1 deletion src/BayesNets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import DataStructures: PriorityQueue, peek
import BayesNets.CPDs.ProbabilisticGraphicalModels: markov_blanket, is_independent, infer
import StatsBase: sample, Weights
import GraphPlot: gplot, stressmajorize_layout
import LightGraphs: DiGraph, add_edge!, rem_edge!,
import Graphs: DiGraph, add_edge!, rem_edge!,
add_vertex!, rem_vertex!, has_edge,
edges, topological_sort_by_dfs, inneighbors,
outneighbors, neighbors, is_cyclic, nv, ne,
Expand Down
6 changes: 3 additions & 3 deletions src/Factors/auxiliary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ Custom version of repeate, but only outer repetition, and only duplicates
the array for the number of times specified in `dims` for dimensions greater
than `ndims(A)`. If `dims` is empty, returns a copy of `A`.
```jldoctest
julia> duplicate(collect(1:3), 2)
```julia
julia> duplicate(collect(1:3), (2,))
3×2 Array{Int64,2}:
1 1
2 2
3 3
julia> duplicate([1 3; 2 4], 3)
julia> duplicate([1 3; 2 4], (3,))
2×2×3 Array{Int64,3}:
[:, :, 1] =
1 3
Expand Down
2 changes: 1 addition & 1 deletion src/bayes_nets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ end
"""
Returns all descendants as a list of NodeNames.
"""
dst(edge::Pair{Int,Int}) = edge[2] # LightGraphs used to return a Pair, now it returns a SimpleEdge
dst(edge::Pair{Int,Int}) = edge[2] # Graphs used to return a Pair, now it returns a SimpleEdge
function descendants(bn::BayesNet, target::NodeName)
retval = Set{Int}()
for edge in edges(bfs_tree(bn.dag, bn.name_to_index[target]))
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using BayesNets
using DataFrames
using Test
using LightGraphs
using Graphs
using Statistics
using LinearAlgebra
using Random
Expand Down

0 comments on commit e9a83e8

Please sign in to comment.