From: Michael Orlitzky Date: Tue, 3 Nov 2020 13:34:36 +0000 (-0500) Subject: eja: reimplement random_eja() without KnownRankEJA. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=51004f14e52ee9d29887ca4c9e233a302d1a4fc4;p=sage.d.git eja: reimplement random_eja() without KnownRankEJA. --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 19db8b0..c06f9e2 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -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)