[sage-support] Re: failure to logging input
Hi, Name the log "last_session.py" then do load "last_session.py" and see what happens. The problem is that log is already "preparsed" (it's .py code not .sage code). William On Fri, Feb 27, 2009 at 9:41 AM, Foadi, James wrote: > > Thank you. > The release is: > > > Sage Version 3.2.3, Release Date: 2009-01-05 > > > The file is pasted here: > > > #log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE *** > #log# DO NOT CHANGE THIS LINE OR THE TWO BELOW > #log# opts = Struct({'__allownew': True, > 'interact': 1, > 'logfile': 'last_session.sage', > 'profile': ''}) > #log# args = [] > #log# It is safe to make manual edits below here. > #log#--- > _ip.magic('run -i > "/home/james/.sage/temp/ubuntu8/14993/_home_james__sage_init_sage_0.py"') > load("setup") > load("/home/james/workSAGE/setup") > _ip.system("ls") > load("setup") > _ip.system("rm -f setup") > _ip.system("ls") > _ip.magic('logstart "last_session.sage"') > > a=sin(Integer(2)*pi*x) > a(Integer(1)) > a(Integer(2)) > type(a) > def a(x): > return sin(Integer(2)*pi*x) > a(Integer(1)) > a(RealNumber('0.5')) > _ip.magic("quit ") > - > > > J > > > > > > From: sage-support@googlegroups.com [sage-supp...@googlegroups.com] On Behalf > Of mabshoff [michael.absh...@mathematik.uni-dortmund.de] > Sent: 27 February 2009 14:40 > To: sage-support > Subject: [sage-support] Re: failure to logging input > > On Feb 27, 6:32 am, "Foadi, James" wrote: >> Dear all, > > Hi, > >> I have logged a SAGE session to a file output called "last_session.sage". >> Next time I have started SAGE and tried to load that file as follows: >> >> sage: load "last_session.sage" >> >> I got the following error message: >> >> >> IndentationError: unexpected indent >> (_home_james_workSAGE_last_session_sage_1.py, line 9) >> >> WARNING: Failure executing file: >> > e_1.py> >> >> Anyone can help me with this? > > Can you post that file? If is large or your mailer messes up > attachments you might want to stick it on some webpage and post a link > here. > > Also: What Sage release are you using? > >> Many thanks, >> >> J > > Cheers, > > Michael > > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Migrating notebooks etc. in VM
On Fri, Feb 27, 2009 at 1:22 PM, kcrisman wrote: > > >> The snapshots are irrelevant. > > Great, we figured. They are taking half the disk space currently in > the VM :) > >> >> Are you using the sage-vmware-3.2.3.zip VMware for Windows virtual machine? >> What are you using? >> > > Unless there's another VMWare image... that's the only one I even see. > >> If you get the permissions right, etc., then copying the .sage >> directory over must work. > > Has anyone actually tried this, though? It's just not working. That > is, Sage works and you can do 2+2 etc. But the migration of old user > accounts is not working. > > Sysadmin asks: The permissions on which files, exactly? This might > help us figure out what we did wrong. On the .sage files. Maybe you could try just doing chmod a+rwx -R .sage to make the permissions maximally permissive... as a test. > Thanks a ton; I need to keep the old accounts mid-semester because one > class is using it quite heavily and has old class notes on it that > would be very painful for them to upload again, but it would be really > nice for other classes to be able to access so much of the new > functionality - jsmath update, TinyMCE, the new plotting stuff, etc. You'll be able to do so. Don't worry. How big is the .sage directory with all snapshots deleted? If you get totally stuck, you could upload a tarball of that directory, and I could surely install it into a vmware image of sage-3.3, then zip it up. -- William --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Hidden Issues in Optimization
On Feb 27, 9:47 am, linuxgus wrote: > Can somebody shed some light on this and/or suggest alternative ways > of doing this? Well, when I try debugging this (that is, run your code, see it crash, type: %debug to get into the debugger where I can run code), I see that your function is returning a 150x1 array and it's being called in a context that's expecting a scalar. Carl --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Small groups library is missing
On Feb 27, 3:37 am, David Joyner wrote: > Just a guess that the skpg install script hardwires the wrong > directory for the GAP pkgs. I have been thinking about such build problems and similar things happen in various other places. One way to attach this is to have a script called sage-gap-version that just returns the name of the current GAP install. This could be used if there were additional GAP packages in the future and there would be a good chance that things just keep working and as an added bonus would likely keep working with older Sage versions using older GAP releases, i.e. the optional GAP packages spkg would keep working with Sage releases prior to Sage 3.3. One way to attack this would be to use something along the lines of mabsh...@sage:/scratch/mabshoff/sage-3.4.alpha1/spkg/standard$ ./ newest_version gap gap-4.4.12.p1 and strip the ".pX" off the version number in case it exists. Another one would be to look into the right directory and find the highest currently installed GAP version. Cheers, Michael --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Request
On Feb 27, 1:10 pm, Robert Bradshaw wrote: > On Feb 27, 2009, at 11:13 AM, Santanu Sarkar wrote: > > > Can any one give me implementation of LLL algorithm in C/C++ > > Language? fpLLL can be downloaded from http://perso.ens-lyon.fr/damien.stehle/english.html Sage doe not ship the latest version, so you might want to use that. > All the source code used in Sage is open source, you can download it > and look around. Specifically, all .spkg files are bzipped tars and > can be unpacked. Both pari and fpLLL provide an LLL algorithm in C. > If you need to use it for something, however, be sure to respect the > GPL. fpLLL is released under the LGPL, but other than that +1 > - Robert Cheers, Michael --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Inverse laplace transform and Post integration formula - symbolic derivative?
Well, I'm already starting to bother!! :) If you need any help in reviewing that stuff (provided that I'm not a mathematician), let me know. Apart from the fact that I'll be out of country for work during next week.. See you in 7 days!! Maurizio On 27 Feb, 17:12, Robert Dodier wrote: > On Feb 26, 4:24 pm, mabshoff > dortmund.de> wrote: > > Have you check with the Maxima folks? There is quite a bit of code in > > contrib that isn't particularly well integrated. IMHO this is a place > > where the Maxima folks could improve Maxima a lot by integrating the > > code into the main Maxima codebase, i.e. there is a solver in there > > that can handle a lot more systems than the default one and most > > people will not look for another solver once the one in default Maxima > > does not do what they want it to do. > > One of the projects I have on the back burner is to do a review > of the all the junk in maxima/share, to sort out the stuff that > can be merged into the core, or needs clean up, or should be axed. > Feel free to bother me about it if you don't hear anything. > > Robert Dodier --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Request
On Feb 27, 2009, at 11:13 AM, Santanu Sarkar wrote: > Can any one give me implementation of LLL algorithm in C/C++ > Language? All the source code used in Sage is open source, you can download it and look around. Specifically, all .spkg files are bzipped tars and can be unpacked. Both pari and fpLLL provide an LLL algorithm in C. If you need to use it for something, however, be sure to respect the GPL. - Robert --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Small groups library is missing
Hi David, I already created a ticket: It is #5397. Cheers, Simon --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Request
Can any one give me implementation of LLL algorithm in C/C++ Language? --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Migrating notebooks etc. in VM
> The snapshots are irrelevant. Great, we figured. They are taking half the disk space currently in the VM :) > > Are you using the sage-vmware-3.2.3.zip VMware for Windows virtual machine? > What are you using? > Unless there's another VMWare image... that's the only one I even see. > If you get the permissions right, etc., then copying the .sage > directory over must work. Has anyone actually tried this, though? It's just not working. That is, Sage works and you can do 2+2 etc. But the migration of old user accounts is not working. Sysadmin asks: The permissions on which files, exactly? This might help us figure out what we did wrong. Thanks a ton; I need to keep the old accounts mid-semester because one class is using it quite heavily and has old class notes on it that would be very painful for them to upload again, but it would be really nice for other classes to be able to access so much of the new functionality - jsmath update, TinyMCE, the new plotting stuff, etc. - kcrisman --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Hidden Issues in Optimization
I am trying a sample optimization problem. I create 150 points on an ellipse in the x-y plane. The major axis of the ellipse is x, and the minor is y (the two foci of the ellipse lie on the x-axis at equal distances from the origin). Then, I rotate the axes by -30°, and then shift the points by (0.25,0.25) and introduce some noise. After that, I try to recover the ellipse from the noisy data. The model I use to try to recover the ellipse from the noisy data is based on the fact that if the ellipse is shifted back to the origin, the eigenvectors of the resulting quadratic will each lie along a major axis. For the ellipse which is shifted to the origin (but still tilted) the equation is w'Aw=1, where A is the matrix describing the quadratic form, w is a vector from the origin to any point on the ellipse, and the prime denotes "transpose" (as in Matlab/Scilab). Since the 2×2 matrix A is symmetric, it is diagonalizable, has two distinct (and orthogonal) eigenvectors e1 and e2, with corresponding eigenvalues λ1 and λ2. Therefore, A=λ1*e1*e1' + λ2*e2*e2' (observe that the ROW eigenvector is the SECOND vector in each product; for details see Gilbert Strang's book "Linear Algebra and its Applications" and/or watch his online lectures at ocw.mit.edu). The model is based on this. Here is the code: import numpy,scipy,os,sys,pylab,matplotlib from scipy import pi as PI # Create 150 points on the ellipse x**2+4*y**2=1 phi=scipy.linspace(-PI,+PI,150) theta=var('theta') theta=PI/6. x=numpy.cos(phi);y=0.5*numpy.sin(phi) # Rotate the axes by -30° and shift them by (-0.25,-0.25); inject some noise xx=x*cos(theta)+y*sin(theta)+[normalvariate(0.25,.0075) for i in range (150)] yy=-x*sin(theta)+y*cos(theta)+[normalvariate(0.25,.0075) for i in range (150)] # Try to recover the tilted and shifted ellipse from the noisy data x1,y1,x2,y2,lambda1,lambda2,X,Y=var ('x_1,y_1,x_2,y_2,lambda_1,lambda_2,X,Y') B=transpose( numpy.array([xx,yy,numpy.ones (150)],dtype='float64') ) X=1.0 Y=1.0 lambda1=1.0 lambda2=1.0 x1=1.0 y1=1.0 x2=1.0 y2=1.0 xx=xx.reshape(150,1);yy=yy.reshape(150,1) def elp(xx,yy,X,Y,x1,y1,x2,y2,lambda1,lambda2): xo=xx-numpy.ones((150,1))*X#x-offsets yo=yy-numpy.ones((150,1))*Y# y-offsets return lambda1*((x1*xo)**2+(y1*yo)**2) + lambda2*( (x2*xo)**2+ (y2*yo)**2 ) find_fit(B,elp,parameters=[X,Y,x1,y1,x2,y2,lambda1,lambda2],variables= [xx,yy],solution_dict=1) When I run the above code, I get: Traceback (most recent call last): File "", line 1, in File "/home/nonsense/.sage/sage_notebook/worksheets/linuxgus/1/code/ 1.py", line 38, in find_fit(B,elp,parameters= [X,Y,x1,y1,x2,y2,lambda1,lambda2],variables= [xx,yy],solution_dict=_sage_const_1 ) File "/usr/local/sage-3.3/local/lib/python2.5/site-packages/ SQLAlchemy-0.4.6-py2.5.egg/", line 1, in File "/usr/local/sage-3.3/local/lib/python2.5/site-packages/sage/ numerical/optimize.py", line 553, in find_fit estimated_params, d = leastsq(error_function, initial_guess, args = (x_data, y_data)) File "/usr/local/sage-3.3/local/lib/python2.5/site-packages/scipy/ optimize/minpack.py", line 264, in leastsq m = check_func(func,x0,args,n)[0] File "/usr/local/sage-3.3/local/lib/python2.5/site-packages/scipy/ optimize/minpack.py", line 11, in check_func res = atleast_1d(thefunc(*((x0[:numinputs],)+args))) File "/usr/local/sage-3.3/local/lib/python2.5/site-packages/sage/ numerical/optimize.py", line 546, in error_function result[row] = func(*fparams) ValueError: setting an array element with a sequence. Can somebody shed some light on this and/or suggest alternative ways of doing this? --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Damien Stehle’s fpLLL
Thank you very much On Fri, Feb 27, 2009 at 7:42 PM, mabshoff < michael.absh...@mathematik.uni-dortmund.de> wrote: > > > > On Feb 27, 5:41 am, Santanu Sarkar > wrote: > > No since in matrix dimension is (200,200). And entries are of the order > of > > 2^500. > > So using just LLL algorithm takes much time. Hence I want to use Damien > > Stehle’s fpLLL > > (currently the world’s best). > > Have you read the docstring of A.LLL? To quote the algorithm keyword > >- ``algorithm`` - string (default: "fpLLL:wrapper") > one of the algorithms mentioned below > > And this refers to the "AVAILABLE ALGORITHMS" section: > > AVAILABLE ALGORITHMS: > >- ``NTL:LLL`` - NTL's LLL + fp > >- ``fpLLL:heuristic`` - fpLLL's heuristic + fp > >- ``fpLLL:fast`` - fpLLL's fast > >- ``fpLLL:wrapper`` - fpLLL's automatic choice > (default) > > And there is is clearly mentioned that fpLLL is used *per default* > when doing a LLL reduction. > > Cheers, > > Michael > > In detail for your reading please: > >Returns LLL reduced or approximated LLL reduced lattice R > for this >matrix interpreted as a lattice. > >A lattice `(b_1, b_2, ..., b_d)` is >`(delta, eta)` -LLL-reduced if the two following >conditions hold: > >- For any `i>j`, we have `|mu_{i, j}| <= eta`, >- For any `i `delta |b_i^*|^2 <= |b_{i + 1}^* + mu_{i + 1, i} b_i^* | > ^2`, > >where `mu_{i,j} = /` and >`b_i^*` is the `i`-th vector of the Gram-Schmidt >orthogonalisation of `(b_1, b_2, ..., b_d)`. > >The default reduction parameters are `delta=3/4` and >`eta=0.501`. The parameters `delta` and >`eta` must satisfy: `0.25 < delta <= 1.0` and >`0.5 <= eta < sqrt(delta)`. Polynomial time >complexity is only guaranteed for `delta < 1`. > >The lattice is returned as a matrix. Also the rank (and > the >determinant) of self are cached if those are computed > during the >reduction. Note that in general this only happens when > self.rank() >== self.ncols() and the exact algorithm is used. > >INPUT: > > >- ``delta`` - parameter as described above (default: > 3/4) > >- ``eta`` - parameter as described above (default: > 0.501), ignored by NTL > >- ``algorithm`` - string (default: "fpLLL:wrapper") > one of the algorithms mentioned below > >- ``fp`` > >- None - NTL's exact reduction or fpLLL's > wrapper > >- ``'fp'`` - double precision: NTL's FP or fpLLL's > double > >- ``'qd'`` - quad doubles: NTL's QP > >- ``'xd'`` - extended exponent: NTL's XD or fpLLL's > dpe > >- ``'rr'`` - arbitrary precision: NTL'RR or fpLLL's > MPFR > >- ``prec`` - precision, ignored by NTL (default: auto > choose) > >- ``early_red`` - perform early reduction, ignored by > NTL (default: False) > >- ``use_givens`` - use Givens orthogonalization > (default: False) only applicable to approximate > reductions and NTL. > This is more stable but slower. > > Also, if the verbose level is = 2, some more verbose > output is > printed during the calculation if NTL is used. > > AVAILABLE ALGORITHMS: > >- ``NTL:LLL`` - NTL's LLL + fp > >- ``fpLLL:heuristic`` - fpLLL's heuristic + fp > >- ``fpLLL:fast`` - fpLLL's fast > >- ``fpLLL:wrapper`` - fpLLL's automatic choice > (default) > > >OUTPUT: a matrix over the integers > >EXAMPLE:: > >sage: A = Matrix(ZZ,3,3,range(1,10)) >sage: A.LLL() >[ 0 0 0] >[ 2 1 0] >[-1 1 3] > > > > > --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Inverse laplace transform and Post integration formula - symbolic derivative?
On Feb 26, 4:24 pm, mabshoff wrote: > Have you check with the Maxima folks? There is quite a bit of code in > contrib that isn't particularly well integrated. IMHO this is a place > where the Maxima folks could improve Maxima a lot by integrating the > code into the main Maxima codebase, i.e. there is a solver in there > that can handle a lot more systems than the default one and most > people will not look for another solver once the one in default Maxima > does not do what they want it to do. One of the projects I have on the back burner is to do a review of the all the junk in maxima/share, to sort out the stuff that can be merged into the core, or needs clean up, or should be axed. Feel free to bother me about it if you don't hear anything. Robert Dodier --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: failure to logging input
Thank you. The release is: Sage Version 3.2.3, Release Date: 2009-01-05 The file is pasted here: #log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE *** #log# DO NOT CHANGE THIS LINE OR THE TWO BELOW #log# opts = Struct({'__allownew': True, 'interact': 1, 'logfile': 'last_session.sage', 'profile': ''}) #log# args = [] #log# It is safe to make manual edits below here. #log#--- _ip.magic('run -i "/home/james/.sage/temp/ubuntu8/14993/_home_james__sage_init_sage_0.py"') load("setup") load("/home/james/workSAGE/setup") _ip.system("ls") load("setup") _ip.system("rm -f setup") _ip.system("ls") _ip.magic('logstart "last_session.sage"') a=sin(Integer(2)*pi*x) a(Integer(1)) a(Integer(2)) type(a) def a(x): return sin(Integer(2)*pi*x) a(Integer(1)) a(RealNumber('0.5')) _ip.magic("quit ") - J From: sage-support@googlegroups.com [sage-supp...@googlegroups.com] On Behalf Of mabshoff [michael.absh...@mathematik.uni-dortmund.de] Sent: 27 February 2009 14:40 To: sage-support Subject: [sage-support] Re: failure to logging input On Feb 27, 6:32 am, "Foadi, James" wrote: > Dear all, Hi, > I have logged a SAGE session to a file output called "last_session.sage". > Next time I have started SAGE and tried to load that file as follows: > > sage: load "last_session.sage" > > I got the following error message: > > > IndentationError: unexpected indent > (_home_james_workSAGE_last_session_sage_1.py, line 9) > > WARNING: Failure executing file: > e_1.py> > > Anyone can help me with this? Can you post that file? If is large or your mailer messes up attachments you might want to stick it on some webpage and post a link here. Also: What Sage release are you using? > Many thanks, > > J Cheers, Michael --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: failure to logging input
On Feb 27, 6:32 am, "Foadi, James" wrote: > Dear all, Hi, > I have logged a SAGE session to a file output called "last_session.sage". > Next time I have started SAGE and tried to load that file as follows: > > sage: load "last_session.sage" > > I got the following error message: > > > IndentationError: unexpected indent > (_home_james_workSAGE_last_session_sage_1.py, line 9) > > WARNING: Failure executing file: > e_1.py> > > Anyone can help me with this? Can you post that file? If is large or your mailer messes up attachments you might want to stick it on some webpage and post a link here. Also: What Sage release are you using? > Many thanks, > > J Cheers, Michael --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] failure to logging input
Dear all, I have logged a SAGE session to a file output called "last_session.sage". Next time I have started SAGE and tried to load that file as follows: sage: load "last_session.sage" I got the following error message: IndentationError: unexpected indent (_home_james_workSAGE_last_session_sage_1.py, line 9) WARNING: Failure executing file: Anyone can help me with this? Many thanks, J --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Damien Stehle’s fpLLL
On Feb 27, 5:41 am, Santanu Sarkar wrote: > No since in matrix dimension is (200,200). And entries are of the order of > 2^500. > So using just LLL algorithm takes much time. Hence I want to use Damien > Stehle’s fpLLL > (currently the world’s best). Have you read the docstring of A.LLL? To quote the algorithm keyword - ``algorithm`` - string (default: "fpLLL:wrapper") one of the algorithms mentioned below And this refers to the "AVAILABLE ALGORITHMS" section: AVAILABLE ALGORITHMS: - ``NTL:LLL`` - NTL's LLL + fp - ``fpLLL:heuristic`` - fpLLL's heuristic + fp - ``fpLLL:fast`` - fpLLL's fast - ``fpLLL:wrapper`` - fpLLL's automatic choice (default) And there is is clearly mentioned that fpLLL is used *per default* when doing a LLL reduction. Cheers, Michael In detail for your reading please: Returns LLL reduced or approximated LLL reduced lattice R for this matrix interpreted as a lattice. A lattice `(b_1, b_2, ..., b_d)` is `(delta, eta)` -LLL-reduced if the two following conditions hold: - For any `i>j`, we have `|mu_{i, j}| <= eta`, - For any `i/` and `b_i^*` is the `i`-th vector of the Gram-Schmidt orthogonalisation of `(b_1, b_2, ..., b_d)`. The default reduction parameters are `delta=3/4` and `eta=0.501`. The parameters `delta` and `eta` must satisfy: `0.25 < delta <= 1.0` and `0.5 <= eta < sqrt(delta)`. Polynomial time complexity is only guaranteed for `delta < 1`. The lattice is returned as a matrix. Also the rank (and the determinant) of self are cached if those are computed during the reduction. Note that in general this only happens when self.rank() == self.ncols() and the exact algorithm is used. INPUT: - ``delta`` - parameter as described above (default: 3/4) - ``eta`` - parameter as described above (default: 0.501), ignored by NTL - ``algorithm`` - string (default: "fpLLL:wrapper") one of the algorithms mentioned below - ``fp`` - None - NTL's exact reduction or fpLLL's wrapper - ``'fp'`` - double precision: NTL's FP or fpLLL's double - ``'qd'`` - quad doubles: NTL's QP - ``'xd'`` - extended exponent: NTL's XD or fpLLL's dpe - ``'rr'`` - arbitrary precision: NTL'RR or fpLLL's MPFR - ``prec`` - precision, ignored by NTL (default: auto choose) - ``early_red`` - perform early reduction, ignored by NTL (default: False) - ``use_givens`` - use Givens orthogonalization (default: False) only applicable to approximate reductions and NTL. This is more stable but slower. Also, if the verbose level is = 2, some more verbose output is printed during the calculation if NTL is used. AVAILABLE ALGORITHMS: - ``NTL:LLL`` - NTL's LLL + fp - ``fpLLL:heuristic`` - fpLLL's heuristic + fp - ``fpLLL:fast`` - fpLLL's fast - ``fpLLL:wrapper`` - fpLLL's automatic choice (default) OUTPUT: a matrix over the integers EXAMPLE:: sage: A = Matrix(ZZ,3,3,range(1,10)) sage: A.LLL() [ 0 0 0] [ 2 1 0] [-1 1 3] --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Damien Stehle’s fpLLL
No since in matrix dimension is (200,200). And entries are of the order of 2^500. So using just LLL algorithm takes much time. Hence I want to use Damien Stehle’s fpLLL (currently the world’s best). On Fri, Feb 27, 2009 at 6:49 PM, mabshoff < michael.absh...@mathematik.uni-dortmund.de> wrote: > > > > On Feb 27, 5:10 am, Santanu Sarkar > wrote: > > Can you please tell me how I can use fplll( Damien Stehle’s fpLLL) in > SAGE. > > There are some codes like this: > > sage:from sage . libs . fplll . fplll import gen_ntrulike > > sage : A = gen_ntru like (200 ,130 ,35) > > sage : time B = A .LLL( ) > > But how can I reduce a matrix which is given by me? > > You do not need to import anything explicit. See the following code to > access the LLL docstring: > > sage: A=random_matrix(ZZ,10) > sage: A.LLL? > > The last command will show you all the various options there are, i.e. > which algorithm to use (it defaults to fpLLL) and some examples how to > use this code. > > Let us know if this is not what you wanted. > > Cheers, > > Michael > > > --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Damien Stehle’s fpLLL
On Feb 27, 5:10 am, Santanu Sarkar wrote: > Can you please tell me how I can use fplll( Damien Stehle’s fpLLL) in SAGE. > There are some codes like this: > sage:from sage . libs . fplll . fplll import gen_ntrulike > sage : A = gen_ntru like (200 ,130 ,35) > sage : time B = A .LLL( ) > But how can I reduce a matrix which is given by me? You do not need to import anything explicit. See the following code to access the LLL docstring: sage: A=random_matrix(ZZ,10) sage: A.LLL? The last command will show you all the various options there are, i.e. which algorithm to use (it defaults to fpLLL) and some examples how to use this code. Let us know if this is not what you wanted. Cheers, Michael --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Damien Stehle’s fpLLL
Can you please tell me how I can use fplll( Damien Stehle’s fpLLL) in SAGE. There are some codes like this: sage:from sage . libs . fplll . fplll import gen_ntrulike sage : A = gen_ntru like (200 ,130 ,35) sage : time B = A .LLL( ) But how can I reduce a matrix which is given by me? --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Small groups library is missing
Just a guess that the skpg install script hardwires the wrong directory for the GAP pkgs. I'll look later when I have time. Workaround: just dump the small groups library in the pkg subdirectory of GAP in Sage, start GAP, load small, and reset your workspace. On Fri, Feb 27, 2009 at 4:14 AM, Simon King wrote: > > More details: > > With a sage-3.3.rc0-install on sage.math, the SmallGroups library > works. > > The SmallGroups library does *not* work for me in the following > settings: > - sage-3.3 built from source on x86_64 GNU/Linux, Dual Core AMD > Opteron(tm) Processor 270, gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE > Linux) > - sage-3.3 obtained by an upgrade of sage-3.1.2 (built from source) > on the same machine > - sage-3.3 obtained by an upgrade of sage-3.2.3 (built from source) > on x86_64 GNU/Linux, AMD Athlon(tm) 64 Processor 3700+, gcc (GCC) > 4.2.1 > > So, did something happen between sage-3.3.rc0 and sage-3.3? > > Even when I copied the working database_gap from sage.math to my > machine and did ./sage -f, it failed to work although the install > successfully finished. > > Best regards, > Simon > > > > --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Small groups library is missing
More details: With a sage-3.3.rc0-install on sage.math, the SmallGroups library works. The SmallGroups library does *not* work for me in the following settings: - sage-3.3 built from source on x86_64 GNU/Linux, Dual Core AMD Opteron(tm) Processor 270, gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) - sage-3.3 obtained by an upgrade of sage-3.1.2 (built from source) on the same machine - sage-3.3 obtained by an upgrade of sage-3.2.3 (built from source) on x86_64 GNU/Linux, AMD Athlon(tm) 64 Processor 3700+, gcc (GCC) 4.2.1 So, did something happen between sage-3.3.rc0 and sage-3.3? Even when I copied the working database_gap from sage.math to my machine and did ./sage -f, it failed to work although the install successfully finished. Best regards, Simon --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---