// @HEADER // ***************************************************************************** // Rapid Optimization Library (ROL) Package // // Copyright 2014 NTESS and the ROL contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER #pragma once #ifndef COMPRESSED_SENSING_HPP #define COMPRESSED_SENSING_HPP #include "ROL_LinearConstraint.hpp" #include "ROL_NonlinearLeastSquaresObjective.hpp" #include "random_matrix.hpp" #include "l1_penalty_optimization_problem.hpp" template class CompressedSensingConstraint : public ROL::LinearConstraint { public: CompressedSensingConstraint( Ordinal rows, Ordinal cols ) : ROL::LinearConstraint(create_random_operator(rows,cols), create_random_vector(rows)) {} }; template ROL::Ptr> make_CompressedSensingObjective( Ordinal rows, Ordinal cols ) { using ROL::Ptr; using ROL::makePtr; Ptr> con = makePtr>(rows,cols); auto x = ROL::TeuchosVector(cols); auto c = ROL::TeuchosVector(rows); Ptr> obj = makePtr>(con,x,c); return obj; } #endif // COMPRESSED_SENSING_HPP