Ask Your Question
0

the same function appears twice in the documentation

asked 11 years ago

cjsh gravatar image

updated 10 years ago

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()?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 10 years ago

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

Preview: (hide)
link

Comments

thank you very much!

cjsh gravatar imagecjsh ( 10 years ago )

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: 11 years ago

Seen: 281 times

Last updated: Jul 07 '14