This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-03
Channels
- # beginners (446)
- # boot (16)
- # cljs-dev (2)
- # cljsrn (30)
- # clojars (2)
- # clojure (143)
- # clojure-finland (1)
- # clojure-greece (1)
- # clojure-nl (1)
- # clojure-russia (2)
- # clojure-spec (20)
- # clojure-uk (7)
- # clojurescript (167)
- # code-reviews (1)
- # community-development (12)
- # core-async (27)
- # cursive (3)
- # data-science (9)
- # datascript (2)
- # emacs (1)
- # graphql (46)
- # immutant (5)
- # jobs (2)
- # leiningen (1)
- # luminus (1)
- # lumo (76)
- # off-topic (79)
- # perun (2)
- # protorepl (33)
- # re-frame (21)
- # reagent (62)
- # ring-swagger (1)
- # rum (18)
- # spacemacs (6)
- # specter (4)
- # test-check (4)
- # unrepl (9)
- # untangled (2)
- # vim (4)
- # yada (1)
@nwjsmith: I’m working on a similar problem. My approach (which doesn’t work yet) will be something like this: Perform a random number of “rounds” On each round, generate an arbitrary number of new nodes, then draw arbitrary edges from the already-existing nodes to new nodes. Recur on the union of new nodes and existing nodes (i.e. add the new nodes to the already existing nodes)
@alex.ter.weele I managed to figure out how to generate the DAG in the way I described: https://gist.github.com/nwjsmith/0f4288db2f7c0be8b06e5237d6175b3d
The magic happens in gen-acyclic-edges
, where we build up a list of generators of connecting edges, and call gen/tuple
on it once we're finished
OK, I get it! It took me a second to realize why gen-acyclic-edges
will never create cycles--because edges only go forward in the list.