Menu ▾ ▴

#196 Replace propagation interfaces by functors

0.5 goal
open
nobody
None
nobody
2024-08-06
2020-09-14
Ulf Lorenz
No

What and Why

Several of the interfaces in the propagator package are too complex for simple use-cases. Looking at PropagationObserver, EigenstateObserver and PropagationFilter, each of them exposes only one function. However, we cannot simply replace the interfaces due to lifetime issues; they need to keep their state over several calls.

As a consequence, each of these interface should get an alternative std::function implementation. This could then be used for simple use-cases.

Acceptance criteria
  • There is an alternative for registering a PropagationObserver that takes a functor
  • There is an alternative for registering an EigenstateObserver that takes a functor
  • There is an alternative for registering a PropagationFilter that takes a functor
  • The simple classes have been changed to functors. For example, NormalizationFilter could be a simple function.
  • There is a highlighted demo for each of the use-cases.

Related

Tickets: #255

Discussion

  • Ulf Lorenz

    Ulf Lorenz - 2024-08-06
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -9,4 +9,5 @@
    
     * There is an alternative for registering a PropagationObserver that takes a functor
     * There is an alternative for registering an EigenstateObserver that takes a functor
     * There is an alternative for registering a PropagationFilter that takes a functor
    +* The simple classes have been changed to functors. For example, NormalizationFilter could be a simple function.
     * There is a highlighted demo for each of the use-cases.
    
     

Log in to post a comment.