C++ Numerical Programming Library

Available in Microsoft Store (search keyword NPL)
Representation

Object-oriented representation of matrices, views, expressions, rotation, permutation, etc.

Arithmetics and Factorization

Arithmetic operations, Cholesky (full, partial, modified), Eigen, LU, QR, SVD

Linear System

Solve linear systems of different forms (singular, positive definite, indefinite), least square solutions.

Linear Algebra

Numerical linear algebra algorithms

Matrix, view, expression, iterator, factorization, linear system. Stable and efficient algorithms for medium size linear algebra problems.

1-D and N-D Functions

Common interfaces of math functions

Curves, surfaces, interpolation, integration, root-finding and minimization. Built-in blocks for univariate and multivariate functions.

1-d and N-d Functions

Piecewise functions, B-spline and Chebyshev curves, B-spline, bilinear and Chebyshev surfaces. Interface of general 1-d and n-d functions.

1-d Interpolation

Cublic spline interpolation, generalized to match the level, slope and curvature of given data points.

1-d Integration

Adaptive Gaussian quadrature.

1-d Root Finding and Minimization

Safeguarded algorithms to balance performance and convergence. Combining bisection (Golden section), rational interpolation and Newton method.

Line Search Methods

Modifed Newton, Quasi Newton, Conjugate Gradient.

Trust Region Methods

Nearly exact search, Conjugate Gradient-Steihaug.

Unconstrained Optimization

Solvers for general smooth functions

Line search, trust region. Unconstrained optimization for general smooth multivariate objective functions.

Linear Programming

Linear objective, linear constraints

Simplex, active set. Minimization of linear objective subject to general linear constraints.

Simplex Method

Classic Simplex algorithm implemented for medium to large size problems.

Active Set Method

Active set algorithm tailored for linear objective functions.

Inertia Control

Extended KKT system handling convex and general QP problems.

Active Set Method

Active set algorithm supporting both simple bounds and general linear constraints.

Quadratic Programming

Quadratic objective, linear constraints

Active set, convex QP, general QP. Minimization of quadratic objective subject to general linear constraints.

General Linearly Constrained Optimization

Smooth objective, linear constraints

Line search, active set. Minimization of general smooth functions subject to linear constraints.

Line Search Method

Search direction computed by modified Newton or Quasi-Newton methods. Step length computed by a line search method.

Active Set Method

Support general linear constraints and simple bound constraints.

Box Constrained

A light version of active set algorithm for problems with only simple bound constraints.

Sub QP

Linearize nonlinear constraints and solve a sub QP problem at major iterations.

Elastic Programming

Infeasible nonlinear constraints are treated as elastic constraints. The algorithm then solves an elastic programming problem.

Line Search Method

Compute primal-dual step update using line search method based on a globally converging merit function.

Nonlinear Programming

Smooth objective, nonlinear constraints

Sequential quadratic programming. Minimization of general smooth functions subject to nonlinear constraints.

Data Fitting and Model Calibration

Multiple choices of problem formulation

Regularization, generalized cross validation, constrained optimization. Direct data fit or indirectly as model calibration.

Linear and Nonlinear Least Square

Regularized, constrained, modified Gauss-Newton, Levenberg-Marquardt.

Smooth Curve and Surface Fitting

B-spline and Chebyshev curves and surfaces. Regularized least square fit or minimizing roughness measure subject to fitting error constraints, additional shape constraints.

Model Calibration

Minimize fitting error subject to model parameter constraints, or optimize a model metric function subject to fitting error tolerance constraints.

ODE Solvers

Classic Iterative Deferred Correction (IDeC) and spectral IDeC combined with explicit and implicit ODE methods.

PDE Solvers

Crank-Nicolson, Spectral Collocation, Method of Lines with 2nd order and 4th order accurate finite difference scheme. Support events and resets.

Differential Equations

High order accurate, stable methods

Ordinary differential equations, parabolic partial differential equations. Multiple solvers suitable to different types of problems.

Last Release: Version 1.3.0.2, build on Wednesday, October 25, 2023, available in Microsoft Store