X-Git-Url: http://gitweb.michael.orlitzky.com/?p=sage.d.git;a=blobdiff_plain;f=mjo%2Feja%2Feja_algebra.py;h=a2adbb2bed47499aea53b38fe175547b887fb2a9;hp=a10e2a37f30313c54e0d0682c524c71f0e5af416;hb=e6bb7aba7677a04c3aaa4d1fdd9dd45185db2067;hpb=86bf0d59519eef1259fa9fb82457148b28c2fa2e diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index a10e2a3..a2adbb2 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -1988,6 +1988,14 @@ class RealSymmetricEJA(MatrixEJA, RationalBasisEJA, ConcreteEJA): A = MatrixSpace(field, n) super().__init__(A, **kwargs) + from mjo.eja.eja_cache import real_symmetric_eja_coeffs + a = real_symmetric_eja_coeffs(self) + if a is not None: + if self._rational_algebra is None: + self._charpoly_coefficients.set_cache(a) + else: + self._rational_algebra._charpoly_coefficients.set_cache(a) + class ComplexHermitianEJA(MatrixEJA, RationalBasisEJA, ConcreteEJA): @@ -2070,6 +2078,13 @@ class ComplexHermitianEJA(MatrixEJA, RationalBasisEJA, ConcreteEJA): A = ComplexMatrixAlgebra(n, scalars=field) super().__init__(A, **kwargs) + from mjo.eja.eja_cache import complex_hermitian_eja_coeffs + a = complex_hermitian_eja_coeffs(self) + if a is not None: + if self._rational_algebra is None: + self._charpoly_coefficients.set_cache(a) + else: + self._rational_algebra._charpoly_coefficients.set_cache(a) @staticmethod def _max_random_instance_size():