[sage-devel] Numerical ODE solutions

2009-05-27 Thread Ryan Hinton
Are there any (good) numerical ODE solvers in Sage at the moment? Are any available via optional spkgs? Thanks! --- Ryan Hinton rw...@virginia.edu --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this

[sage-devel] Re: What are *DIS*advantages of Sage compared to the 3 M's ?

2009-07-07 Thread Ryan Hinton
e.g. tools/process flows are streamlined for _inside_ the Sage tree. For example, I haven't figured out how to use a .pyx file outside the Sage tree. (I used .spyx files instead.) Just my humble opinion. Enjoy! --- Ryan Hinton PhD candidate, electrical engineering University of Virginia

[sage-devel] Re: Groebner bases over symbolic ring

2009-07-21 Thread Ryan Hinton
OK, this is now #6581. I assume it's just the MPolynomialRing_polydict class missing the monomial_divides method. Can anybody recommend a good approach for this? Thanks! - Ryan On Jul 21, 12:44 pm, William Stein wrote: > On Tue, Jul 21, 2009 at 9:37 AM, Ryan Hinton wrote: > >

[sage-devel] Sage 4.1 compilation problem

2009-07-23 Thread Ryan Hinton
I compiled Sage on two nearly identical machines at school. One succeeded, the other failed building givaro (see make output below). I did a quick Google search on the error message, and one author called this the "dangling extern "C" syndrome." Sure enough, the givaro header (see below) ha

[sage-devel] Polynomial to SR cannot extract variables

2009-09-15 Thread Ryan Hinton
I am trying to convert a multivariate polynomial to the symbolic ring for manipulation. In particular, subs() for the polynomial was *really* slow. I think the following should work. R. = QQ[] eq = a^2 + 2*b sreq = SR(eq) sra, srb = sreq.variables() sreq.subs(sra=3) # should return 9 + 2*b,

[sage-devel] File location for pseudo-random number generator

2009-03-02 Thread Ryan Hinton
ths. Since the theory is based on matrices and polynomials over GF(2), Sage seems a good choice. But I need a place to put my file(s)! Opinions and feedback are welcome. Thanks! [1] ``Improved Long-Period Generators Based on Linear Recurrences Modulo 2'', ACM Transactions on Mathema

[sage-devel] Re: File location for pseudo-random number generator

2009-03-05 Thread Ryan Hinton
William Stein wrote: > On Mon, Mar 2, 2009 at 4:11 PM, Carl Witty wrote: >> On Mon, Mar 2, 2009 at 3:35 PM, William Stein wrote: >>> On Mon, Mar 2, 2009 at 2:07 PM, Ryan Hinton wrote: >>>> ... >>>> So I'm trying to implement a search >>

[sage-devel] Reduced basis for lattice of polynomials over GF(2)

2009-03-06 Thread Ryan Hinton
L'Ecuyer, ``Lattice Computations for Random Numbers'', Mathematics of Computation, 69, 230 (2000), 757--765. [4] A. K. Lenstra. Factoring multivariate polynomials over finite fields. Journal of Computer and System Sciences, 30:235–248

[sage-devel] Re: Reduced basis for lattice of polynomials over GF(2)

2009-03-06 Thread Ryan Hinton
rationals bad). I would guess that it could be implemented more > efficiently over GF(2). > > John Cremona > > PS See http://www.warwick.ac.uk/staff/J.E.Cremona/theses/index.html > for the thesis (it's the last one) > > PS I have paper copy (only) of the Lenstra paper >

[sage-devel] Re: Semantics of %

2009-03-12 Thread Ryan Hinton
Robert, Since I hit the problem I'm motivated to chime in. I also followed the email trail on the cython list. Quick summary: [X] Let the programmer decide, with [X'] Get 4 as the default There are obviously some cases where speed is paramount and others where Python compatibility is paramo

[sage-devel] Re: Semantics of %

2009-03-13 Thread Ryan Hinton
as long as it is clearly documented. Perhaps a Wiki page, FAQ entry, and/or manual entry of differences between Cython and Python. Thanks! - Ryan Ryan Hinton wrote: > Robert, > > Since I hit the problem I'm motivated to chime in. I also followed the > email trail on the cyth

[sage-devel] Re: #5535

2009-03-18 Thread Ryan Hinton
Unfortunately, I don't know what on earth is_primitive() is doing there. I didn't put it there. I wrote the patch to as a performance enhancement to the _existing_ is_primitive implementation. is_primitive was there already, so the current ticket is probably not the best place to discuss

[sage-devel] Re: #5535

2009-03-18 Thread Ryan Hinton
rime coefficients) is certainly not very useful over fields as it >> is the same as "non-zero", so we are left with the question "what, if >> anything, should we take is_primitive() to mean for polynomials in >> F[x] where F is an infinite field?" >>

[sage-devel] Re: #5535

2009-03-18 Thread Ryan Hinton
as it > is the same as "non-zero", so we are left with the question "what, if > anything, should we take is_primitive() to mean for polynomials in > F[x] where F is an infinite field?" > > John > > 2009/3/18 Ryan Hinton : >> Unfortunately, I don&

[sage-devel] Vector over GF(2) and the Berlekamp-Massey algorithm

2009-03-18 Thread Ryan Hinton
After I made the (now hotly-debated :-) enhancement to the misnamed/misplaced Polynomial.is_primitive method, my next performance bottleneck was the very clean implementation of the Berlekamp-Massey algorithm in sage/matrix/berlekamp_massey.py. I noticed that NTL has an implementation of this

[sage-devel] Re: Sage 3.4.1.alpha0 released

2009-03-30 Thread Ryan Hinton
dt module patch at #5520 > * SSE2 only support for ATLAS build > > Sources as well as a sage.math only binary can be found in > > http://sage.math.washington.edu/home/mabshoff/release-cycles-3.4.1/ > > Please build, test and report any issues. > > Cheers, > > Michael &

[sage-devel] Graph.parent() missing

2010-02-19 Thread Ryan Hinton
Most classes in Sage have a .parent() method. I'm not a proper mathematician, so I'm not sure what it really means, but I use it for debugging occasionally. :-) The Graph class does not have this method. Should it? What should it return? Thanks! - Ryan -- To post to this group, send an emai

[sage-devel] Failure building MPIR on sage 4.3.2

2010-02-22 Thread Ryan Hinton
I've cleaned and retried this a few times but without any luck. I'm happy to provide more detailed information or try a debug session over IRC. Any help is greatly appreciated. Thanks! $ uname -a Linux myhostname 2.6.29-2 #1 SMP Tue May 19 12:56:32 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux $ cat

[sage-devel] Re: Failure building MPIR on sage 4.3.2

2010-02-24 Thread Ryan Hinton
Slow response, but here it is. I'm working on the school computing cluster. It runs Rocks 5.1 (V.I), which I believe is a RedHat derivative (/bin/rpm exists, for one...). Here is the GCC version. $ gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/u

[sage-devel] BipartiteGraph status

2010-02-26 Thread Ryan Hinton
I'm having a lovely conversation with myself in the comments for trac #8350 that I want to share. :-) There are two related problems. 1. The current BipartiteGraph class is incomplete, see trac #1941. I want to use it, so I'm trying to plug some of the holes. In particular, trac #8350 suggests

[sage-devel] Re: BipartiteGraph status

2010-02-26 Thread Ryan Hinton
Thanks for the reply. Response to your suggestions below. On Feb 26, 1:21 pm, David Joyner wrote: > ...snip... > > > I considered another option.  Why not just wait until an edge is added > > to figure out whether a node is left or right?  Because all the > > vertices should be in one set or the

[sage-devel] Re: BipartiteGraph status

2010-03-01 Thread Ryan Hinton
Thanks for pointing to the new thread. :-) Yes, the same problem exists for add_edge(). At a minimum, and add/ delete vertex and add edge code needs to be overridden for BipartiteGraph. I've done the delete vertex and can do the others, but I wanted to clear up the "long-term" approach first.

[sage-devel] Re: BipartiteGraph status

2010-03-01 Thread Ryan Hinton
On Feb 26, 8:03 pm, Robert Miller wrote: > On Fri, Feb 26, 2010 at 9:05 AM, Ryan Hinton wrote: > > ... > > > OK, assume we solve (1) by requiring an indication of which partition > > a vertex belongs in and raising an exception otherwise.  What about > > Graph al

[sage-devel] Re: Bipartite graphs in Sage

2010-03-01 Thread Ryan Hinton
Incidentally, this is my option (A). I agree it is the cleanest option. (See my comments on the original thread, .) - Ryan On Feb 27, 1:45 pm, Robert Bradshaw wrote: > Perhaps the correct thing to do is have BipartiteGraph wrap a Graph   > rather than descend from it. This way at least one wou

[sage-devel] Re: Failure building MPIR on sage 4.3.2

2010-03-01 Thread Ryan Hinton
I tried the same exercise on a related Xeon cluster -- with the same failure on mpn/.libs/add_n.o. I will be on #sage-devel (IRC) off and on if anyone wants to work on this real-time. The (new) config.log is at . The behavior in both cases appears t

[sage-devel] Re: BipartiteGraph status

2010-03-01 Thread Ryan Hinton
te case when necessary. Option (C) doesn't touch the Graph or GenericGraph classes. Any necessary changes are handled by overriding methods. > On Mon, Mar 1, 2010 at 9:55 AM, Ryan Hinton wrote: > > It looks like you're also supporting option (C) for solving problem > > (2)

[sage-devel] Re: Failure building MPIR on sage 4.3.2

2010-03-03 Thread Ryan Hinton
I just tried building MPIR 1.3.1 on /tmp -- a local file system -- instead of the network file system I was using before. Suddenly, it works! I assume the next Sage release will include this MPIR revision. Sage 4.3.3 (MPIR 1.2.2) fails to build yasm as before. Thanks! - Ryan -- To post to th

[sage-devel] Re: Failure building MPIR on sage 4.3.2

2010-03-04 Thread Ryan Hinton
And trying again to build Sage 4.3.3, MPIR seems to build fine. Sorry or the false alarm. Thank you very much for your help! - Ryan -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com F

[sage-devel] Doctests writing to files in Sage tree

2010-03-05 Thread Ryan Hinton
I am in the process of running doctests on a machine with a system-wide Sage install. I don't have write access to the install area. Several doctests for doc/common/builder.py try to write to files in the install area, and so fail. I created trac #8448 for this, but thought I should post it

[sage-devel] Re: Doctests writing to files in Sage tree

2010-03-05 Thread Ryan Hinton
Minh, Thanks for the reply. On Mar 5, 2:03 pm, Minh Nguyen wrote: > Hi Ryan, > > On Sat, Mar 6, 2010 at 5:17 AM, Ryan Hinton wrote: > > I am in the process of running doctests on a machine with a system-wide Sage > > install.  I don't have write access to the insta

[sage-devel] bug in binomial and symbolics

2010-04-05 Thread Ryan Hinton
I just created trac #8651, which is copied here since I don't know to whom to forward the report. We all know binomial(n,0) should be 1. But we're not getting that answer in the following case. sage: var('n, k') (n, k) sage: binomial(n, 0) # this is OK 1 sage: binomial(n, k).subs(k=0) # this is

[sage-devel] randstate missing from the reference manual

2010-04-13 Thread Ryan Hinton
Where is the sage.misc.randstate module listed in the reference manual? I can't find it. Of course, I can get its documentation from the command line, sage: sage.misc.randstate? but then I can't use my command line for trying things out. :-) Thanks! - Ryan -- To post to this group, send an

[sage-devel] Non-alphanumeric variable names

2010-04-26 Thread Ryan Hinton
I'm using variable names with non-alphanumeric characters for convenience. (Longer story: I have variables with two vector subscripts.) Should the following be supported? sage: nn = var('n(0.1)(3.)') Creating expressions using ``nn`` seems to work fine -- as long as everything stays in Sage. B

[sage-devel] Re: Default labels in Graphs ( breaks many doctests ! )

2010-05-06 Thread Ryan Hinton
My guess is that people using default labels *do not care* what the edges are labeled. I would vote for a single default edge label (instead of the apparent two defaults now), preferably something easy to detect like None. But I'm not familiar with the source of the problem, so I don't know how e

[sage-devel] Re: vector-valued functions

2010-05-06 Thread Ryan Hinton
That looks very nice to me. On May 4, 1:20 am, Jason Grout wrote: > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/gr

[sage-devel] Re: Non-alphanumeric variable names

2010-05-06 Thread Ryan Hinton
Thanks for the good suggestions. The challenge is trying to recognize the variables in derived expressions. I'm sure I can combine your ideas to produce something suitable. Thanks! - Ryan -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, se

[sage-devel] Re: BipartiteGraphs

2010-05-12 Thread Ryan Hinton
The current copy() code creates a new object of the same class as the original -- a copy in data and type. This matches the copy() method from the copy module. sage: g = BipartiteGraph() sage: g2 = g.copy() sage: type(g2) sage: from copy import copy sage: g3 = copy(g) sage: type(g3) However,

[sage-devel] Speeding up Graph code

2010-05-14 Thread Ryan Hinton
I am running some Monte Carlo simulations where I construct and pull apart graphs. If I can get them to run faster, I can get my results faster or with higher precision/confidence. I can give details if desired, but most of the processor time is spent in adding/deleting edges and vertices and ite

[sage-devel] Re: BipartiteGraphs

2010-05-14 Thread Ryan Hinton
Quick reply inline below. On May 12, 6:06 pm, Nathann Cohen wrote: > > These discuss (among other things) various approaches to the extra > > constraints of the BipartiteGraph class.  In particular, we agreed > > that add_edge() can raise an exception in cases like this where an > > algorithm vi

[sage-devel] Re: Speeding up Graph code

2010-05-14 Thread Ryan Hinton
On May 14, 1:54 pm, Jason Grout wrote: > Are you adding/deleting things using the python functions, or are you > using the Cython interface to the underlying CGraph structure?  If you > are using python, you can probably speed up these operations by 100x or so. My code is straight Python. To us

[sage-devel] numpy int64 vs. Integer max/min problem

2010-05-29 Thread Ryan Hinton
The following results are strange. sage: import numpy as np sage: t1 = np.array([3+1]) sage: t2 = t1[0] sage: t3 = 0 sage: max(t2, t3) 0 sage: min(t2, t3) 4 I get the same results putting t2 and t3 in a tuple for the other max/ min calling convention. But the comparison operator seems to be fine

[sage-devel] Re: numpy int64 vs. Integer max/min problem

2010-05-29 Thread Ryan Hinton
9, 3:10 pm, Jason Grout wrote: > On 5/29/10 3:58 PM, Ryan Hinton wrote: > > > The following results are strange. > > > sage: import numpy as np > > sage: t1 = np.array([3+1]) > > sage: t2 = t1[0] > > sage: t3 = 0 > > sage: max(t2, t3) > > 0 > >

[sage-devel] Multivariate polynomial multiplication

2010-06-26 Thread Ryan Hinton
There was a flurry of activity a while ago (http://groups.google.com/ group/sage-devel/browse_thread/thread/ f5b976c979a3b784/6ca3d61f4347daf4) regarding multivariate polynomial multiplication. I am working on asymptotic expansions for a set of generating functions, and this feature will really he

[sage-devel] Can I use GiNaC indexed expressions?

2010-06-30 Thread Ryan Hinton
I was looking for a way to use Sage to do some symbolic summations, products, exponentiation, etc. For background, see http://groups.google.com/group/sage-support/browse_thread/thread/e4ac1eabec630f99/81e1a71e4344b249?hl=en I think what I want is a GiNaC indexed expression. Are these hooked up

[sage-devel] Re: Can I use GiNaC indexed expressions?

2010-07-02 Thread Ryan Hinton
robably better to start a wiki page instead. See <http://wiki.sagemath.org/symbolics/Indexed expressions> for my thoughts. Thanks for your help! - Ryan On Jul 1, 3:29 pm, Burcin Erocal wrote: > Hi Ryan, > > On Wed, 30 Jun 2010 14:49:59 -0700 (PDT) > > Ryan Hinton wrote: >

[sage-devel] Re: Can I use GiNaC indexed expressions?

2010-07-06 Thread Ryan Hinton
On Jul 2, 4:25 pm, Burcin Erocal wrote: > On Fri, 2 Jul 2010 09:21:25 -0700 (PDT) > > Ryan Hinton wrote: > > Well, it's a little dangerous for someone (me) who doesn't really > > understand how to *use* the tool to *design the interface* to the > > tool.  Bu

[sage-devel] Re: A scalable framework for error-correcting code functionality in Sage

2010-08-02 Thread Ryan Hinton
Johan, I certainly do not qualify as a Sage veteran, but I have done some work on the engineering side of coding theory (LDPC codes). Your framework sounds good to me. In fact, it's somewhat similar to what I have done. In my case, a particular code is relatively uninteresting, so I have been u

[sage-devel] Re: A scalable framework for error-correcting code functionality in Sage

2010-08-03 Thread Ryan Hinton
Johan, Replies inline below. On Aug 3, 3:34 am, "Johan S. R. Nielsen" wrote: > ... > I guess that Ensembles as you describe them could be implemented > completely on > top of the object hierarchy I am suggesting. E.g. a XCodesEnsemble > would have > a constructor for specifying exactly the ensem

[sage-devel] Re: A scalable framework for error-correcting code functionality in Sage

2010-08-12 Thread Ryan Hinton
Hello, Johan. I'm a little confused at your restatement of my idea as well as your description of your idea. Let me provide some code fragments to be concrete. class Code: def __init__(..., encode_algorithm=['alg_name', args], decode_algorithm=['alg_name', args], ...): # handle encod

[sage-devel] Re: A scalable framework for error-correcting code functionality in Sage

2010-08-16 Thread Ryan Hinton
On Aug 13, 2:10 am, "Johan S. R. Nielsen" wrote: > My primary objection is that for object-oriented ideology, I think > that constructors should specify what inherently _defines_ some > object. I don't think that the encoder/decoder algorithms do this for > a code. Well, it depends on whether y

[sage-devel] Sage build and `pwd` craziness

2010-08-20 Thread Ryan Hinton
run %upgrade? WARNING: Loading of ipy_profile_sage failed. while Sage is trying to fix the paths (next output after the "Do not interrupt this" message). Any suggestions? Thanks! --- Ryan Hinton rw...@virginia.edu -- To post to this group, send an email to sage-devel@googl

[sage-devel] Re: Sage build and `pwd` craziness

2010-08-23 Thread Ryan Hinton
tesh Patel wrote: > On 08/21/2010 02:12 AM, Jason Grout wrote: > > > > > On 8/20/10 2:44 PM, Ryan Hinton wrote: > >> I have a build of Sage at school that I occasionally update when a bug > >> or upgrade affects me.  I'm the only one who uses it, but it'

[sage-devel] Re: Sage build and `pwd` craziness

2010-08-23 Thread Ryan Hinton
Jason, I think I can avoid relocating the sage tree on my own system, but probably not on the "public" installs I have worked on. I'll take a look at your patch, but I'm not sure I'm qualified to review it. :-) - Ryan On Aug 21, 1:12 am, Jason Grout wrote: > On

[sage-devel] Re: Sage build and `pwd` craziness

2010-08-23 Thread Ryan Hinton
This seems to work. Thanks! On Aug 23, 10:17 am, Ryan Hinton wrote: > You're right, the symbolic link had been dereferenced, so devel/sage > and devel/sage-main were both normal directories.  In my sandbox, it > worked to remove devel/sage and recreate it as a link to sage-main.

[sage-devel] Linear programming docs and problem

2010-08-25 Thread Ryan Hinton
First, I'm hoping someone (e.g. Nathann Cohen) will notice trac #9801 which makes a few corrections to the linear programming part of the Sage Constructions document. I've fixed one problem, but I'm left with two more. 1. The maximal matching example code does not like my fix. sage: g = graphs.

[sage-devel] Numerical integration of ODEs update

2010-08-25 Thread Ryan Hinton
I saw in http://groups.google.com/group/sage-devel/browse_thread/thread/bf3a2494d547230a/3f890b6a4cb79fc3?hl=en&ie=UTF-#3f890b6a4cb79fc3 that T. Dumont was planning on wrapping a set of modern numerical methods for ODEs for Sage. Has anyone worked on this? -- To post to this group, send an email

[sage-devel] Re: Linear programming docs and problem

2010-08-26 Thread Ryan Hinton
You are both right! The "working" install is in Sage 4.5.1, and the "broken" install is Sage 4.4.3. I tried to rebuild glpk on the failing machine and noticed that it requested a "sage -b" in order to complete the installation. I haven't done that, so I assume it will work. (I have to wait for

[sage-devel] Trying to use desolve_system

2010-08-26 Thread Ryan Hinton
I am having trouble trying to use desolve_system. Am I doing something wrong? If not, I can create trac tickets for these errors. 1. If I make the reference manual example easier, I get an exception: sage: t = var('t') sage: x = function('x', t) sage: de1 = diff(x,t) + 1 == 0 sage: desolve_sys

[sage-devel] Re: Trying to use desolve_system

2010-08-27 Thread Ryan Hinton
s > > Robert > > On 26 srp, 23:25, Ryan Hinton wrote: > > > I am having trouble trying to use desolve_system.  Am I doing > > something wrong?  If not, I can create trac tickets for these errors. > > > 1.  If I make the reference manual example easier, I get an

[sage-devel] Re: Help us test Cython?

2010-08-27 Thread Ryan Hinton
Any guesses when the snazzy new Cython 0.13 will end up in Sage? I currently have some snazzy C++ code that I want to wrap in Cython (uses namespaces, etc.), and the new features will make it much easier. Thanks! - Ryan -- To post to this group, send an email to sage-devel@googlegroups.com To

[sage-devel] Re: Problem with Expect: Mutilated temporary files in _eval_line

2010-09-24 Thread Ryan Hinton
On Sep 24, 8:49 am, Simon King wrote: > On Sep 24, 3:16 pm, Simon King wrote: > > > Doing so, the gap and singular interfaces get different file names, > > Works. > > > and moreover the trouble with the @parallel decorator vanishes. > > Doesn't. Sorry, another idea is needed. Have you considered

[sage-devel] Looking for graph comparison operator

2011-03-17 Thread Ryan Hinton
Where are the comparison operators for graphs implemented? I can find ``__eq__`` in graphs/generic_graph.py, but I can't find any others. I haven't opened a ticket yet for the following behavior because I am not sure where the problem is. The current status is some new math! At the moment, I se