You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Simplify the Hints interface / implementations #72
As suggested by @ctrueden, it would be ideal to simplify the implementations of Hints (which might affect the API of that interface).
Instead of using a Map<String, String>, where the key is a hint type (e.g. Simplification) and the value is a hint (e.g. Simplification.FORBIDDEN), it would be much simpler to use a Set<String>.
We need to consider the need of:
Removing hints. Neither @ctrueden nor I can think of a time when you'd want to do that. The only time I can think of when we removed a Hint would be when we create a SimplifiedOpInfo/OpAdaptationInfo, because the simplified/adapted Op should specify that it cannot be simplified/adapted again (i.e. we are removing the Simplification.ALLOWED / Adaptation.ALLOWED hint), but this is no longer needed as we will remove the default Hint values.
Preventing two hints of the same hint type. My intuition is that we should prevent multiple hints of the same type, but @ctrueden wondered if there is a situation where we would ever need two mutually-exclusive hint values (right now we have Simplfication.FORBIDDEN and Simplification.IN_PROGRESS, but do we actually need both?)
@ctrueden did I miss anything w.r.t. our discussions?
There are times where you'd want to do this, as we do it during simplification/adaptation (we have, for example, ADAPTATION.IN_PROGRESS and ADAPTATION.FORBIDDEN, and we don't want both. But we made the removal much cleaner through Hints.minus().
@ctrueden and I decided that Hints could have a natural hierarchy that can be maintained by Hints-using implementations (i.e. not by the Hints themselves).
Activity
gselzer commentedon Oct 18, 2021
This seems to have been resolved with scijava/incubator@df3f999, which will make its way into
mainvia scijava/incubator#42.To address the two points:
ADAPTATION.IN_PROGRESSandADAPTATION.FORBIDDEN, and we don't want both. But we made the removal much cleaner throughHints.minus().Hints-using implementations (i.e. not by theHintsthemselves).I'm going to thus close this issue.