SuanShu numerical library
{{Short description|Java math library}}
{{Infobox software
| name = SuanShu
| latest release version = 20120606
| latest release date = 2012-06-06
| programming language = Java
| genre = Math
| license = Apache License 2.0
| website = {{URL|https://github.com/nmltd/SuanShu}}
}}
SuanShu is a Java math library. It is open-source under Apache License 2.0 available in [https://github.com/nmltd/SuanShu GitHub]. SuanShu is a large collection of Java classes for basic numerical analysis, statistics, and optimization.{{Cite web|title=Java Numerics: Main|url=https://math.nist.gov/javanumerics/|access-date=2021-03-23|website=math.nist.gov}} It implements a parallel version of the adaptive strassen's algorithm for fast matrix multiplication.{{Cite web|date=2015-08-07|title=Fastest Java Matrix Multiplication {{!}} NM DEV|url=https://nm.dev/2015/08/07/accelerating-matrix-multiplication/|access-date=2021-08-02|website=NM DEV {{!}} Mathematics at Your Fingertips}} SuanShu has been quoted and used in a number of academic works.{{Cite thesis|title=Automatic stability verification via Lyapunov functions: representations, transformations, and practical issues|url=http://oops.uni-oldenburg.de/4217/|publisher=Universität Oldenburg.|date=2018|degree=phd|first=Eike|last=Möhlmann}}{{Cite journal|last1=Christou|first1=Ioannis T.|last2=Vassilaras|first2=Spyridon|date=2013-10-01|title=A parallel hybrid greedy branch and bound scheme for the maximum distance-2 matching problem|url=https://www.sciencedirect.com/science/article/pii/S0305054813001159|journal=Computers & Operations Research|language=en|volume=40|issue=10|pages=2387–2397|doi=10.1016/j.cor.2013.04.009|issn=0305-0548|url-access=subscription}}{{Cite journal|last1=Łukawska|first1=Barbara|last2=Łukawski|first2=Grzegorz|last3=Sapiecha|first3=Krzysztof|date=2016-10-04|title=An implementation of artificial advisor for dynamic classification of objects|url=https://reshistorica.journals.umcs.pl/ai/article/view/3502|journal=Annales Universitatis Mariae Curie-Skłodowska, Sectio AI – Informatica|language=en|volume=16|issue=1|pages=40|doi=10.17951/ai.2016.16.1.40|issn=2083-3628|doi-access=free}}{{Cite book|last=Ansari|first=Mohd Samar|url=https://books.google.com/books?id=mi66BQAAQBAJ&q=%22suanshu%22+java&pg=PR10|title=Non-Linear Feedback Neural Networks: VLSI Implementations and Applications|date=2013-09-03|publisher=Springer|isbn=978-81-322-1563-9|language=en}}
Features
- linear algebra
- root finding
- curve fitting and interpolation
- unconstrained and constrained optimization
- statistical analysis
- linear regression
- probability distributions and random number generation
- ordinary and partial differential equation solvers
License terms
SuanShu is released under the terms of the Apache License 2.0
Examples of usage
The following code shows the object-oriented design of the library (in contrast to the traditional procedural design of many other FORTRAN and C numerical libraries) by a simple example of minimization.
LogGamma logGamma = new LogGamma(); // the log-gamma function
BracketSearchMinimizer solver = new BrentMinimizer(1e-8, 10); // precision, max number of iterations
UnivariateMinimizer.Solution soln = solver.solve(logGamma); // optimization
double x_min = soln.search(0, 5); // bracket = [0, 5]
System.out.println(String.format("f(%f) = %f", x_min, logGamma.evaluate(x_min)));
See also
- SOCP - Explanation of Second Order Conic Programming
- SDP - Explanation of Semidefinite Programming
- SQP - Explanation of Sequential quadratic programming
- Interior Point Method
- [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.134.9576&rep=rep1&type=pdf Adaptive strassen's algorithm] – fast matrix multiplication
- Apache License 2.0 - Version 2 of the Apache Software License