Commit acebb9a0 authored by David Frank's avatar David Frank Committed by Tobias Lasser
Browse files

Add convenience constructor to TikhonovProblem

Instead of first creating a WLSProblem and passing that to the
constructor, you can now pass the projector and the sinogram to the
problem. The constructor initializes a very basic form of tikhonov
regularization, for other forms, the other constructors should be used.
parent e74557c5
......@@ -4,6 +4,15 @@
namespace elsa
template <typename data_t>
TikhonovProblem<data_t>::TikhonovProblem(const LinearOperator<data_t>& A,
const DataContainer<data_t> b, real_t weight)
: Problem<data_t>{
L2NormPow2<data_t>(A, b),
RegularizationTerm<data_t>(weight, L2NormPow2<data_t>(A.getDomainDescriptor()))}
template <typename data_t>
const WLSProblem<data_t>& wlsProblem,
......@@ -31,6 +31,17 @@ namespace elsa
class TikhonovProblem : public Problem<data_t>
* @brief Construct a Tikhonov problem of the form
* \f$ \argmin_x \frac{1}{2} \| Ax - b \|_2^2 + \lambda \| x \|_2^2 \f$
* @param[in] A a linear operator
* @param[in] b a data vector
* @param[in] lambda regularization weight
TikhonovProblem(const LinearOperator<data_t>& A, const DataContainer<data_t> b,
real_t lambda = 0.5f);
* @brief Constructor for a Tikhonov problem
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment