-
Notifications
You must be signed in to change notification settings - Fork 46
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
RandomHypergraph #510
Labels
feature
New functionality, or change in existing functionality
wolfram language
Requires Wolfram Language implementation
Comments
daneelsan
added
feature
New functionality, or change in existing functionality
wolfram language
Requires Wolfram Language implementation
labels
Nov 2, 2020
23 tasks
I think another useful API would be just specifying the total number of hyperedge parts (essentially, the "complexity"). E.g., for This way, one can generate any possible hypergraph by varying just one parameter. This will be even more useful for enumeration. |
Merged
It might also be useful to generate connected hypergraphs (maybe with an option). |
daneelsan
added a commit
that referenced
this issue
Nov 9, 2020
## Changes * Close #510. * Implements `RandomHypergraph` function. ## Comments * Missing option `"Connected" -> True` to specifically generate random connected hypergraphs. ## Examples ```wl In[] := SeedRandom[2]; RandomHypergraph[8] Out[] = {{2, 3}, {8}, {1, 6}, {7, 7}, {1}} In[] := RandomHypergraph[8, 10] Out[] = {{3, 7, 7}, {1, 7}, {10, 2, 6}} In[] := RandomHypergraph[{5, 2}] Out[] = {{5, 1}, {10, 7}, {9, 3}, {3, 2}, {4, 6}} In[] := RandomHypergraph[{{5, 2}, {4, 3}}, 2] Out[] = {{1, 1}, {1, 1}, {2, 2}, {1, 1}, {1, 2}, {1, 2, 2}, {1, 1, 2}, {1, 2, 2}, {2, 1, 1}} ``` ```wl In[]:= SeedRandom[111]; Grid[Partition[ Table[Labeled[WolframModelPlot@#, # -> i] &[ RandomHypergraph[i]], {i, 1, 12}], 3, 3, 1], Frame -> All] ``` ![image](https://user-images.githubusercontent.com/40190339/98330685-e886ca00-1fc8-11eb-92ab-1aca157be21c.png) ## Documentation ![image](https://user-images.githubusercontent.com/40190339/98401650-05a4b280-2034-11eb-9ae3-fd2b14f17c46.png) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/maxitg/setreplace/511) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature
New functionality, or change in existing functionality
wolfram language
Requires Wolfram Language implementation
The problem
Implement the
RandomHypergraph
function.Possible solution
A possible implementation and API is found in the WFR:
The text was updated successfully, but these errors were encountered: