[sage-devel] Bug: Neighbors of a vertex in an immutable digraph

2018-06-10 Thread Jori Mäntysalo
Maybe this should be mentioned in the list, as this is quite a basic 
function:


sage: DiGraph({0: [1]}, immutable=False).neighbors(1)
[0]
sage: DiGraph({0: [1]}, immutable=True).neighbors(1)
[]

The ticket is https://trac.sagemath.org/ticket/25550 and I am not planning 
to work on it at least for now.


--
Jori Mäntysalo


[sage-devel] Rational functions

2018-06-10 Thread Marc Mezzarobba
Hello everyone,

Please allow me to advertise a couple of tickets currently waiting to be 
reviewed that deal with fraction field elements, and in particular 
rational fractions in several variables:

https://trac.sagemath.org/ticket/25290
https://trac.sagemath.org/ticket/23909
https://trac.sagemath.org/ticket/16268
https://trac.sagemath.org/ticket/25318

(The patchbot appears to be broken right now, but with all four branches 
at once and no optional package installed, make ptestlong passes.)

At least for some applications I'm interested in, these tickets bring 
Sage fraction field elements from "so slow they are unusable" to "not 
really great yet but reasonable".

For example, this is with sage 8.3.beta5:

sage: P. = QQ[]
: Q. = Frac(P)[]
: mat = matrix(3, 3, lambda i, j: (x+i*y+1)^j/(j*x*y+i)^(i+j))
: %time mat.det()
CPU times: user 9.23 s, sys: 0 ns, total: 9.23 s
Wall time: 9.23 s

and this is what happens with all four branches merged in:

sage: P. = QQ[]
: Q. = Frac(P)[]
: mat = matrix(3, 3, lambda i, j: (x+i*y+1)^j/(j*x*y+i)^(i+j))
: %time mat.det()
CPU times: user 38.6 ms, sys: 238 µs, total: 38.9 ms
Wall time: 37.2 ms

(This example turned out to be a bit extreme, although I didn't choose 
it on purpose. But I'm observing speedups of ×5 to ×10 on real 
applications involving operations with rational fractions.)

-- 
Marc

-- 
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] Re: divisions

2018-06-10 Thread Marc Mezzarobba
Travis Scrimshaw wrote:
>> I agree that having x^-1 and 1/x being different is confusing. I will
>> update the branch at #25524 to make them identically return a
>> rational fraction.
> 
> I think this is even worse than the confusion.

I agree with that.

>> Though, close to what Nils talked about, there is no straight
>> method for "internal division or raise error".
> 
> I thought inverse_of_unit() did this?

Only in the case of 1/b, not for general a/b...

-- 
Marc

-- 
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] Re: Permutation group: faster use of stabilizer chain from gap

2018-06-10 Thread Christian Stump
Okay, I think I got all the bottlenecks resolved now -- I'd appreciate 
further comments and reviews on the ticket (https://trac.sagemath.org/
ticket/25477 ), especially from 
someone familiar with the libgap interface.

-- 
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.