Basis pursuit¶
Basis pursuit (BP) is the search for a solution to \(A x = b\) which minimizes the one norm of \(x\), i.e.,
\[\min_x \| x \|_1 \text{ such that } A x = b.\]
Real instances of the problem are expressible as a Linear Program by decomposing \(x\) into its positive and negative parts, say \(x = u - v\), and posing the problem
\[\begin{split}\min_{u,v} \{\; 1^T \begin{pmatrix} u \\ v \end{pmatrix} \; | \; \begin{pmatrix} A & -A \end{pmatrix} \begin{pmatrix} u \\ v \end{pmatrix} = b \; \wedge \; \begin{pmatrix} u \\ v \end{pmatrix} \ge 0 \; \}.\end{split}\]
By default, Elemental solves this linear program via a Mehrotra Predictor-Corrector primal-dual Interior Point Method.
Complex instances of Basis Pursuit are currently supported through Second-Order Cone Programs. TODO: Describe this embedding.
Python API¶
-
BP
(A, b[, ctrl=None])¶ - Parameters
A – dense or sparse, sequential or distributed matrix
b – dense right-hand side vector (with type compatible to
A
)ctrl – (optional)
LPDirectCtrl
instance
- Return type
dense solution vector (with type matching that of
b
)
C++ API¶
-
void
BP
(const Matrix<Real> &A, const Matrix<Real> &b, Matrix<Real> &x, const lp::direct::Ctrl<Real> &ctrl = lp::direct::Ctrl<Real>(false))¶
-
void
BP
(const ElementalMatrix<Real> &A, const ElementalMatrix<Real> &b, ElementalMatrix<Real> &x, const lp::direct::Ctrl<Real> &ctrl = lp::direct::Ctrl<Real>(false))¶
-
void
BP
(const SparseMatrix<Real> &A, const Matrix<Real> &b, Matrix<Real> &x, const lp::direct::Ctrl<Real> &ctrl = lp::direct::Ctrl<Real>(true))¶
-
void
BP
(const DistSparseMatrix<Real> &A, const DistMultiVec<Real> &b, DistMultiVec<Real> &x, const lp::direct::Ctrl<Real> &ctrl = lp::direct::Ctrl<Real>(true))¶
-
void
BP
(const Matrix<Complex<Real>> &A, const Matrix<Complex<Real>> &b, Matrix<Complex<Real>> &x, const socp::direct::Ctrl<Real> &ctrl = socp::direct::Ctrl<Real>(false))¶
-
void
BP
(const ElementalMatrix<Complex<Real>> &A, const ElementalMatrix<Complex<Real>> &b, ElementalMatrix<Complex<Real>> &x, const socp::direct::Ctrl<Real> &ctrl = socp::direct::Ctrl<Real>(false))¶
-
void
BP
(const SparseMatrix<Complex<Real>> &A, const Matrix<Complex<Real>> &b, Matrix<Complex<Real>> &x, const socp::direct::Ctrl<Real> &ctrl = socp::direct::Ctrl<Real>(true))¶
-
void
BP
(const DistSparseMatrix<Complex<Real>> &A, const DistMultiVec<Complex<Real>> &b, DistMultiVec<Complex<Real>> &x, const socp::direct::Ctrl<Real> &ctrl = socp::direct::Ctrl<Real>(true))¶
C API¶
Single-precision¶
Double-precision¶
Single-precision complex¶
Single-precision¶
-
ElError
ElBPXDist_s
(ElConstDistMatrix_s A, ElConstDistMatrix_s b, ElDistMatrix_s x, ElLPDirectCtrl_s ctrl)¶
Double-precision¶
-
ElError
ElBPXDist_d
(ElConstDistMatrix_d A, ElConstDistMatrix_d b, ElDistMatrix_d x, ElLPDirectCtrl_d ctrl)¶
Single-precision complex¶
-
ElError
ElBPXDist_c
(ElConstDistMatrix_c A, ElConstDistMatrix_c b, ElDistMatrix_c x, ElSOCPDirectCtrl_s ctrl)¶