Skip to content

acxz/SimpleLazyGraphs.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleLazyGraphs

Build Status

Graphs that lazily expand.

In particular, SimpleLazyGraphs create new vertices and edges as needed.

Installation

In Julia REPL:

]add SimpleLazyGraphs

Example Usage

using SimpleLazyGraphs

function neighbors_lazy(v::Integer)
    neighbors = []
    if v == 1
        neighbors = [2, 3]
    elseif v == 2
        neighbors = [1, 3]
    elseif v == 3
        neighbors = [1, 2]
    end
    return neighbors
end

g = SimpleLazyGraph(neighbors_lazy)
add_vertex!(g)
add_vertex!(g)
outneighbors(g, 1)
outneighbors(g, 2)

About

Graph data structures to add vertices and edges as needed for Graphs.jl.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages