Ask Your Question
0

the same function appears twice in the documentation

asked 2014-02-19 17:16:02 -0500

cjsh gravatar image

updated 2015-01-13 11:15:15 -0500

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 06:49:01 -0500

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 04:22:36 -0500 )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-19 17:16:02 -0500

Seen: 57 times

Last updated: Jul 07 '14