Re: [sage-devel] Nauty as a default generator for graphs

2018-03-14 Thread Nicolas M. Thiery
On Fri, Mar 09, 2018 at 08:19:19AM +0200, Jori Mäntysalo wrote:
> It is much faster to say sum(1 for _ in graphs.nauty_geng(7)) than sum(1 for
> _ in graphs(7)), and after #19919 we have nauty as a standard package.
> 
> Will I break something if I change graphs(n) without any additional
> parameter to use nauty? A user really needing the old code could then say
> graphs(n, property=lambda x: True). I think that Sage documentation makes no
> promise at all about the order in which graphs are generated.

I am all for it. Nauty is sooo much faster. In fact, I'd be glad if
some of Nauty's arguments would be exposed, in particular to generate
acyclic graphs, ...

Cheers,
Nicolas

PS: +1 as well to Graphs(10), in particular to provide an easy access
point for computing the number of graphs using Pólya enumeration. Yes,
we need to settle for a definition of containment, but that should not
be too hard.

--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Nauty as a default generator for graphs

2018-03-12 Thread Jori Mäntysalo

On Fri, 9 Mar 2018, David Roe wrote:


Will I break something if I change graphs(n) without any
additional parameter to use nauty?


It did the change at https://trac.sagemath.org/ticket/24951


Sounds good to me.  You might add an algorithm keyword to the graphs
function, which defaults to nauty.


Not sure... It can be done with property=lambda _: True. I think that 
mostly algorithm-keyword should have a meaning -- there should be a 
situation where someone would prefer one over the other.


On Fri, 9 Mar 2018, 'Martin R' via sage-devel wrote:

Besides, it would also be supercool to have a class Graphs analogous to 
the class Posets, and have the cardinality of the first few layers built 
in (analogous to Posets(16).cardinality())


I am not sure about that. What should be the meaning of, say "g in 
graphs(10)" or "g in graphs"?


--
Jori Mäntysalo


Re: [sage-devel] Nauty as a default generator for graphs

2018-03-09 Thread David Roe
On Fri, Mar 9, 2018 at 1:19 AM, Jori Mäntysalo 
wrote:

> It is much faster to say sum(1 for _ in graphs.nauty_geng(7)) than sum(1
> for _ in graphs(7)), and after #19919 we have nauty as a standard package.
>
> Will I break something if I change graphs(n) without any additional
> parameter to use nauty? A user really needing the old code could then say
> graphs(n, property=lambda x: True). I think that Sage documentation makes
> no promise at all about the order in which graphs are generated.


Sounds good to me.  You might add an algorithm keyword to the graphs
function, which defaults to nauty.
David


>
>
> --
> Jori Mäntysalo
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Nauty as a default generator for graphs

2018-03-08 Thread Jori Mäntysalo
It is much faster to say sum(1 for _ in graphs.nauty_geng(7)) than sum(1 
for _ in graphs(7)), and after #19919 we have nauty as a standard package.


Will I break something if I change graphs(n) without any additional 
parameter to use nauty? A user really needing the old code could then say
graphs(n, property=lambda x: True). I think that Sage documentation makes 
no promise at all about the order in which graphs are generated.


--
Jori Mäntysalo