Replies: 2 comments 3 replies
-
julia> using IGraphs
julia> g = IGraph(); # use the wrapper that internally instantiates a `igraph_t`
julia> LibIGraph.ring(g, 4, false, false, false); # use directly the C function
julia> using Graphs
julia> Graph(IGraph(Graph(g))) == Graph(g) # a quick sanity check that we are not completely borked (by converting between a Graphs.jl and a IGraphs.jl graph)
true |
Beta Was this translation helpful? Give feedback.
-
The functions in the module The few function methods defined in the module For the aforementioned safe functions there are various ways in Julia to opt into unsafe behavior for performance reasons. E.g. the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Could you show an example of creating a graph with one of the generators?
There's a difference between how most functions that create graphs vs other data structure (such as vectors) operate. The typical vector operation goes like this: (1) init vector (2) call function that writes data into vector (3) use vector, then destroy it.
With graphs, all graph generators also initialize the graph.
Take for example
LibIGraph.ring
. For the C function, the first parameter is an uninitialized graph. It will be initialized byigraph_ring()
itself. How do you handle this in this package? How do I obtain a "ring graph" (cycle graph) using this constructor?Beta Was this translation helpful? Give feedback.
All reactions