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

Add type identifiers to scip.pxi #730

Open
Joao-Dionisio opened this issue Oct 11, 2023 · 0 comments
Open

Add type identifiers to scip.pxi #730

Joao-Dionisio opened this issue Oct 11, 2023 · 0 comments

Comments

@Joao-Dionisio
Copy link
Collaborator

Joao-Dionisio commented Oct 11, 2023

Using branchVar(v) will crash the code if v is not a scip variable.

A simple fix for this is to change the definition in scip.pxi from

def branchVar(self, variable):

to

def branchVar(self, Variable variable):

Plenty of other examples exist in the code. Besides making the code safer, it will also make it (slightly) faster.

EDIT: Adding types to loop variables is also desirable, given that it allows Cython to convert Python loops into C loops. See Issue #750 for more information. EDIT: This is now done, in PR #758.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants