]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add future commented-out random_eja() code.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 26 Feb 2021 16:29:33 +0000 (11:29 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 26 Feb 2021 16:29:33 +0000 (11:29 -0500)
mjo/eja/eja_algebra.py

index c1fc8078823eb8915f3caad13d55c8e2f61025bf..031359fbfdab4ea8dc852f24ad7cfea8e54bfe4d 100644 (file)
@@ -3525,3 +3525,16 @@ class RationalBasisCartesianProductEJA(CartesianProductEJA,
 RationalBasisEJA.CartesianProduct = RationalBasisCartesianProductEJA
 
 random_eja = ConcreteEJA.random_instance
+
+# def random_eja(*args, **kwargs):
+#     J1 = ConcreteEJA.random_instance(*args, **kwargs)
+
+#     # This might make Cartesian products appear roughly as often as
+#     # any other ConcreteEJA.
+#     if ZZ.random_element(len(ConcreteEJA.__subclasses__()) + 1) == 0:
+#         # Use random_eja() again so we can get more than two factors.
+#         J2 = random_eja(*args, **kwargs)
+#         J = cartesian_product([J1,J2])
+#         return J
+#     else:
+#         return J1