Skip to content

Refs/heads/dev poly#690

Merged
tturocy merged 1 commit intomasterfrom
dev_poly
Dec 12, 2025
Merged

Refs/heads/dev poly#690
tturocy merged 1 commit intomasterfrom
dev_poly

Conversation

@tturocy
Copy link
Copy Markdown
Member

@tturocy tturocy commented Dec 11, 2025

No description provided.

This makes a number of updates to polynomials:
* The component monomials are now stored as a std::vector rather than a Gambit::List.
* All iteration over monomials is now iteration rather than index-based lookup (which was linear-time under List)
* Algorithm improvements have been made to addition and multiplication of
  polynomials as well as evaluation at a point.
* Revised: PartialDerivative is now valid for general polynomials (previously it was only correct for multinomials)
* Revised: Normalisation is now done if the absolute value of the largest
  coefficient exceeds a threshold (previously it was the
  value not absolute value, which was surely not intended).
* Move operations added to monomial and polynomial.

With the exception of the notes above, there should be no changes in behaviour.  Some rough benchmarking suggests this package
of changes speeds up enumpoly around 30% on some small-to-mid-size games.

LeadingCoefficient

TranslateOfMono (and adds pow)

MonoInNewCoordinates

Max value of nonlinear part

normalize

normalize - norm by absolute value

Adds IsZero, IsConstant

Use std::vector instead of Array; add explicit move to polynomial
@tturocy tturocy merged commit 6acc9f3 into master Dec 12, 2025
28 checks passed
@tturocy tturocy deleted the dev_poly branch December 12, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant