OpenMS
Loading...
Searching...
No Matches
NonNegativeLeastSquaresSolver.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Chris Bielow $
6// $Authors: Chris Bielow $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12#include <vector>
13
14namespace OpenMS
15{
22 {
23public:
24
26 {
28 ITERATION_EXCEEDED
29 };
30
43 static Int solve(const Matrix<double>& A, const Matrix<double>& b, Matrix<double>& x);
44
67 static Int solve(double* A, int A_rows, int A_cols,
68 std::vector<double>& b, std::vector<double>& x);
69
82 static Int solve(Matrix<double>& A, std::vector<double>& b, std::vector<double>& x);
83 };
84
85} // namespace OpenMS
A 2D matrix class with efficient buffer access for NumPy interoperability.
Definition Matrix.h:35
Wrapper for a non-negative least squares (NNLS) solver.
Definition NonNegativeLeastSquaresSolver.h:22
static Int solve(const Matrix< double > &A, const Matrix< double > &b, Matrix< double > &x)
Solve the non-negative least square problem Ax=b, where x>0.
static Int solve(Matrix< double > &A, std::vector< double > &b, std::vector< double > &x)
Solve the non-negative least square problem Ax=b using Matrix and vectors.
RETURN_STATUS
Definition NonNegativeLeastSquaresSolver.h:26
@ SOLVED
Definition NonNegativeLeastSquaresSolver.h:27
static Int solve(double *A, int A_rows, int A_cols, std::vector< double > &b, std::vector< double > &x)
Solve the non-negative least square problem Ax=b, where x>0. Works in-place.
int Int
Signed integer type.
Definition Types.h:72
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19