]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: reimplement random_eja() without KnownRankEJA.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 3 Nov 2020 13:34:36 +0000 (08:34 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 3 Nov 2020 13:34:36 +0000 (08:34 -0500)
mjo/eja/eja_algebra.py

index 19db8b0ccefef297623d81721d4a774f99a9d3d1..c06f9e2e7792a141745782becf2ce999601c956c 100644 (file)
@@ -1088,9 +1088,13 @@ def random_eja(field=AA, nontrivial=False):
         Euclidean Jordan algebra of dimension...
 
     """
-    eja_classes = KnownRankEJA.__subclasses__()
-    if nontrivial:
-        eja_classes.remove(TrivialEJA)
+    eja_classes = [HadamardEJA,
+                   JordanSpinEJA,
+                   RealSymmetricEJA,
+                   ComplexHermitianEJA,
+                   QuaternionHermitianEJA]
+    if not nontrivial:
+        eja_classes.append(TrivialEJA)
     classname = choice(eja_classes)
     return classname.random_instance(field=field)