Ask Your Question
0

the same function appears twice in the documentation

asked 2014-02-20 00:16:02 +0100

cjsh gravatar image

updated 2015-01-13 18:15:15 +0100

FrédéricC gravatar image

The functions base_field()/constant_base_field()/constant_field()/vector_space()/maximal_order()/random_element appear twice in the following document:

http://sagemath.org/doc/reference/fun...

and what different with RationalFunctionField() and FunctionField()?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2014-06-29 13:49:01 +0100

vdelecroix gravatar image

Hi,

Python is object oriented (see Python doc about classes) and what you call functions are actually methods, i.e. they belong to their class. The point is that you can have different implementation of the objects and keep the same interface. In this particular case, given any function field you will use

sage: K.base_field()

to get the base field.

For the existence of the two classes, it is explicitly said in the documentation:

  • FunctionField: The abstract base class for all function fields.
  • RationalFunctionField: A rational function field K(t) in one variable, over an arbitrary base field.

Vincent

edit flag offensive delete link more

Comments

thank you very much!

cjsh gravatar imagecjsh ( 2014-07-07 11:22:36 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-02-20 00:16:02 +0100

Seen: 254 times

Last updated: Jul 07 '14