On Fri, 2 Jul 2010 09:21:25 -0700 (PDT)
Ryan Hinton <[email protected]> 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 rarely bothered by my own ignorance, I'll charge
> ahead. :-)
> 
> After writing a long, detailed email, I realized it's probably better
> to start a wiki page instead.  See
> 
> <http://wiki.sagemath.org/symbolics/Indexed expressions>
> 
> for my thoughts.  Thanks for your help!

The wiki page is a good idea. Thanks for taking the time to write your
ideas up.

Here is a patch with the first steps to use indexed expressions:

http://sage.math.washington.edu/home/burcin/indexed_expression.patch

I used the slice notation to denote dimensions. If you have a
variable x, and you want an index with dimension 3, you write:

sage: var('i')
i
sage: x[i:3]
x.i

Dimensions are not printed, but they are there. :)

I'm afraid I don't understand what you expect sum() to do. We already
have a sum() method for symbolic expressions. Please take that into
account as well.

Note that GiNaC cannot take derivatives of indexed expressions [1].
Perhaps this is a show stopper for you.

[1] 
http://www.ginac.de/reference/classGiNaC_1_1indexed.html#a0c7f2f4501ee8085e29e1279ba88894a


On a completely different note... I prefer to use the brackets to access
the operands of an expression, instead of creating indexed expressions.
There has been several complaints about not being able to access the
operands lately, and I think this is the most natural way to do so.

You will see that there is already a __getitem__() method in
expression.pyx which was commented during the symbolics switch. I
suggest we uncomment that and use a different method (.indexed()?) for
the indexed expressions.

Cheers,
Burcin

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to