-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename variablewise functions #60
Comments
or |
The issue is that these are not identity functions by any usual definition of identity, except when all variables appear in the map. They are coordinate-wise projections by any usual definition. |
Maybe |
A projection is a function, so projection function is a bit redundant. Not all sets end with |
We could say |
Although in the future I can imagine someone wanting to add other kinds of projections. |
What's wrong with I'd almost prefer
or
or just |
Affine and quadratic functions are well-defined and widely used concepts. Variablewise is not. Why not just use the mathematically correct and clear name for the function? It could be useful to formalize the scalar/vector concept (as @blegat attempted to do in #44) since it seems like we've converged to definitions of sets that are exclusively scalar or vector sets. What are the
That's not extensible, so I'd downvote that. |
Another idea: addconstraint!(m, SingleVariable(x[1]), LessThan(10.0))
addconstraint!(m, VectorOfVariables(x[1:5]), AllDifferent(5)) # thinking ahead... It wouldn't be too crazy to have a fallback like: addconstraint!(m, v::VariableReference, s) = addconstraint!(m, SingleVariable(v), s)
addconstraint!(m, v::Vector{VariableReference}, s) = addconstraint!(m, VectorOfVariables(v), s) but that's a mostly separate discussion. |
This is my favorite among all the other suggestions. |
I am ok with either |
* Add options to MOF * Improve code coverage * Improve test coverage
The name "variablewise function" is a holdover from variablewise constraint, which made a bit more sense.
To replace
ScalarVariablewiseFunction
andVectorVariablewiseFunction
, what aboutScalarComponentProjection
andVectorComponentProjection
?Let the bikeshedding begin. @blegat @joehuchette @chriscoey @odow @joaquimg @IssamT
Thanks to @edljk for pointing this out.
The text was updated successfully, but these errors were encountered: