X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_algebra.py;h=ad619f667a853e191f254aa32aaed3664e27f6a5;hb=f85bca2ff71a537c82fae3736944ce8896c30251;hp=c1fc8078823eb8915f3caad13d55c8e2f61025bf;hpb=9efefa3e54fc3e69e3f2c78457d50127a7a10131;p=sage.d.git diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index c1fc807..ad619f6 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -3202,7 +3202,7 @@ class CartesianProductEJA(CombinatorialFreeModule_CartesianProduct, SETUP:: - sage: from mjo.eja.eja_algebra import random_eja() + sage: from mjo.eja.eja_algebra import random_eja TESTS:: @@ -3213,6 +3213,7 @@ class CartesianProductEJA(CombinatorialFreeModule_CartesianProduct, ....: == ....: J.gens()[J._monomial_to_generator(m)] ....: for m in J.basis().keys() ) + True """ # The superclass method indexes into a matrix, so we have to @@ -3254,7 +3255,7 @@ class CartesianProductEJA(CombinatorialFreeModule_CartesianProduct, sage: list(K2.basis()) [e(0, (0, 0)), e(0, (0, 1)), e(0, (1, 0)), e(0, (1, 1)), e(0, (1, 2)), e(1, 0)] - sage: sage: g = K2.gens() + sage: g = K2.gens() sage: (g[0] + 2*g[3]) * (g[1] - 4*g[2]) e(0, (0, 1)) - 4*e(0, (1, 1)) @@ -3525,3 +3526,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