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
SubHypergraphSearch #17309
Comments
Branch: u/ncohen/17309 |
Author: Nathann Cohen |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:9
(it was conflicting with the latest beta) |
comment:10
Guys ?... This feature is really cool, I swear. Plus you probably will not find it anywhere else.. |
comment:11
Do you iterate over embeddings of H in G, factoring out the automorphisms of H? |
comment:12
No, this code does not. It enumerates all labelled copies, and the number of copies of H that you will find in H is |
comment:13
Replying to @nathanncohen:
it should say |
comment:14
The stuff should be tested on a 32-bit system, just to make sure there is no arch-specific bugs... |
comment:15
Well, you can if you have one but I tried to be careful with respect to that and explicitly wrote |
comment:16
Trying out the patch, I get
|
comment:18
That's because the documentation of the combinat/ folder now work in a different way from the rest of Sage's doc. It is meant to be distributed with no central index of files, and I had forgotten to add my new file to the new index of files it creates. I also changed 'disjoint' into 'distinct unlabelled', and rebased everything on the latest beta. Nathann |
comment:19
it should say |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Reviewer: Dima Pasechnik |
comment:21
Replying to @nathanncohen:
OK, it works both on 64 and 32 bit (arando is still alive). |
comment:22
Wow ! Thank you very much. Nathann |
comment:23
I got this on OSX:
Just as a stab in the dark, this is often a sign of comparisons by memory location somewhere. Somehow many Python objects end in different orders in ram on OSX. |
comment:25
Can you give me access to an OSX machine ? I can't debug in the dark. Nathann |
comment:26
Replying to @nathanncohen:
If you can't find an OSX machine around, I can hook up a spare laptop running OSX so that you can ssh into it.Hopefully this will be fast enough. Do you still have access to arando box? Anyhow, you will need to ssh into arando, and from it to the laptop. Dima |
comment:27
Hello,
I just tried again the instructions you gave me on the 13/06/13 to connect to arando, but I got the following (on boxen):
A colleague of mine who has a Mac laptop "may" come in the afternoon. And if she is willing I "could" take it from her for a while, and compile Sage from its sources and stuff. But really it would be cool if the same machine that Volker uses for his tests could be used for debugging, because really it is very very troublesome to get some code to work on an architecture that I do not have access to. Nathann |
comment:28
I can give you access, just email me your ssh key. The box is not always on, so let me know when you need it. |
comment:29
Replying to @vbraun:
I think we're all set, Nathann uses an OSX laptop I hooked up via arando. At least it's not under any other load. |
comment:30
I have spent severa hours on this bug, and all I can say right now is that after a call to qsort, what is sorted on my machine is not sorted on the OSX machine. |
comment:31
Sounds like your comparison function is not a total order. This is illegal, and qsort behavior will be undefined (and different depending on the algorithm used by qsort, its often not quick sort but depends on the size of the input etc.). |
comment:32
and you return |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:34
That was it. The function returned 1 or 0, and Linux seemed to do the job alright with that. Mac OS X did not. Nathann |
Changed branch from u/ncohen/17309 to |
At long long long long last.
I have been wanting to write this for ages but never really needed it. And one should never implement something unless one needs it.
Here it is. It does what
SubgraphSearch
already does for graphs, but it does it for hypergraphs. The code is just a simple eunmeration of all possibilities, with a couple of cuts. The implementation tries to make this as cheap as possible.We now have a
IncidenceStructure.isomorphic_substructures_iterator
whose name is similar to the newPoset.has_isomorphic_subposet
.Oh, and it does not work if the pattern you try to find had >64 points. It is already very large considering how hard it is to run this code anyway, plus making it work for >64 implied a +50% cost even for small instances on my use case. So I thought it was not worth it.
Right now it handles induced and non-induced hypergraph. Later, in another patch, it can be improved to deal with another definition of "substructure" and compute things like the VC-dimension, in case somebody cares.
CC: @jm58660 @dimpase @videlec @sagetrac-Stefan
Component: combinatorial designs
Author: Nathann Cohen
Branch/Commit:
5d7a241
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/17309
The text was updated successfully, but these errors were encountered: