[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

[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 simon.k...@nuigalway.ie wrote: On Sep 24, 3:16 pm, Simon King simon.k...@nuigalway.ie 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

[sage-devel] Re: Trying to use desolve_system

2010-08-27 Thread Ryan Hinton
, 23:25, Ryan Hinton iob...@email.com 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 exception: sage: t = var('t') sage: x = function('x

[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: 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 some

[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:

[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 =

[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=enie=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: Sage build and `pwd` craziness

2010-08-23 Thread Ryan Hinton
qed...@gmail.com 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's installed in a public location (i.e. not writable

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

2010-08-23 Thread Ryan Hinton
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's installed in a public location (i.e. not writable by me) in case someone else *might* use it.  And because I don't have enough

[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 iob...@email.com 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] Sage build and `pwd` craziness

2010-08-20 Thread Ryan Hinton
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@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr

[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 j.s.r.niel...@mat.dtu.dk 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

[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

[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 j.s.r.niel...@mat.dtu.dk 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

[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

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

2010-07-06 Thread Ryan Hinton
On Jul 2, 4:25 pm, Burcin Erocal bur...@erocal.org wrote: On Fri, 2 Jul 2010 09:21:25 -0700 (PDT) Ryan Hinton iob...@email.com 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.  But since I'm

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

2010-07-02 Thread Ryan Hinton
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 bur...@erocal.org wrote: Hi Ryan, On Wed, 30 Jun 2010 14:49:59 -0700 (PDT) Ryan Hinton iob...@email.com wrote: I was looking

[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

[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

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

2010-05-29 Thread Ryan Hinton
On May 29, 3:10 pm, Jason Grout jason-s...@creativetrax.com 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: min(t2, t3) 4 I get

[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

[sage-devel] Re: BipartiteGraphs

2010-05-14 Thread Ryan Hinton
Quick reply inline below. On May 12, 6:06 pm, Nathann Cohen nathann.co...@gmail.com wrote: snip 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

[sage-devel] Re: Speeding up Graph code

2010-05-14 Thread Ryan Hinton
On May 14, 1:54 pm, Jason Grout jason-s...@creativetrax.com 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

[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) class 'sage.graphs.bipartite_graph.BipartiteGraph' sage: from copy import

[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

[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 jason-s...@creativetrax.com wrote: snip -- 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

[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,

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

[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] 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

[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 nguyenmi...@gmail.com wrote: Hi Ryan, On Sat, Mar 6, 2010 at 5:17 AM, Ryan Hinton iob...@email.com wrote: I am in the process of running doctests on a machine with a system-wide Sage install.  I don't have write access

[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

[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

[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 r...@rlmiller.org wrote: On Fri, Feb 26, 2010 at 9:05 AM, Ryan Hinton iob...@email.com 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 algorithms

[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, http:// groups.google.com/group/sage-devel/browse_thread/thread/ bff3af2a3c77b4b6.) - Ryan On Feb 27, 1:45 pm, Robert Bradshaw rober...@math.washington.edu wrote: Perhaps the

[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 http://hintonclan.org/iobass/mpir- config.log. The behavior in both cases appears to

[sage-devel] Re: BipartiteGraph status

2010-03-01 Thread Ryan Hinton
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 iob...@email.com wrote: It looks like you're also supporting option (C) for solving problem (2): very interesting. Since you wrote most of this code, your

[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

[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 wdjoy...@gmail.com 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

[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

[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 $

[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

[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.a,b = QQ[] eq = a^2 + 2*b sreq = SR(eq) sra, srb = sreq.variables() sreq.subs(sra=3) # should return 9 +

[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 gmp++.h (see

[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 wst...@gmail.com wrote: On Tue, Jul 21, 2009 at 9:37 AM, Ryan

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

2009-07-07 Thread Ryan Hinton
! --- Ryan Hinton PhD candidate, electrical engineering University of Virginia --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options

[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

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

2009-03-30 Thread Ryan Hinton
/release-cycles-3.4.1/ Please build, test and report any issues. Cheers, Michael Merged in Sage 3.4.1.alpha0: #2129: William Stein, Ryan Hinton: implement sage -t for .spyx files [Reviewed by Jason Grout] #2551: Francis Clarke: __getitem__ for relative number field elements

[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
, 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 iob...@email.com: 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

[sage-devel] Re: Semantics of %

2009-03-13 Thread Ryan Hinton
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 cython list. Quick summary

[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

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

2009-03-06 Thread Ryan Hinton
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, 1985. --- Ryan Hinton PhD candidate, Electrical Engineering University of Virginia

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

2009-03-06 Thread Ryan Hinton
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 2009/3/6 Ryan Hinton iob...@email.com: Thanks in advance for any help. Please let me know if I'm

[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 carl.wi...@gmail.com wrote: On Mon, Mar 2, 2009 at 3:35 PM, William Stein wst...@gmail.com wrote: On Mon, Mar 2, 2009 at 2:07 PM, Ryan Hinton iob...@email.com wrote: ... So I'm trying to implement a search algorithm similar

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

2009-03-02 Thread Ryan Hinton
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 Mathematical Software, 32, 1 (2006), 1-16. --- Ryan