@@ -301,7 +301,10 @@ def __init__(self, systems):
301
301
(x^2 : y^2)
302
302
"""
303
303
304
- self ._dynamical_systems = _remove_duplicates_of_ (systems )
304
+ self ._dynamical_systems = []
305
+ for ds in systems :
306
+ if ds not in self ._dynamical_systems :
307
+ self ._dynamical_systems .append (ds )
305
308
Parent .__init__ (self , category = Semigroups ().FinitelyGeneratedAsMagma ())
306
309
307
310
def __call__ (self , input ):
@@ -544,12 +547,12 @@ def __eq__(self, other):
544
547
sage: f == g
545
548
Traceback (most recent call last):
546
549
...
547
- ValueError : cannot compare dynamical semigroups with at least one generator of degree 1
550
+ NotImplementedError : cannot compare dynamical semigroups with at least one generator of degree 1
548
551
"""
549
552
if isinstance (other , DynamicalSemigroup ):
550
553
if any (ds .degree () == 1 for ds in self .defining_systems ()) or \
551
554
any (ds .degree () == 1 for ds in other .defining_systems ()):
552
- raise ValueError ("cannot compare dynamical semigroups with at least one generator of degree 1" )
555
+ raise NotImplementedError ("cannot compare dynamical semigroups with at least one generator of degree 1" )
553
556
return all (ds in other .defining_systems () for ds in self .defining_systems ()) and \
554
557
all (ds in self .defining_systems () for ds in other .defining_systems ())
555
558
return False
@@ -677,30 +680,6 @@ class DynamicalSemigroup_affine_field(DynamicalSemigroup_affine):
677
680
class DynamicalSemigroup_affine_finite_field (DynamicalSemigroup_affine_field ):
678
681
pass
679
682
680
- def _remove_duplicates_of_ (list ):
681
- r"""
682
- Removes duplicate elements from a list.
683
-
684
- INPUT:
685
-
686
- - ``list`` -- any list
687
-
688
- OUTPUT: the original list without duplicate elements
689
-
690
- EXAMPLES::
691
-
692
- sage: numbers = [1, 1, 2, 3, 3, 2, 1, 5, 4, 3]
693
- sage: sage.dynamics.arithmetic_dynamics.dynamical_semigroup._remove_duplicates_of_(numbers)
694
- [1, 2, 3, 5, 4]
695
- """
696
- seen = []
697
-
698
- for item in list :
699
- if item not in seen :
700
- seen .append (item )
701
-
702
- return seen
703
-
704
683
def _standardize_domains_of_ (systems ):
705
684
r"""
706
685
Coerces dynamical systems to the same domain and have the same generators.
0 commit comments