autoppl icon indicating copy to clipboard operation
autoppl copied to clipboard

add discrete wrapper

Open jenchen13 opened this issue 5 years ago • 4 comments

jenchen13 avatar Apr 26 '20 06:04 jenchen13

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 for weights_.[5].get_values() to always work, because the value type is always a Variable (or a Constant, e.g.).

jacobaustin123 avatar Apr 26 '20 14:04 jacobaustin123

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.

JamesYang007 avatar Apr 26 '20 19:04 JamesYang007

@all-contributors please add @jenchen1398 for code and design

JamesYang007 avatar Jul 20 '20 16:07 JamesYang007

@JamesYang007

I've put up a pull request to add @jenchen1398! :tada:

allcontributors[bot] avatar Jul 20 '20 16:07 allcontributors[bot]