]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/cone/permutation_invariant.py: don't import from sage.all
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 22 Nov 2024 20:56:43 +0000 (15:56 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 22 Nov 2024 20:56:43 +0000 (15:56 -0500)
mjo/cone/permutation_invariant.py

index 982dd2979ac861d41528749e031e7fb24c3dc5f2..ea89cbaa194e27d69d2c5e4860e5678df4fd4763 100644 (file)
@@ -1,5 +1,3 @@
-from sage.all import *
-
 def random_permutation_invariant_cone(lattice=None,
                                       min_ambient_dim=0,
                                       max_ambient_dim=None,
@@ -32,12 +30,14 @@ def random_permutation_invariant_cone(lattice=None,
     # them with permutation matrices.
     V = K.lattice().vector_space()
 
-    # The set of all permutatin matrices on ``V``.
+    # The set of all permutation matrices on ``V``.
+    from sage.groups.perm_gps.permgroup_named import SymmetricGroup
     Sn = ( p.matrix() for p in SymmetricGroup(V.dimension()) )
 
     # Set of permuted generators
     pgens = ( permutation*V(g) for permutation in Sn for g in K )
 
+    from sage.geometry.cone import Cone
     return Cone(pgens, K.lattice())
 
 
@@ -75,6 +75,7 @@ def is_permutation_invariant(K):
     V = K.lattice().vector_space()
 
     # The set of all permutation matrices on ``V``.
+    from sage.groups.perm_gps.permgroup_named import SymmetricGroup
     Sn = ( p.matrix() for p in SymmetricGroup(V.dimension()) )
 
     return all(K.contains(permutation*V(g))