-
Notifications
You must be signed in to change notification settings - Fork 0
Dag generators #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Dag generators #28
Conversation
|
|
||
| When ~graph~ is ~"tree"~, the generated graph is a directed | ||
| acyclic graph with a single root note that has a nil reference - | ||
| in this case: ~{"person/father: ["person/name" nil]}~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit confusing. This section is called "graphs and trees" but this paragraph indicates we're generating treelike graphs. Either change the title or describe what happens when the options "graph: tree" is omitted.
| When a ~nilabe~ option is provided, this indicates the chance | ||
| (between 0 and 1) that any generated ref is a nil reference - a | ||
| new root. Combined with the ~graph: "tree"~ option above this | ||
| implies a forest of independent trees. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what happens when "nilable" is omitted? Does it generate an infinite forest? Please describe.
|
|
||
| Options is a map of keywords to values | ||
|
|
||
| * `:graph :tree` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use - instead of *, this isn't orgmode. ;-)
| for the tree's root, and there is only a single path between any two | ||
| nodes in the graph. | ||
|
|
||
| * `:nilable CHANCE` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem.
| (is (= 4 (count (keep (comp second :cat/parent) (:cat world)))) | ||
| "One root for a tree") | ||
| (is (false? (detect-cycle world :cat/parent))))) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing test case for nilable.
No description provided.