Fastmath 0.1.0 - math library

During my Clojure journey (spent mostly on generative art) I’ve built up general purpose math library with speed in mind. This is collection of bindings to various well tested java math libraries (Apache Commons Math, SMILE, FastMath) + adopted Primitive Math (thanks to Zach).

fastmath contains:

  • mentioned above primitive math functions
  • FastMath bindings (trigonometric, log/power, rounding, etc.)
  • 2d, 3d, 4d vector operations
  • random numbers, distributions, sequences
  • various noise functions (value, gradient, simplex)
  • descriptive statistics
  • 1d, 2d, interpolations
  • transforms (wavelets, sine/cosine/hadamard, dft)
  • plenty of constants
  • complex numbers
  • some additional functions taken from Processing/OF

Code: https://github.com/generateme/fastmath
Clojars: [generateme/fastmath “0.1.0”]

Documentation with examples: https://generateme.github.io/fastmath/index.html

Enjoy!

9 Likes

I’ve been enjoying all the generative art tweets! Thanks for sharing this — fast math ops are the cornerstone of most of the work I do. (I wonder if anyone has made a similar math lib curation effort on the CLJS side…)

1 Like

While not offering the highest possible performance, geom gives pretty good performance and the same API in Clojure and Clojurescript, which turns out to be quite useful.

3 Likes

Generally thi.ng is great collection of math and visual functions.

2 Likes