* Bruno Grenet <bruno.gre...@gmail.com> [2014-06-16 23:41:31 +0200]:
> First, I looked for these "_roots_univariate_polynomial" functions but they
> do not seem to be defined anywhere ("grep -rl _roots_univariate_polynomial
> SAGE_ROOT/src/sage/" only gives rings/polynomial/polynomial_element.c and
> rings/polynomial/polynomial_element.pyx). In other words, it does not seem
> that this functionality is ever used.
You are right. It is not used yet. Afaik _roots_univariate_polynomial
was introduced together with _factor_univariate_polynomial (which is
used in a few places.) It probably helps if you have a look at factor
(in sage/rings/polynomial/polynomial_element.pyx) and
_factor_univariate_polynomial (e.g. in sage/rings/qqbar.py).
The relation of roots and _roots_univariate_polynomial is essentially
the same.
In your case you would add a method _roots_univariate_polynomial to
sage.rings.integer_ring.IntegerRing_class.

julian

> Le 14/06/2014 16:06, leif a écrit :
> >Julian Rüth wrote:
> >>Bruno Grenet <bruno.gre...@gmail.com> [2014-06-12 13:47:59 +0200]:
> >>>- The algorithm I implemented uses some auxiliary functions that are
> >>>not of
> >>>real interest outside the algorithm. How should I do to avoid this
> >>>functions
> >>>be available for the users?
> >>If you turn these auxiliary functions into methods of the ring Z, you
> >>can hide them by adding a single (or double but many people dislike
> >>this) underscore to the method name. If they are only used by your
> >>method to compute roots, you could probably name these methods
> >>_roots_from_factorization_method_name().
> >
> >... or make them local to that method, if it's unlikely that they'll be
> >used by other methods in the future.
> >
> >
> >-leif
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

Attachment: pgpJ640PNgZTj.pgp
Description: PGP signature

Reply via email to