Class NnlsSolver

java.lang.Object
jline.inference.util.NnlsSolver

public final class NnlsSolver extends Object
Non-negative least squares solver implementing the Lawson-Hanson algorithm. Solves: min ||Ax - b||^2 subject to x >= 0.
  • Method Details

    • lsqnonneg

      public static Matrix lsqnonneg(Matrix A, Matrix b)
      Solve the NNLS problem: min ||Ax - b||^2 subject to x >= 0.
    • lsqnonneg

      public static double[] lsqnonneg(double[][] A, double[] b)
      Solve NNLS with double array inputs: min ||Ax - b||^2 subject to x >= 0.