Unable to use Types from Graphs.jl and GridGraphs.jl in Jupyter Notebook

Ah, it seems like both of them were types in GridGraphs.jl, but not anymore. AbstractGridGraph and AcyclicGridGraph were both removed before the current stable version v0.8 that you have installed.

In v0.8, AbstractGridGraph became just GridGraph, while AcyclicGridGraphs are either FullAcyclicGridGraphs or SparseAcyclicGridGraphs. For this tutorial, at a glance, it seems like a FullAcyclicGridGraph is what’s needed, so

g = FullAcyclicGridGraph(rand(h, w));

should be the equivalent.

Note that the interface is changing again in the future (v0.9 and above), instead being specified via a directions argument to GridGraph itself.

g = GridGraph(rand(h, w), directions = QUEEN_ACYCLIC_DIRECTIONS);

should be the future equivalent of this.

2 Likes