Re: [sage-support] Re: [ANN] New free tool for TSP solving

2012-09-03 Thread Nathann Cohen
Hell !!

 I have updated OO TSP page with link to the OpenOpt TSP class file:

Thank you ! It looks like you use the MTZ formulation, with some additional
simplifications when there are vertices of in/out degree 1 in the graph :-)

The formulation we have in Sage should be very competitive, as it is more
topological than MZT.. But of course it probably depends on the instances
you want to solve, too :-)

Have fnnn !!

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: Sage's running too slowly

2012-09-03 Thread David Kirkby
On 3 September 2012 04:49, Nathann Cohen nathann.co...@gmail.com wrote:
 Honestly I don't think it's very constructive to tell users that they
 should install a different operating system in order to use Sage, and
 that is basically what this dual-booting suggestion amounts to


 I totally agree with that. And I think that it is not very constructive to
 say that Sage supports windows either, when it requires users to install a
 virtual machine.
 It does not, and saying the opposite is bad avertisement.

I've had a few disagreements with Nathann before, but in this case I
agree with him. It's probably true that 99% of Windows software would
work on Linux if you run it under a virtual machine, but it's not true
to say it supports Linux.

I run 3 versions of Windows on my OpenSolaris machine  (Windows XP
64-bit, Windows XP and Windows 7). Does it really mean all the
software I run supports OpenSolaris? I would say NO.

As a matter of interest, does this sub-domain need to exist

http://windows.sagemath.org/


Dave

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] how to factorize an expression with constant variables ?

2012-09-03 Thread mazkime
Hello,
I would like to factorize an expression with sage that contains constant 
variables (i.e. parameters), but I cannot figure out how to do that.

Here is an example : x, y are variables and A is a parameter

*
var('A x y')

f = A*x + x + A^2*exp(y) + y
print (f.factor())
*

Sage returns 'A^2*e^y + A*x + x + y'.
Instead, I would like that sage returns '(A+1)*x + (A^2+1)*exp(y)'.

How to do that ?
Thank you

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: Sage's running too slowly

2012-09-03 Thread Volker Braun
On Monday, September 3, 2012 4:49:05 AM UTC+1, Nathann Cohen wrote:

 It supports Windows as much as any Linux software that does not support 
 windows -- install a virtual machine and run it inside. And it convices 
 people that Sage is hard to install, hard to use, and slower than it 
 actually is :-P


Given the lack of fork() on windows, running Sage in a virtual machine is 
probably faster than running it under Cygwin. Especially if you have a 
modern CPU with hardware virtualization support. Also, Cygwin is 32-bit 
only.

 

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: Sage's running too slowly

2012-09-03 Thread David Kirkby
On 3 September 2012 08:49, Volker Braun vbraun.n...@gmail.com wrote:
 On Monday, September 3, 2012 4:49:05 AM UTC+1, Nathann Cohen wrote:

 It supports Windows as much as any Linux software that does not support
 windows -- install a virtual machine and run it inside. And it convices
 people that Sage is hard to install, hard to use, and slower than it
 actually is :-P


 Given the lack of fork() on windows, running Sage in a virtual machine is
 probably faster than running it under Cygwin. Especially if you have a
 modern CPU with hardware virtualization support. Also, Cygwin is 32-bit
 only.

I don't doubt what you say about speed on Cygwin or the fact Cygwin is
only 32-bit. But Nathann still makes valid points.

I produce software which runs on Unix and Linux, but I never claim it
works on Windows, despite the fact I'm 99.999% sure it would compile
on a virtual machine running Linux, Solaris, OpenBSD, FreeBSD, SCO or
any Unix or Unix-like system.

Dave

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: plot color computet by function

2012-09-03 Thread danjo86


Am Freitag, 31. August 2012 12:08:32 UTC+2 schrieb David Joyner:

 On Fri, Aug 31, 2012 at 4:53 AM, danjo86 
 dan...@sommerfeld-timmaspe.dejavascript: 
 wrote: 
  Right! It's a remain of tryings... 
  

 Does this section help? 
 http://www.sagemath.org/doc/reference/sage/plot/colors.html 

  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  sage-support group. 
  To post to this group, send email to 
  sage-s...@googlegroups.comjavascript:. 

  To unsubscribe from this group, send email to 
  sage-support...@googlegroups.com javascript:. 
  Visit this group at http://groups.google.com/group/sage-support?hl=en. 
  



Hallo,

now i am sure, that i am in the position to specify my problem:

As you has seen, i have the global variables x,y. But I need that the 
plotfunction uses his own local variables. So that the point (-2,1) get the 
color mandel(-2,1).
Maybe now anyone can help me.
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: plot color computet by function

2012-09-03 Thread Jason Grout

On 9/3/12 4:43 AM, danjo86 wrote:



Am Freitag, 31. August 2012 12:08:32 UTC+2 schrieb David Joyner:

On Fri, Aug 31, 2012 at 4:53 AM, danjo86
dan...@sommerfeld-timmaspe.de javascript: wrote:
  Right! It's a remain of tryings...
 

Does this section help?
http://www.sagemath.org/doc/reference/sage/plot/colors.html
http://www.sagemath.org/doc/reference/sage/plot/colors.html

 
  --
  You received this message because you are subscribed to the
Google Groups
  sage-support group.
  To post to this group, send email to sage-s...@googlegroups.com
javascript:.
  To unsubscribe from this group, send email to
  sage-support...@googlegroups.com javascript:.
  Visit this group at
http://groups.google.com/group/sage-support?hl=en
http://groups.google.com/group/sage-support?hl=en.
 



Hallo,

now i am sure, that i am in the position to specify my problem:

As you has seen, i have the global variables x,y. But I need that the
plotfunction uses his own local variables. So that the point (-2,1) get
the color mandel(-2,1).
Maybe now anyone can help me.



I think the problem is that the rgbcolor function is not evaluated for 
every point.  It's evaluated once for the entire plot.


Instead, I think using the 2d matrix_plot [1] or density_plot [2] would 
give you the colors you want.  Or you can use complex_plot [3]


There may also be some interesting demos here for you: 
http://wiki.sagemath.org/interact/fractal


Thanks,

Jason



[1] 
http://www.sagemath.org/doc/reference/sage/plot/matrix_plot.html#sage.plot.matrix_plot.matrix_plot


[2] 
http://www.sagemath.org/doc/reference/sage/plot/density_plot.html#sage.plot.density_plot.density_plot


[3] 
http://www.sagemath.org/doc/reference/sage/plot/complex_plot.html#sage.plot.complex_plot.complex_plot


--
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] how to factorize an expression with constant variables ?

2012-09-03 Thread Michael Orlitzky
On 09/03/12 03:26, mazkime wrote:
 Hello,
 I would like to factorize an expression with sage that contains constant
 variables (i.e. parameters), but I cannot figure out how to do that.
 
 Here is an example : x, y are variables and A is a parameter
 
 *
 var('A x y')
 
 f = A*x + x + A^2*exp(y) + y
 print (f.factor())
 *
 
 Sage returns 'A^2*e^y + A*x + x + y'.
 Instead, I would like that sage returns '(A+1)*x + (A^2+1)*exp(y)'.

Did you mean,

  f = A*x + x + A^2*exp(y) + exp(y)

in the input? Your desired output is not equal to f. If you did, this
can sort of be done:

  sage: A,x,y = var('A,x,y')
  sage: f = A*x + x + A^2*exp(y) + exp(y)
  sage: result = 0
  sage: basis = [x, exp(y)]
  sage: for b in basis:
  : coeff = f.collect(b).coefficient(b)
  : f -= coeff*b
  : result += coeff*b
  :
  sage: result
  (A + 1)*x + (A^2 + 1)*e^y

But it relies on collect() doing the right thing, which won't always
happen unfortunately. You may need to call expand() right before
collect() on some expressions. Others just won't work at all.

I suggest sprinkling simplify() in there, and checking that bool(f==0)
at the end so you can at least tell when it has failed (or succeeded
unprovably).

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] how to factorize an expression with constant variables ?

2012-09-03 Thread Michael Orlitzky
On 09/03/12 14:49, mazkime wrote:
 Thank you for your answer and sorry for the typo mistake.
 Your solution works well with the example given but doesn't work as I
 would like with exponents (x^2, ...).

Yeah it's not ideal. I needed to do this with symbolic derivatives, and
the method I posted doesn't work for those either. My workaround was to
replace e.g. f'(-1) with var('d1fx0') before trying the collect() trick.

The same thing might work here -- replacing x^2 by var('x2') or
something -- but it does get ugly after a while.


 What I would like to get is Sage returning expressions with coefficients
 sorted by the value of the exponents, like when using multivariate
 polynomial rings.
 
 ...
 
 Is there a solution to my problem ?

If there is, I'd like to know it!

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: plot color computet by function

2012-09-03 Thread danjo86
First of all, thanks for help.
You got exactly the point. 
I saw the example you post. But is there a possibility, that i calculate 
mandel within the plotfunction?

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Dual of an ideal

2012-09-03 Thread Cindy
Hi,

How can I calculate the dual of an ideal using sage?

Thanks.

Cindy

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.