-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Should append! accept any iterable? #7798
Comments
For |
I don't think this is particularly useful. I think in general, I would prefer |
For any collection that implements
|
This dovetails with @JeffBezanson's suggestion of a Collection abstract class. That way, only collections with the same |
An alternative: provide a |
Is there another function that takes a variable array and add it to a higher dimension one? This can be used in implementing algorithms such as column and constraint generation. |
Not quite sure I understand. Can you elaborate a bit on what you mean? |
@AnnaDana nice to see another OR person using Julia! Do you you mean something like
|
Briefly, after each solve of sub problem, when I want to add a new column which is basicaly new variable, I do the following:
And this works fine! I was just wondering if there is a function so that I define my variable |
@AnnaDana since this is a JuMP specific question, can you open an issue at https://github.com/JuliaOpt/JuMP.jl ? |
Seems like this should be revisited now that general iterables have a length computable attribute? |
It looks like this was added by e909c1c |
We're missing |
Adding methods is non-breaking, so this does not belong on the 1.0 milestone. |
The missing method was implemented by @JeffBezanson in 4844a4b |
append!
is currently limited to instances ofAbstractArray
. I can't really see why this restriction is necessary, as lots of similar functions gladly take any iterable in similar situations.Somewhat related to #7642
The text was updated successfully, but these errors were encountered: