Skip to content
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

Does the order of the elements of the ind & val array returned by SCIPlpiGetCols() should be same as the input? #18

Closed
vistart opened this issue May 10, 2022 · 2 comments
Assignees

Comments

@vistart
Copy link

vistart commented May 10, 2022

Here are the input:

int begvals[6] = { 0, 2, 3, 5, 8, 9 };

int indvals[10] = { 0, 1, 3, 2, 1, 1, 2, 4, 0, 3 };

The fourth and fifth elements are 2, 1.
SCIP_Real vals[10] = { 1.0, 5.0, -1.0, 3e5, 2.0, 1.0, 20, 10, -1.9, 1e-2 };

Its corresponding value is 3e5, 2.0.

cr_assert_arr_eq(ind, newind, nnonz*sizeof(int));

If I call SCIPlpiGetCols() at this point, should I return it in the order it was received, not in positive order?

@leoneifler
Copy link
Contributor

Are you in the process of writing a new LPI?

To answer the question: yes it expects the same order as when the nonzeros were added

@vistart
Copy link
Author

vistart commented May 10, 2022

I see.

@vistart vistart closed this as completed May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants