Skip to content

Latest commit

 

History

History
64 lines (54 loc) · 3 KB

README.md

File metadata and controls

64 lines (54 loc) · 3 KB

Solvers

Test codecov

Here are my implementation of some useful solvers for mainly optimization problems in different programming languages. I hope you find them helpful.

Problem definition

  • Scalar equation: $f(x) = 0$
  • Linear system: $\mathbf{A}\mathbf{x} = \mathbf{b}$
  • Non-negative linear system: $\mathbf{A}\mathbf{x} = \mathbf{b}$ subject to $\mathbf{x} \succeq 0$
  • Non-negative least squares: $\min_{\mathbf{x}} \frac{1}{2}|\mathbf{A}\mathbf{x} - \mathbf{b}|_2^2$ subject to $\mathbf{x} \succeq 0$
  • Non-negative quadratic programming: $\min_{\mathbf{x}} \frac{1}{2}\mathbf{x}^\top\mathbf{Q}\mathbf{x} + \mathbf{c}^\top\mathbf{x}$ subject to $\mathbf{x} \succeq 0$

List of solvers

  • Scalar equation solver (MATLAB)
    • Algorithm: Bisection method
    • Self-contained
  • Non-negative linear system solver (MATLAB)
    • Optimization object: KL-Divergence
    • Algorithm: Fixed-point iteration
    • Extra requirement: The matrix $\mathbf{A}$ must be non-negative
    • Self-contained
  • Non-negative linear system solver (MATLAB)
    • Optimization object: Least Squares
    • Algorithm: Fixed-point iteration
    • Self-contained
  • Non-negative linear system solver (MATLAB)
    • Optimization object: KL-Divergence
    • Algorithm: Gradient Descent
    • Extra requirement: The matrix $\mathbf{A}$ must be non-negative
    • Self-contained
  • Non-negative linear system solver (MATLAB)
    • Optimization object: Least Squares
    • Algorithm: Projected Gradient Descent
    • Self-contained
  • Non-negative quadratic programming solver (MATLAB)
    • Algorithm: Projected Gradient Descent
    • Self-contained
  • Non-negative quadratic programming solver (MATLAB)
    • Algorithm: Multiplicative update
    • Self-contained
  • Linear system solver (MATLAB)
    • Algorithm: Jacobi iteration
    • Self-contained
  • Linear system solver (MATLAB)
    • Algorithm: Gauss-Seidel iteration
    • Self-contained
  • Linear system solver (MATLAB)
    • Algorithm: SOR iteration
    • Self-contained

Usage

MATLAB

Clone the repository or download the source code from release and add the path to the MATLAB environment. Alternatively, you can add this repository as a Git submodule to your project.

Performance

Non-negative linear system solvers Iterative linear system solvers Scalar equation solvers