More general IfElse conditionals?
Future research direction in extending IfElse conditionals past affine expressions
e.g. division, polynomials, piecewise affine, general black box functions
There are two approches we could take, to allow for more general functions.
-
Invertible maps. We have added support for a
BiMapoperator that acts as a two-way let expression. The invertibility allows us to process deltas expressed in the mapped coordinates. Several maps can be composed together to create more complicated expressions. For example the radial coordinate transform can be used to create a circular condition. Composing the radial coordinates with a scaling map creates ellipses (and so on). Unfortunately, some expressions are difficult (and in some cases impossible) to invert and therefore cannot be expressed usingBiMaps. An example would be a fifth degree polynomial which are theoretically impossible to invert (in the general case). -
Implicit method. This is much more involved and uses Stokes' theorem, but works without requiring inversion, at the cost of time complexity. We'll likely implement this much later.