On Jul 3, 2008, at 3:13 PM, phil wrote:
> On Jul 2, 8:33 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote:
>> sage: var('x,y')
>> (x, y)
>> sage: t = x^2 + y^2
>> sage: type(t)
>>
>> sage: t._operator
>>
>> sage: t._operands
>> [x^2, y^2]
>> sage: t._operands[0]
>> x^2
>
> How can I do comparisons o
On Jul 2, 8:33 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote:
> sage: var('x,y')
> (x, y)
> sage: t = x^2 + y^2
> sage: type(t)
>
> sage: t._operator
>
> sage: t._operands
> [x^2, y^2]
> sage: t._operands[0]
> x^2
How can I do comparisons on the operator? I need to test the operator
so that I
From: "David Joyner" <[EMAIL PROTECTED]>
> I was wondering about this myself. Maple has a command that does
> exactly this (I think it is the "ops" command).
It's op. Maple represents objects using DAGs (directed acyclic graphs
literally, but it also includes enumeration of child vertices), and
> sage: var('x,y')
> (x, y)
> sage: t = x^2 + y^2
> sage: type(t)
>
> sage: t._operator
>
> sage: t._operands
> [x^2, y^2]
> sage: t._operands[0]
> x^2
It looks like you can access the expression as a tree of binary
operators and their operands this way.
However, the order of the operands in th
On Thu, Jul 3, 2008 at 4:58 AM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> I was wondering about this myself. Maple has a command that does
> exactly this (I think it is the "ops" command). Do you think SAGE should have
> an "official" analog of that?
Yes, definitely.
William
--~--~-~-
Dear David,
On Jul 3, 1:58 pm, "David Joyner" <[EMAIL PROTECTED]> wrote:
> I was wondering about this myself. Maple has a command that does
> exactly this (I think it is the "ops" command). Do you think SAGE should have
> an "official" analog of that?
+1. I was missing such command in SAGE, too.
I was wondering about this myself. Maple has a command that does
exactly this (I think it is the "ops" command). Do you think SAGE should have
an "official" analog of that?
On Wed, Jul 2, 2008 at 11:33 PM, Mike Hansen <[EMAIL PROTECTED]> wrote:
>
> Hi Phil,
>
> I don't think there is an official
Hi Phil,
I don't think there is an official way to get at the terms, but here
is something that works:
sage: var('x,y')
(x, y)
sage: t = x^2 + y^2
sage: type(t)
sage: t._operator
sage: t._operands
[x^2, y^2]
sage: t._operands[0]
x^2
--Mike
On Wed, Jul 2, 2008 at 7:49 PM, phil <[EMAIL PROTECT