Open jenchen1398 opened 4 years ago
We pushed the current impl of discrete with the intention that we weren't really gonna use it with expressions, but just values. Expressions can have different types and using variadic templates with tuple is like the only way to do this. This gets difficult because you must know the index at compile-time.
@all-contributors please add @jenchen1398 for code and design
@JamesYang007
I've put up a pull request to add @jenchen1398! :tada:
The lower-case
discrete
function needs to be the only way of building Discrete objects. So all Discrete tests need to be changed to use this method. I think you will need to apply the transformation to every element in the vector for it to work. James will have some ideas. The goal is forweights_.[5].get_values()
to always work, because the value type is always a Variable (or a Constant, e.g.).