Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polynomial_template __init__ from list horribly inefficient #5005

Closed
robertwb opened this issue Jan 17, 2009 · 1 comment
Closed

polynomial_template __init__ from list horribly inefficient #5005

robertwb opened this issue Jan 17, 2009 · 1 comment

Comments

@robertwb
Copy link
Contributor

            for e in x:
                # r += parent(e)*power
                celement_pow(&monomial, &gen, deg, NULL, parent)
                coeff = (<Polynomial_template>parent(e)).x
                celement_mul(&monomial, &coeff, &monomial, parent)
                celement_add(&self.x, &self.x, &monomial, parent)
                deg += 1

There should be a celement_set(self, x, i).

Component: algebra

Issue created by migration from https://trac.sagemath.org/ticket/5005

@robertwb robertwb changed the title polynomial_template __init__ from list horribly innefficient polynomial_template __init__ from list horribly inefficient Jan 17, 2009
@aghitza aghitza added this to the sage-4.3 milestone Nov 16, 2009
@robertwb
Copy link
Contributor Author

comment:3

The polynomial template framework has no c-level concept of elements of the basering, so there's not much that can be done here. Both ZZ[x] and Z/nZ[x] override __init__ to be more efficient, so it's not really an issue, and so I'm closing this as won't fix.

@sagetrac-mvngu sagetrac-mvngu mannequin removed this from the sage-4.3.1 milestone Jan 17, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants