Skip to content

Commit 87beb2d

Browse files
committed
Add getter for Psi into g_proximal interface
1 parent 9cb5eb2 commit 87beb2d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

cpp/sopt/g_proximal.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ template <class SCALAR> class GProximal {
2525
virtual t_Proximal proximal_function() const = 0;
2626
// Returns the norm of x
2727
virtual Real proximal_norm(t_Vector const &x) const = 0;
28-
28+
// Transforms input image to a different basis.
29+
// Return linear_transform_identity() if transform not necessary.
30+
virtual const t_LinearTransform &Psi() const = 0;
2931
}; // class GProximal
3032
#endif

cpp/sopt/l1_g_proximal.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ class L1GProximal : public GProximal<SCALAR> {
5959
};
6060
}
6161

62+
//! \brief Analysis operator Ψ
63+
//! \details Under-the-hood, the object is actually owned by the l1 proximal.
64+
t_LinearTransform const &Psi() const override {
65+
return l1_proximal().Psi();
66+
}
67+
68+
6269
// All the public properties below are specific to the l1 proximal
6370
// and therefore not part of the interface
6471

@@ -93,9 +100,6 @@ class L1GProximal : public GProximal<SCALAR> {
93100
SOPT_MACRO(weights, t_Vector);
94101
#undef SOPT_MACRO
95102

96-
//! \brief Analysis operator Ψ
97-
//! \details Under-the-hood, the object is actually owned by the l1 proximal.
98-
t_LinearTransform const &Psi() const { return l1_proximal().Psi(); }
99103
//! Analysis operator Ψ
100104
template <class... ARGS>
101105
typename std::enable_if<sizeof...(ARGS) >= 1, L1GProximal<SCALAR> &>::type Psi(

0 commit comments

Comments
 (0)