SuanShu numerical library
| Company type | Open-source software |
|---|---|
| Industry | Software development |
Area served | Worldwide |
| Products | Java mathematics library for numerical computation, statistical evaluation, and optimization |
SuanShu is an open-source Java mathematics library licensed under the Apache License 2.0 and hosted on GitHub. It provides a broad suite of Java classes designed for tasks in numerical computation, statistical evaluation, and optimization processes. Among its capabilities, SuanShu incorporates a parallelized version of the adaptive Strassen algorithm to accelerate matrix multiplication, thereby improving performance. This library has been referenced and applied in numerous scholarly and scientific studies, highlighting its dependability and practical use.
Features
- Linear algebra operations
- Solving equations for roots
- Curve fitting alongside interpolation methods
- Optimization with both constrained and unconstrained variables
- Statistical computations
- Linear regression analysis
- Probability distribution modeling and random number generation
- Solvers for ordinary and partial differential equations
License terms
SuanShu is released under the Apache License 2.0.
Examples of usage
Unlike many traditional numerical libraries written in FORTRAN or C that follow procedural paradigms, this library uses an object-oriented approach. For instance, performing minimization can be done as shown below:
<syntaxhighlight lang="java" line="1"> LogGamma logGamma = new LogGamma(); // instantiate log-gamma function BracketSearchMinimizer solver = new BrentMinimizer(1e-8, 10); // set precision and iteration limit UnivariateMinimizer.Solution soln = solver.solve(logGamma); // execute optimization double x_min = soln.search(0, 5); // define search interval [0, 5] System.out.println(String.format("f(%f) = %f", x_min, logGamma.evaluate(x_min))); </syntaxhighlight>
See also
- SOCP – Introduction to Second Order Cone Programming
- SDP – Basics of Semidefinite Programming
- SQP – Guide to Sequential Quadratic Programming
- Interior Point Method
- Adaptive Strassen's algorithm – Efficient method for matrix multiplication
- Apache License 2.0 – Details on Apache Software License version 2