#13917: IndependentSets class
---------------------------------+------------------------------------------
Reporter: ncohen | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-5.10
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: ahmorales
Authors: Nathann Cohen | Merged in:
Dependencies: #14589 | Stopgaps:
---------------------------------+------------------------------------------
Comment (by vdelecroix):
Replying to [comment:13 ncohen]:
> > 1) you should move `bitset_are_disjoint` to `sage.misc.bitset` as
somebody else may want to use it.
>
> Hmmmm... I did not move it there for the function does not take bitsets
as input, but `unsigned long *` pointers... So I felt that it did not
belong there. If you are convinced that it should be there, no problem and
I will move it. I really had no idea.
I see why now. I thought that a bitset was a "unsigned long *" but it is a
struct that contains it. is nothing more than an "unsigned long *". I
would prefer if you move your function and make it takes bitset_s (=
bitset_t *) as input.
> > 2) your example to iterate over the independent set of given
cardinality is nice to learn Python but not to learn a good algorithm...
If I want the independent sets of cardinality 1 of a grid graph 12x12 it
will take an hour just to obtain my 144 independent sets.
>
> Hmmm.. `-_-`
> Right.
>
> Do you want me to add options to list independent sets with a special
filter according to the number of vertices ?
I see two solutions:
- You do not want to do the change, then mention, just next to the
example, that this is not necessarily a good idea
- add a special filter according to the number of vertices (it is
straightforward to add constants min_num_verts and max_num_verts within
your iterator)
> > 3)
> > [...]
> > BOOOOOOOOOOOOOOOOOOOOOOOOOOOOM!!!
> > [...]
> > REBOOOOOOOOOOOOOOOOOOOOOOOOOOM!!
> > [...]
>
> Oh. I saw your `ProgrammerError` in the patch, but there is no segfault
on my side.
> [...]
> Admittedly the error message has to be fixed, but no segfault. `O_o`
>
> The empty graph produces a segfault allright. But of course the empty
graph is not really a graph `:-P`
>
Your computer is better than mine ;-) What sage version are you running ?
I will compile the rc1 and see what I get (I was on 5.10.beta4).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13917#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.