Academic
FreeAnnual eligibility renewal
Students, teaching and non-commercial university research
- Combined library, subject to issued academic license entitlements
- Community support
- Annual eligibility renewal
- Redistribution not included
Java numerical library · Stable 1.2.7
NM Dev is a high-performance Java library of numerical algorithms for solving mathematical and engineering problems. Extensively tested and professionally documented, it helps engineers turn complex mathematics into clear, reusable, object-oriented code.
Mathematical building blocks, designed to fit together: each concept is represented by a class, from matrices and vectors to regression models and partial differential equation solvers. Built-in and user-defined classes share a consistent design, so you can combine simple components into sophisticated solutions without starting from scratch.
Built on numerical software experience dating back to 2010, NM Dev was written from scratch using the lessons learned from SuanShu, its open-source predecessor. The result is a unified, commercially supported library you can integrate into Java applications or use in the S2 computing environment.
Use is subject to the applicable license agreement. Redistribution requires an OEM agreement.
Capability areas for engineering, statistical modeling, quantitative research and scientific computing — all within the combined library, not separately installed Maven modules.

Matrix operations, factorizations and linear systems.

Probability, regression and statistical analysis.

Analyze and transform sampled signals.

Numerical differentiation and integration.

Model sequential data and forecasting problems.

Study tail behavior and rare-event risks.

Solve constrained and unconstrained problems.

Model systems with ordinary and partial differential equations.
From dependency to first matrix
The binary package is public. GitHub requires authentication for Maven downloads, even for public packages. Use your own GitHub username and personal access token (classic) with read:packages.
The Maven artifact is nmdev-dist; Java packages remain dev.nm.*. One combined customer runtime JAR includes bundled dependencies.
Merge these entries into your existing repositories and dependencies sections instead of duplicating those sections.
<repositories>
<repository>
<id>github-nm-packages</id>
<url>https://maven.pkg.github.com/nmltd/maven-packages</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>dev.nm</groupId>
<artifactId>nmdev-dist</artifactId>
<version>1.2.7</version>
</dependency>
</dependencies><project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>my-nmdev-app</artifactId>
<version>1.0.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<nmdev.version>1.2.7</nmdev.version>
</properties>
<repositories>
<repository>
<id>github-nm-packages</id>
<url>https://maven.pkg.github.com/nmltd/maven-packages</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>dev.nm</groupId>
<artifactId>nmdev-dist</artifactId>
<version>${nmdev.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<mainClass>example.FirstMatrix</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>Set GITHUB_USERNAME to your username and GITHUB_PACKAGES_TOKEN to your classic read:packages token. Credentials belong in Maven settings and environment variables, never in pom.xml or Git.
macOS/Linux: ~/.m2/settings.xml
Windows: %USERPROFILE%\.m2\settings.xml
Merge the server entry into an existing settings file without removing other entries.
Create a personal access token (classic)<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0">
<servers>
<server>
<id>github-nm-packages</id>
<username>${env.GITHUB_USERNAME}</username>
<password>${env.GITHUB_PACKAGES_TOKEN}</password>
</server>
</servers>
</settings>Create this Java file and run from the directory containing pom.xml and a valid external nm.lic. The example is for local evaluation and development.
NMDEV matrix indices start at 1, so get(2, 1) selects row 2, column 1.
Maven authentication, runtime licensing and redistribution permission are separate. Downloading the package grants neither runtime usage nor redistribution rights.
package example;
import dev.nm.algebra.linear.matrix.doubles.matrixtype.dense.DenseMatrix;
public final class FirstMatrix {
public static void main(String[] args) {
DenseMatrix a = new DenseMatrix(
new double[][] {{1, 2}, {3, 4}}
);
System.out.println("Rows = " + a.nRows()
+ ", columns = " + a.nCols());
System.out.println("Entry (2, 1) = " + a.get(2, 1));
}
}mvn -U clean compile exec:javaRows = 2, columns = 2
Entry (2, 1) = 3.0The inspected starter POM defaults to NMDEV 1.2.6 and includes a public trial nm.lic. These explicit overrides select stable 1.2.7 without changing the starter POM. The commands below are provided for evaluation; they have not been newly executed here with package credentials and a valid license.
git clone https://github.com/nmltd/nmdev-examples.git
cd nmdev-examples
mvn -U -Dnmdev.version=1.2.7 clean verify
mvn -Dnmdev.version=1.2.7 exec:java
mvn -Dnmdev.version=1.2.7 exec:java -Dexec.mainClass=dev.nm.examples.RunAllExamplesDirect public release downloads do not require Maven authentication. The runtime is the combined customer JAR with bundled dependencies; runtime use requires a valid license.
Extract the Javadoc JAR and open index.html. Versioned downloadable documentation and rolling online documentation can differ. The Maven instructions above are the customer installation reference for nmdev-dist.
Use is subject to the applicable license agreement. Redistribution requires an OEM agreement. Public download access does not grant redistribution rights.
Books
Our books teach math and numerical programming in Java with NM Dev / SuanShu, with plenty of examples on GitHub.
.NET environment
This is a FREE, experimental version of the SuanShu library for the dot net environment. Download it directly below — no registration or email needed.
For more information, see
Launch prices · USD · annual billing
FreeAnnual eligibility renewal
Students, teaching and non-commercial university research
$99per year
One personally funded developer
$399per developer / year
Employer/company-funded development
Make an inquiry
Custom team sizes and deployment requirements
Discuss enterprise / OEM licensingStandard licenses do not permit redistribution of NMDEV. An OEM agreement is required to bundle, embed, ship, sublicense or otherwise redistribute NMDEV with an application, SDK, library, container image or other deliverable supplied to third parties. Contact sales@nm.dev for OEM licensing.
Enterprise purchase does not automatically grant OEM rights. Contact us to confirm licensing for hosted services and customer-facing deployments.
License duration, deployment rights and continued use after expiry are governed by your license agreement. Developer seats cover people directly developing with NMDEV; these proposed plans do not override a conflicting existing agreement.
Preserve third-party notices. Bundled dependencies remain subject to their respective terms, distinct from NMDEV’s proprietary licensing.
A complete comparison of matrix operations, decompositions and linear systems across 12 numerical libraries. The results below reproduce the published benchmark values, normalized to SuanShu’s runtime.
Tested on September 24, 2015 using SuanShu 3.3.0, NM Dev’s predecessor. These historical results are not measurements of the current NM Dev release. Performance depends on hardware, versions and workload.
Matrix size · 5000 × 5000
19.837×
R’s runtime relative to SuanShu
Apache Commons Math recorded 7.125× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 19.837 |
| Apache Commons Math 3.5 | 7.125 |
| Colt 1.2.0 | 5.021 |
| Parallel Colt 0.10.1 | 2.427 |
| EJML 0.25 | 3.076 |
| JAMA 1.0.3 | 6.424 |
| jblas 1.2.4 | 8.583 |
| JLAPACK 0.8 | 1,924.31 |
| MTJ 1.0.4 | 6.37 |
| ojAlgo 38.2 | 4.749 |
| UJMP 0.3.0 | 2.133 |
Matrix size · 5000 × 5000
32.482×
R’s runtime relative to SuanShu
Apache Commons Math recorded 3.384× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 32.482 |
| Apache Commons Math 3.5 | 3.384 |
| Colt 1.2.0 | 5.388 |
| Parallel Colt 0.10.1 | 3.697 |
| EJML 0.25 | 4.697 |
| JAMA 1.0.3 | 1.317 |
| jblas 1.2.4 | 12.906 |
| JLAPACK 0.8 | 30.104 |
| MTJ 1.0.4 | 12.468 |
| ojAlgo 38.2 | 12.215 |
| UJMP 0.3.0 | 4.604 |
Matrix size · 5000 × 5000
21.283×
R’s runtime relative to SuanShu
Apache Commons Math recorded 2.411× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 21.283 |
| Apache Commons Math 3.5 | 2.411 |
| Colt 1.2.0 | 3.514 |
| Parallel Colt 0.10.1 | 2.826 |
| EJML 0.25 | 2.996 |
| JAMA 1.0.3 | 1.066 |
| jblas 1.2.4 | 7.336 |
| JLAPACK 0.8 | 30.89 |
| MTJ 1.0.4 | 7.302 |
| ojAlgo 38.2 | 6.781 |
| UJMP 0.3.0 | 2.656 |
Matrix size · (2000 × 2000) × (2000 × 2000)
14.405×
R’s runtime relative to SuanShu
Apache Commons Math recorded 182.081× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 14.405 |
| Apache Commons Math 3.5 | 182.081 |
| Colt 1.2.0 | 105.403 |
| Parallel Colt 0.10.1 | 9.271 |
| EJML 0.25 | 14.532 |
| JAMA 1.0.3 | 15.817 |
| jblas 1.2.4 | 16.06 |
| JLAPACK 0.8 | 20.007 |
| MTJ 1.0.4 | 13.937 |
| ojAlgo 38.2 | 2.09 |
| UJMP 0.3.0 | 1.572 |
Matrix size · 2000 × 2000
1.821×
R’s runtime relative to SuanShu
Apache Commons Math recorded 31.861× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 1.821 |
| Apache Commons Math 3.5 | 31.861 |
| Colt 1.2.0 | 5.002 |
| Parallel Colt 0.10.1 | 5.051 |
| EJML 0.25 | 3.16 |
| JAMA 1.0.3 | 3.106 |
| jblas 1.2.4 | 2.52 |
| JLAPACK 0.8 | 3.379 |
| MTJ 1.0.4 | 48.544 |
| ojAlgo 38.2 | 1.183 |
| UJMP 0.3.0 | 3.151 |
Matrix size · 2000 × 2000
4.726×
R’s runtime relative to SuanShu
Apache Commons Math recorded 19.065× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 4.726 |
| Apache Commons Math 3.5 | 19.065 |
| Colt 1.2.0 | 7.723 |
| Parallel Colt 0.10.1 | 8.396 |
| EJML 0.25 | 4.539 |
| JAMA 1.0.3 | 6.246 |
| jblas 1.2.4 | 4.476 |
| JLAPACK 0.8 | 4.876 |
| MTJ 1.0.4 | 4.131 |
| ojAlgo 38.2 | 1.008 |
| UJMP 0.3.0 | 6.313 |
Matrix size · 2000 × 2000
2.566×
R’s runtime relative to SuanShu
Apache Commons Math recorded 7.768× the SuanShu runtime in this test.
Parallel Colt 0.10.1 and ojAlgo 38.2 recorded a lower runtime than SuanShu for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 2.566 |
| Apache Commons Math 3.5 | 7.768 |
| Colt 1.2.0 | 77.602 |
| Parallel Colt 0.10.1 | 0.952 |
| EJML 0.25 | 4.642 |
| JAMA 1.0.3 | 117.715 |
| jblas 1.2.4 | 8.739 |
| JLAPACK 0.8 | 3.147 |
| MTJ 1.0.4 | 5.528 |
| ojAlgo 38.2 | 0.763 |
| UJMP 0.3.0 | 118.859 |
Matrix size · 5000 × 5000
8.73×
R’s runtime relative to SuanShu
Apache Commons Math recorded 13.778× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 8.73 |
| Apache Commons Math 3.5 | 13.778 |
| Colt 1.2.0 | 13.713 |
| Parallel Colt 0.10.1 | 1.192 |
| EJML 0.25 | 7.94 |
| JAMA 1.0.3 | 11.22 |
| jblas 1.2.4 | 8.848 |
| JLAPACK 0.8 | 12.699 |
| MTJ 1.0.4 | 8.466 |
| ojAlgo 38.2 | 4.755 |
| UJMP 0.3.0 | 11.319 |
Matrix size · 2000 × 2000
1.871×
R’s runtime relative to SuanShu
Apache Commons Math recorded 32.189× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 1.871 |
| Apache Commons Math 3.5 | 32.189 |
| Colt 1.2.0 | 5.112 |
| Parallel Colt 0.10.1 | 5.11 |
| EJML 0.25 | 3.28 |
| JAMA 1.0.3 | 3.176 |
| jblas 1.2.4 | 2.541 |
| JLAPACK 0.8 | 3.424 |
| MTJ 1.0.4 | 1.728 |
| ojAlgo 38.2 | 1.149 |
| UJMP 0.3.0 | 3.213 |
Matrix size · 2000 × 1000
2.329×
R’s runtime relative to SuanShu
Apache Commons Math recorded 8.097× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 2.329 |
| Apache Commons Math 3.5 | 8.097 |
| Colt 1.2.0 | 70.712 |
| Parallel Colt 0.10.1 | 1.672 |
| EJML 0.25 | 4.591 |
| JAMA 1.0.3 | 101.534 |
| jblas 1.2.4 | 12.338 |
| JLAPACK 0.8 | 5.739 |
| MTJ 1.0.4 | 4.435 |
| ojAlgo 38.2 | 1.223 |
| UJMP 0.3.0 | 101.888 |
Matrix size · 2000 × 2000
2.358×
R’s runtime relative to SuanShu
Apache Commons Math recorded 25.56× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 2.358 |
| Apache Commons Math 3.5 | 25.56 |
| Colt 1.2.0 | 45.414 |
| Parallel Colt 0.10.1 | 45.482 |
| EJML 0.25 | 4.82 |
| JAMA 1.0.3 | 45.331 |
| jblas 1.2.4 | 2.534 |
| JLAPACK 0.8 | 3.833 |
| MTJ 1.0.4 | 2.156 |
| ojAlgo 38.2 | 4.273 |
| UJMP 0.3.0 | 45.397 |
Matrix size · 2000 × 2000
2.129×
R’s runtime relative to SuanShu
Apache Commons Math recorded 39.294× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 2.129 |
| Apache Commons Math 3.5 | 39.294 |
| Colt 1.2.0 | 40.014 |
| Parallel Colt 0.10.1 | 3.445 |
| EJML 0.25 | 3.24 |
| JAMA 1.0.3 | 38.963 |
| jblas 1.2.4 | 6.509 |
| JLAPACK 0.8 | 3.004 |
| MTJ 1.0.4 | 2.056 |
| ojAlgo 38.2 | 2.592 |
| UJMP 0.3.0 | 38.816 |
Matrix size · 2000 × 2000
6.293×
R’s runtime relative to SuanShu
Apache Commons Math recorded 17.929× the SuanShu runtime in this test.
ojAlgo 38.2 recorded a lower runtime than SuanShu for this operation.
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 6.293 |
| Apache Commons Math 3.5 | 17.929 |
| Colt 1.2.0 | 7.531 |
| Parallel Colt 0.10.1 | 8.312 |
| EJML 0.25 | 5.605 |
| JAMA 1.0.3 | 5.857 |
| jblas 1.2.4 | 5.837 |
| JLAPACK 0.8 | 7.276 |
| MTJ 1.0.4 | 5.477 |
| ojAlgo 38.2 | 0.959 |
| UJMP 0.3.0 | 5.952 |
Historical customer information · not a statement of current endorsement