Math library.
[generateme/fastmath "2.3.0"]
Important Note
Fastmath relies on SMILE 2.6.0 which relies on BLAS/LAPACK via MKL and/or OpenBlas. MKL (preferred) and OpenBlas are included as dependencies in fastmath
. This leads to addional 1GB of jar files. I can't assure that all functionalities will work on OpenBlas (see: #15) but 99% should. If you need fastmath
to be lighter, please exclude MKL from your path.
[generateme/fastmath "2.2.1" :exclusions [com.github.haifengl/smile-mkl]]
{:deps {generateme/fastmath {:mvn/version "2.2.1"
:exclusions [com.github.haifengl/smile-mkl]}}}
If you don't need certain interpolation or clustering methods you can exclude OpenBlas as well (be warned that other things can break):
:exclusions [com.github.haifengl/smile-mkl org.bytedeco/openblas]
When MKL is not available fastmath
(SMILE actually, here and here) will throw two exceptions with full stack traces about lack of MKL. You can safely ignore them.
[main] DEBUG smile.math.blas.LAPACK - Failed to create MKL instance:
java.lang.ClassNotFoundException: smile.math.blas.mkl.MKL
[...]
[main] DEBUG smile.math.blas.BLAS - Failed to create MKL instance:
java.lang.ClassNotFoundException: smile.math.blas.mkl.MKL
[...]
Code adopted from Zach Tellmans' library.
[* + - / > < >= <= == rem quot mod bit-or bit-and bit-xor bit-not bit-shift-left bit-shift-right unsigned-bit-shift-right inc dec zero? neg? pos? min max even? odd? bool-and bool-or bool-xor bool-not << >> >>> not==]
Most of them backed by Jafama FastMath 2.3.1 or Apache Commons Math 3.6.1
Vec2
), 3d (Vec3
) and 4d (Vec4
) vector types.Mat2x2
), 3d (Mat3x3
) and 4d (Mat4x4
) matrix types.With typical basic matrix operations
Bootstrap functions and confidence intervals
1d, 2d interpolations
Several easing functions (in, out, in-out)
Great collection (100+) of R^2->R^2 functions.
Gaussian Processes
Various clustering algorithms including K-Means++, DBSCAN, CLARANS, DENCLUE, MEC, Spectral, Deterministic Annealing
L-BFGS-B, Gradient, Nelder-Mead, Simplex, Powell, BOBYQA, CMAES, BayesianOptimizer, Linear optimizer
Hexagonal, squared, triangular, rhomboidal grid functions
Collection of various kernels (density, RBF, correlation)
Floating point operations with error bounds
Plenty of constant values
Almost all functions optimized to work with double
and long
primitives
Since this library is only JVM version, you can check following Clojure/ClojureScript libraries as replacement
Java classes are compiled for java 1.8
If you see place of improvement, I'm accepting PRs.
Copyright (c) 2023 generateme
Can you improve this documentation? These fine people already did:
GenerateMe, tsulej, genmeblog, generateme, teesel, Carsten Behring & Josef PospíšilEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close