Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
removed unused private methods and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitdm committed Aug 3, 2016
1 parent 5c9f2f3 commit c034df8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 26 deletions.
11 changes: 1 addition & 10 deletions src/sage/rings/polynomial/skew_polynomial_element.pxd
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
include "cysignals/signals.pxi"
include "../../ext/cdefs.pxi"
include '../../ext/stdsage.pxi'

from sage.rings.integer cimport Integer

from sage.structure.element cimport Element, AlgebraElement, ModuleElement
from sage.structure.element cimport AlgebraElement
from sage.structure.parent cimport Parent
from polynomial_compiled cimport CompiledPolynomialFunction

from sage.rings.morphism cimport Morphism
from sage.structure.element cimport RingElement

from sage.rings.polynomial.polynomial_element cimport Polynomial_generic_dense

cdef class SkewPolynomial(AlgebraElement):
Expand Down
26 changes: 10 additions & 16 deletions src/sage/rings/polynomial/skew_polynomial_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,8 @@ cdef class SkewPolynomial(AlgebraElement):
"""
return self._hash_c()

# cdef void _inplace_add(self, SkewPolynomial_generic_dense right):
# raise NotImplementedError
# cdef void _inplace_sub(self, SkewPolynomial_generic_dense right):
## raise NotImplementedError
cdef void _inplace_rmul(self, SkewPolynomial_generic_dense right):
raise NotImplementedError
# cdef void _inplace_lmul(self, SkewPolynomial_generic_dense right):
## raise NotImplementedError
cdef void _inplace_pow(self, Py_ssize_t n):
raise NotImplementedError
cdef void __normalize(self):
Expand Down Expand Up @@ -2728,9 +2722,7 @@ cdef class SkewPolynomial_generic_dense(SkewPolynomial):
OUTPUT:
If ``modulus`` is ``None``, return ``self**exp``.
Otherwise, return the remainder of ``self**exp`` in the left
Return the remainder of ``self**exp`` in the left
euclidean division by ``modulus``.
REMARK:
Expand Down Expand Up @@ -2786,7 +2778,8 @@ cdef class SkewPolynomial_generic_dense(SkewPolynomial):
r = <SkewPolynomial_generic_dense>self._parent(v)
else:
r = <SkewPolynomial_generic_dense>self._new_c(list(self._coeffs),self._parent)
r._inplace_pow(exp)
# r._inplace_pow(exp)
r = r**exp

if modulus:
_, r = r.left_quo_rem(modulus)
Expand All @@ -2802,9 +2795,7 @@ cdef class SkewPolynomial_generic_dense(SkewPolynomial):
OUTPUT:
If ``modulus`` is ``None``, return ``self**exp``.
Otherwise, return the remainder of self**exp in the right
Return the remainder of ``self**exp`` in the right
euclidean division by ``modulus``.
REMARK:
Expand Down Expand Up @@ -2869,6 +2860,11 @@ cdef class SkewPolynomial_generic_dense(SkewPolynomial):
else:
r = <SkewPolynomial_generic_dense>self._new_c(list(self._coeffs),self._parent)
r._inplace_pow(exp)
# print "HI"
# for i in range(exp-1):
# r = r * r
# r = r**exp
## print r

if modulus:
_, r = r.right_quo_rem(modulus)
Expand All @@ -2884,9 +2880,7 @@ cdef class SkewPolynomial_generic_dense(SkewPolynomial):
OUTPUT:
If ``modulus`` is ``None``, return ``self**exp``.
Otherwise, return the remainder of self**exp in the right
Return the remainder of ``self**exp`` in the right
euclidean division by ``modulus``.
.. SEEALSO::
Expand Down

0 comments on commit c034df8

Please sign in to comment.