On Sun, Mar 9, 2008 at 3:05 PM, Philippe Saade <[EMAIL PROTECTED]> wrote:
>
>  Sorry to bother with such trivial stuff...
>
>  Suppose i want to ask a student to find a way to define a vector in
>  Sage and compute its norm...
>
>  My questions are :
>
>  1/ how is he supposed to find the answer in the docs ?

First he would guess that "vector" might be the command to
create a vector, and type vector? into Sage, which would
yield about 20 examples and extensive documentation.
Once he has created a vector v, he types v.[tab] to see
what functions are available for working with vectors.  One
of them is called "norm".  He types v.norm? and finds out
how that works.

>  2/ how can he easily browse the source to find the "vector" class
>  definition and the methods of that class ?

For any given function or method type foo?? for source
instead of foo? (for docs).

Online: Browse all source code is here:
    http://www.sagemath.org/hg/sage-main/file/59538ebc8f3b/sage/modules/

>From within the Sage notebook you can browse the complete source code
of theSage library here:
    http://localhost:8000/src/
where http://localhost:8000 is replaced by the address of the sage server.

>  3/ how can he be certain of using the "good/best" method ?

He can't.

However, if the code that he writes is very slow, then he may be doing
something wrong, and should look at the source code of Sage and
ask here or on irc #sage-devel (on irc.freenode.net).

>  Thanks for your answers...

You're welcome.

>
>  Philippe
>
>  >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

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

Reply via email to