I’m happy to announce that the first working release of spgl1++ is now available. It is based on the Matlab implementation of Michael Friedlander and Ewout van den Berg and is meant to be a standalone library which can be included in your C++ projects.

It’s still “early” in development, as such it only solves the regular basis pursuit problem with real measurement matrix :

subject to

Features I’m currently working on, which shouldn’t be far away, include solving the weighted version with denoising and complex measurement matrix :

subject to

I’ll be tweaking it and testing various matrix vector libraries. It currently works with Armadillo, a C++ linear algebra library whose syntax (API) is deliberately similar to Matlab.

Since the goal is to accomodate general matrix vector libraries, you will* *have to provide spgl1++ with certain template specializations, such as how it does matrix vector products. For example, with Armadillo:

1 2 3 4 5 6 7 8 |
namespace libspgl1 { namespace matrix{ template<> arma::vec matvec(const arma::vec& A, const arma::vec& b){ return A*b; } } } |

I say “should”, since I’ve only really tested it with Armadillo and I’m sure I’ve accidentally added some dependencies in the code and will have to work on making it as general as possible. In the coming days/weeks/months I’ll be doing testing and adding documentation.

Happy sparse reconstruction!

Hi Brock, I am wondering if you have made progress or completed your spgl1++ code with denoising and a complex measurement matrix? Please let me know, thank you.

Hi Nate,

Sorry for the delayed response. I’ve had my priorities elsewhere recently.

I hadn’t realized there was any interest in it! I’ll put it back into my weekend coding schedule. If I’m diligent, it might be a couple weekends, hopefully the refactoring isn’t too time consuming. I think the most work will be in the projection portion. If you’re on a time constraint for a C++ implementation, feel free to reply to this post again and I’ll try to double time it 🙂 Thanks for your comment!

Cheers,

Brock

Just adding to the comment that there is interest in having the complex matrix: yes!

Thanks for the good work!