Here are my implementation of some useful solvers for mainly optimization problems in different programming languages. I hope you find them helpful.
- 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$
- 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
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.