← Products

Java numerical library · Stable 1.2.7

NMDEV

Numerical computing for Java applications.

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.

Mathematical capabilities

8 capability areas

Capability areas for engineering, statistical modeling, quantitative research and scientific computing — all within the combined library, not separately installed Maven modules.

From dependency to first matrix

Quick start

01 · Add NMDEV to Maven

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.

Existing-project pom.xml snippet
<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>
Complete example pom.xml
<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>

02 · Authenticate with GitHub

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)
Maven settings.xml
<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>

03 · Run your first matrix

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.

src/main/java/example/FirstMatrix.java
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));
    }
}
Run from the project directory
mvn -U clean compile exec:java
Expected application output
Rows = 2, columns = 2
Entry (2, 1) = 3.0

Start with the public examples

The 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.

Evaluate stable NMDEV with the public starter
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.RunAllExamples
Browse all tutorials

Downloads and documentation

Direct public release downloads do not require Maven authentication. The runtime is the combined customer JAR with bundled dependencies; runtime use requires a valid license.

Download runtime JAR — 1.2.7Combined customer JAR with bundled dependencies
Download Javadoc JAR — 1.2.7Offline API documentation, not implementation source
Download SHA-256 checksumsVerify release downloads
View releaseStable 1.2.7 validated release
Browse online JavadocRolling API documentation
Open the NM Dev wikiGetting started, tutorials and benchmarks
Public binary distribution repositoryPublished binary distribution

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.

Legacy setup guide (historical instructions)

Books

Learn numerical programming in Java.

Our books teach math and numerical programming in Java with NM Dev / SuanShu, with plenty of examples on GitHub.

Numerical Methods Using Java book coverNumerical Methods Using Kotlin book cover

.NET environment

SuanShu.NET

This is a FREE, experimental version of the SuanShu library for the dot net environment. Download it directly below — no registration or email needed.

Pricing and licensing

Launch prices · USD · annual billing

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
Download trial license

Individual

$99per year

One personally funded developer

  • Commercial use permitted, subject to license terms
  • Combined library
  • Updates during paid coverage
  • Community support
  • Redistribution requires an OEM agreement
Request individual license

Business

$399per developer / year

Employer/company-funded development

  • Commercial development and internal business use
  • Combined library
  • Updates and standard email support during paid coverage
  • Redistribution requires an OEM agreement
Request business license

Enterprise / OEM

Make an inquiry

Custom team sizes and deployment requirements

Discuss enterprise / OEM licensing
  • Procurement requirements
  • Separately agreed support
  • OEM rights require an executed agreement
  • Redistribution scope, fees and deployment terms negotiated separately

Redistribution requires an OEM agreement

Standard 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.

Performance benchmarks

13 operations · 12 libraries

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

Matrix transpose

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.

Exact runtime values
Matrix transpose: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.1419.837
Apache Commons Math 3.57.125
Colt 1.2.05.021
Parallel Colt 0.10.12.427
EJML 0.253.076
JAMA 1.0.36.424
jblas 1.2.48.583
JLAPACK 0.81,924.31
MTJ 1.0.46.37
ojAlgo 38.24.749
UJMP 0.3.02.133

Matrix size · 5000 × 5000

Matrix addition

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.

Exact runtime values
Matrix addition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.1432.482
Apache Commons Math 3.53.384
Colt 1.2.05.388
Parallel Colt 0.10.13.697
EJML 0.254.697
JAMA 1.0.31.317
jblas 1.2.412.906
JLAPACK 0.830.104
MTJ 1.0.412.468
ojAlgo 38.212.215
UJMP 0.3.04.604

Matrix size · 5000 × 5000

Matrix scale

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.

Exact runtime values
Matrix scale: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.1421.283
Apache Commons Math 3.52.411
Colt 1.2.03.514
Parallel Colt 0.10.12.826
EJML 0.252.996
JAMA 1.0.31.066
jblas 1.2.47.336
JLAPACK 0.830.89
MTJ 1.0.47.302
ojAlgo 38.26.781
UJMP 0.3.02.656

Matrix size · (2000 × 2000) × (2000 × 2000)

Matrix multiplication

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.

Matrix multiplication — relative runtimeSuanShu 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. Lower is better. Linear scale.045.5291.041136.561182.081SuanShu 3.3.0SuanShu 3.3.0: 11R 2.14R 2.14: 14.40514.405Apache Commons Math 3.5Apache Commons Math 3.5: 182.081182.081Colt 1.2.0Colt 1.2.0: 105.403105.403Parallel Colt 0.10.1Parallel Colt 0.10.1: 9.2719.271EJML 0.25EJML 0.25: 14.53214.532JAMA 1.0.3JAMA 1.0.3: 15.81715.817jblas 1.2.4jblas 1.2.4: 16.0616.06JLAPACK 0.8JLAPACK 0.8: 20.00720.007MTJ 1.0.4MTJ 1.0.4: 13.93713.937ojAlgo 38.2ojAlgo 38.2: 2.092.09UJMP 0.3.0UJMP 0.3.0: 1.5721.572
Relative runtime · SuanShu 3.3.0 = 1 · lower is better · linear scale (starts at 0)
Exact runtime values
Matrix multiplication: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.1414.405
Apache Commons Math 3.5182.081
Colt 1.2.0105.403
Parallel Colt 0.10.19.271
EJML 0.2514.532
JAMA 1.0.315.817
jblas 1.2.416.06
JLAPACK 0.820.007
MTJ 1.0.413.937
ojAlgo 38.22.09
UJMP 0.3.01.572

Matrix size · 2000 × 2000

Matrix determinant

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.

Exact runtime values
Matrix determinant: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.141.821
Apache Commons Math 3.531.861
Colt 1.2.05.002
Parallel Colt 0.10.15.051
EJML 0.253.16
JAMA 1.0.33.106
jblas 1.2.42.52
JLAPACK 0.83.379
MTJ 1.0.448.544
ojAlgo 38.21.183
UJMP 0.3.03.151

Matrix size · 2000 × 2000

Matrix inverse

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.

Exact runtime values
Matrix inverse: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.144.726
Apache Commons Math 3.519.065
Colt 1.2.07.723
Parallel Colt 0.10.18.396
EJML 0.254.539
JAMA 1.0.36.246
jblas 1.2.44.476
JLAPACK 0.84.876
MTJ 1.0.44.131
ojAlgo 38.21.008
UJMP 0.3.06.313

Matrix size · 2000 × 2000

Symmetric matrix inverse

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.

Exact runtime values
Symmetric matrix inverse: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.142.566
Apache Commons Math 3.57.768
Colt 1.2.077.602
Parallel Colt 0.10.10.952
EJML 0.254.642
JAMA 1.0.3117.715
jblas 1.2.48.739
JLAPACK 0.83.147
MTJ 1.0.45.528
ojAlgo 38.20.763
UJMP 0.3.0118.859

Matrix size · 5000 × 5000

Cholesky decomposition

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.

Exact runtime values
Cholesky decomposition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.148.73
Apache Commons Math 3.513.778
Colt 1.2.013.713
Parallel Colt 0.10.11.192
EJML 0.257.94
JAMA 1.0.311.22
jblas 1.2.48.848
JLAPACK 0.812.699
MTJ 1.0.48.466
ojAlgo 38.24.755
UJMP 0.3.011.319

Matrix size · 2000 × 2000

LU decomposition

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.

Exact runtime values
LU decomposition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.141.871
Apache Commons Math 3.532.189
Colt 1.2.05.112
Parallel Colt 0.10.15.11
EJML 0.253.28
JAMA 1.0.33.176
jblas 1.2.42.541
JLAPACK 0.83.424
MTJ 1.0.41.728
ojAlgo 38.21.149
UJMP 0.3.03.213

Matrix size · 2000 × 1000

QR decomposition

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.

Exact runtime values
QR decomposition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.142.329
Apache Commons Math 3.58.097
Colt 1.2.070.712
Parallel Colt 0.10.11.672
EJML 0.254.591
JAMA 1.0.3101.534
jblas 1.2.412.338
JLAPACK 0.85.739
MTJ 1.0.44.435
ojAlgo 38.21.223
UJMP 0.3.0101.888

Matrix size · 2000 × 2000

Symmetric eigenvalue decomposition

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.

Exact runtime values
Symmetric eigenvalue decomposition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.142.358
Apache Commons Math 3.525.56
Colt 1.2.045.414
Parallel Colt 0.10.145.482
EJML 0.254.82
JAMA 1.0.345.331
jblas 1.2.42.534
JLAPACK 0.83.833
MTJ 1.0.42.156
ojAlgo 38.24.273
UJMP 0.3.045.397

Matrix size · 2000 × 2000

Singular value decomposition

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.

Exact runtime values
Singular value decomposition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.142.129
Apache Commons Math 3.539.294
Colt 1.2.040.014
Parallel Colt 0.10.13.445
EJML 0.253.24
JAMA 1.0.338.963
jblas 1.2.46.509
JLAPACK 0.83.004
MTJ 1.0.42.056
ojAlgo 38.22.592
UJMP 0.3.038.816

Matrix size · 2000 × 2000

Solving a linear equality system

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.

Exact runtime values
Solving a linear equality system: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.146.293
Apache Commons Math 3.517.929
Colt 1.2.07.531
Parallel Colt 0.10.18.312
EJML 0.255.605
JAMA 1.0.35.857
jblas 1.2.45.837
JLAPACK 0.87.276
MTJ 1.0.45.477
ojAlgo 38.20.959
UJMP 0.3.05.952

Test environment

Date:
September 24, 2015
Baseline:
SuanShu 3.3.0
CPU:
Dual Intel Xeon X5650, 2.66 GHz · 12 cores total
Memory:
24 GB RAM
OS:
Windows 7 Ultimate, 64-bit
JVM:
Oracle Java HotSpot 64-bit Server 1.8.0_25

FAQ and contact

No. Downloading a package does not grant runtime usage or redistribution rights. Usage is subject to the applicable license agreement and an issued runtime license. The public starter includes a trial nm.lic for local evaluation and development.

GitHub requires authentication for Maven downloads, including public packages. Use your own username and personal access token (classic) with read:packages in settings/environment variables. Direct public release downloads do not require Maven authentication.

No. Install dev.nm:nmdev-dist:1.2.7 for the combined customer runtime JAR with bundled dependencies. Java package names remain dev.nm.*. Capability areas describe mathematical functionality, not separately installed Maven modules.

Standard licenses do not permit redistribution. Bundling, embedding, shipping, sublicensing or redistributing NMDEV with an application, SDK, library, container image or other third-party deliverable requires an executed OEM agreement. An Enterprise purchase does not automatically grant OEM rights.

Contact us to confirm licensing for hosted services and customer-facing deployments. Deployment rights and scope are governed by your applicable license agreement, not an assumption of unrestricted SaaS or unlimited machines.

License duration, deployment rights and continued use after expiry are governed by your license agreement and issued licenses. Annual developer pricing does not promise perpetual runtime use after expiry.

No. The Javadoc JAR contains offline API documentation, not implementation source. Extract it and open index.html. Versioned downloadable documentation and rolling online documentation can differ.

Historical customer information · not a statement of current endorsement

Customers through the years

Hong Kong, China

  • Rongtong Global Investment Limited
  • Dr. Stanley Ho Medical Development Foundation
  • Chorys Limited

Beijing, China

  • 智速科技有限公司
  • 北京大学
  • 中国人民大学

Shanghai, China

  • 上海简雍资产管理有限公司
  • 中国科学院上海生命科学研究院

Shenzhen, China

  • 正前方金服

Taiwan, China

  • National Chiao Tung University
  • National Taiwan University

Singapore

  • Call Levels
  • Robust Tech House
  • Agency for Science Technology and Research

Indonesia

  • BINUS University International

Vietnam

  • Saigon University

India

  • Dynamic Levels
  • National Atmospheric Research Laboratory, Government of India
  • Supercomputer Education and Research Centre
  • Computer Science, Indian Institute of Science

Switzerland

  • Argentière Capital AG

Israel

  • Tel Aviv University

Italy

  • PricewaterhouseCoopers
  • ERG Services SpA

Spain

  • Universidad Carlos III de Madrid

Denmark

  • Applied Crypto Aps

Norway

  • Norges teknisk-naturvitenskapelige universitet

Sweden

  • Uppsala University

Poland

  • Jagiellonian University
  • Politechnika Świętokrzyska

United Kingdom

  • Cabestan Research
  • Xenfin Capital Ltd
  • University of York
  • University of Birmingham
  • University of Nottingham
  • University of St Andrews
  • Swansea University

Scotland, United Kingdom

  • University of Strathclyde

California, USA

  • Gazelle

New York, USA

  • Cowen, Inc.

Massachusetts, USA

  • Grimes & Company, Inc.

Florida, USA

  • Parallax Quantitative Asset Management

Georgia, USA

  • Aline Consulting LLC

Mexico

  • Centro de Enseñanza Tecnica Industrial

Brasil

  • Universidade de São Paulo