In the lieu of the fact that the broadcast is faster than the dot syntax
I would like to replace the following code snippet
#!/usr/bin/julia
using Graphs
n = 10
p = 0.1:0.01:0.5
erdos_renyi.(n,p;is_directed=true, seed=-1)
which correctly generates 11 directed E-R-Gilbert graphs with the broadcast
function.
This works
broadcast(erdos_renyi,n,p)
but defaults to the undirected graphs. How do I use keyword arguments with the broadcast
function?
Edit:
Somebody already asked this question on the stackoverflow. I took a clue from one of the accepted answer and got what I wanted.
broadcast((x,y) -> erdos_renyi(x,y;is_directed=true, seed=-1),n,p)