8000 ModInt -> deftype, small cleanups in prep for poly changes by sritchie · Pull Request #342 · sicmutils/sicmutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ModInt -> deftype, small cleanups in prep for poly changes #342

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

Merged
merged 5 commits into from
Apr 7, 2021

Conversation

sritchie
Copy link
Member
@sritchie sritchie commented Apr 7, 2021

In addition to the notes below, I've added a halt-at transducer that I'll use in #341.

From the CHANGELOG:

  • Added sicmutils.calculus.derivative/D-as-matrix and
    sicmutils.matrix/as-matrix, ported from scmutils.

  • converted sicmutils.modint.ModInt to a deftype; this allows ModInt
    instances to be = to non-ModInt numbers on the right, if the right side
    is equal to the residue plus any integer multiple of the modulus. v/=
    gives us this behavior with numbers on the LEFT too, and ModInt on the
    right.

    • This change means that :i and :m won't return the residue and modulus
      anymore. sicmutils.modint gains new residue and modulus functions to
      access these attributes.
  • The JVM version of sicmutils gains more efficient gcd implementations
    for Integer and Long (in addition to the existing native BigInteger
    gcd), thanks to our existing Apache Commons-Math dependency.

  • sicmutils.structure/dual-zero aliases compatible-zero to match the
    scmutils interface. Both are now aliased into sicmutils.env.

@@ -81,7 +80,7 @@
Associative
(assoc [_ k entry] (Matrix. r c (assoc v k entry)))
(containsKey [_ k] (contains? v k))
(entryAt [_ k] (.entryAt v k))
(entryAt [_ k] (.entryAt ^Associative v k))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reflection warning!

@sritchie sritchie merged commit dfe4eee into master Apr 7, 2021
@sritchie sritchie deleted the sritchie/updatefest branch April 7, 2021 12:58
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
0