Small improvements in primitive routines.#32
Conversation
alucantonio
left a comment
There was a problem hiding this comment.
I have the feeling that we are using dictionaries where we should use classes. For example, "fun_info", "input", "output" could be attributes of an object instead of keys of a dictionary. Also, primal/dual could be part of an enum, so that when you pass the complex to a function like switch_complex, complex is not a string, but an enum with only 2 allowed values.
|
Ok, I can try to define a class PrimitiveAttributes, but maybe we should use the class PrimitiveParams in a smarter way? |
|
I think we need a class called BasePrimitive to replace what is now called PrimitiveParams, and then maybe collect all the attributes that are now part of a dictionary when building primitive variants inside PrimitiveParams. There may be better designs, but right now "PrimitiveParams" is just the description of the base primitive, so the name is not appropriate.. |
|
I think that the best way to handle the code is keeping |
alucantonio
left a comment
There was a problem hiding this comment.
The options for complex, dimension and rank should be part of enums.
No description provided.