Closed wangl-cc closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 62.02%. Comparing base (
f1731f3
) to head (83135a3
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
OptionalInput
toOptional
;deps
toconditions
inOptional
;input
tovalue
inOptional
and can be any boxedMAAValue
;sort_by
function is only suitable for sorting elements with a total order, whereas the dependencies exhibit a partial order. In the current implementation, we define a total order that combines dependencies and key names, which is not transitive, even in the absence of circular dependencies. For instance, if A depends on B, B depends on C, and C depends on D, then it should be A < B < C < D. However, C and A are bothOptional
and do not directly depend on each other. Consequently, they will be compared by their keys, and the order may be C > A, which contradicts the dependencies. We should not use keys to compare elements, but rather the dependencies. Although the dependencies are a partial order, we can sort them using a topological sort (depth-first search).object!
that can be used to create optional.