In a fit of procrastination today, I moved the curvature bounds on my greedy optimization crate `avarice` from being a runtime-checked enum to a compiletime-checked trait bound (with custom derive).
It was surprisingly easy. A couple questions remain (e.g. should a Modular objective also be marked with both Submodular and Supermodular traits? probably yes... but I don't use those yet) but seems good so far.
https://github.com/emallson/avarice.rs/commit/5baf300491e36bcfde2b75e462c4a52f45f9d1e7