Skip to content

Commit a60ab43

Browse files
committed
Dom's comments
1 parent d1cce17 commit a60ab43

2 files changed

Lines changed: 43 additions & 43 deletions

File tree

src/pyscipopt/scip.pxd

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,9 @@ cdef extern from "scip/scip.h":
546546
ctypedef union SCIP_DOMCHG:
547547
pass
548548

549-
ctypedef void (*messagecallback) (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg) noexcept
550-
ctypedef void (*errormessagecallback) (void *data, FILE *file, const char *msg)
551-
ctypedef SCIP_RETCODE (*messagehdlrfree) (SCIP_MESSAGEHDLR *messagehdlr)
549+
ctypedef void (*messagecallback) (SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg) noexcept
550+
ctypedef void (*errormessagecallback) (void* data, FILE* file, const char* msg)
551+
ctypedef SCIP_RETCODE (*messagehdlrfree) (SCIP_MESSAGEHDLR* messagehdlr)
552552

553553
# General SCIP Methods
554554
SCIP_RETCODE SCIPcreate(SCIP** scip)
@@ -574,15 +574,15 @@ cdef extern from "scip/scip.h":
574574
SCIP_Bool* valid)
575575
SCIP_RETCODE SCIPcopyOrigVars(SCIP* sourcescip, SCIP* targetscip, SCIP_HASHMAP* varmap, SCIP_HASHMAP* consmap, SCIP_VAR** fixedvars, SCIP_Real* fixedvals, int nfixedvars )
576576
SCIP_RETCODE SCIPcopyOrigConss(SCIP* sourcescip, SCIP* targetscip, SCIP_HASHMAP* varmap, SCIP_HASHMAP* consmap, SCIP_Bool enablepricing, SCIP_Bool* valid)
577-
SCIP_RETCODE SCIPmessagehdlrCreate(SCIP_MESSAGEHDLR **messagehdlr,
577+
SCIP_RETCODE SCIPmessagehdlrCreate(SCIP_MESSAGEHDLR** messagehdlr,
578578
SCIP_Bool bufferedoutput,
579-
const char *filename,
579+
const char* filename,
580580
SCIP_Bool quiet,
581581
messagecallback,
582582
messagecallback,
583583
messagecallback,
584584
messagehdlrfree,
585-
SCIP_MESSAGEHDLRDATA *messagehdlrdata)
585+
SCIP_MESSAGEHDLRDATA* messagehdlrdata)
586586

587587
SCIP_RETCODE SCIPsetMessagehdlr(SCIP* scip, SCIP_MESSAGEHDLR* messagehdlr)
588588
void SCIPsetMessagehdlrQuiet(SCIP* scip, SCIP_Bool quiet)
@@ -819,11 +819,11 @@ cdef extern from "scip/scip.h":
819819
void SCIPvarSetData(SCIP_VAR* var, SCIP_VARDATA* vardata)
820820
SCIP_VARDATA* SCIPvarGetData(SCIP_VAR* var)
821821
SCIP_Real SCIPvarGetAvgSol(SCIP_VAR* var)
822-
SCIP_Real SCIPgetVarPseudocost(SCIP* scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
822+
SCIP_Real SCIPgetVarPseudocost(SCIP* scip, SCIP_VAR* var, SCIP_BRANCHDIR dir)
823823
SCIP_Real SCIPvarGetCutoffSum(SCIP_VAR* var, SCIP_BRANCHDIR dir)
824824
SCIP_Longint SCIPvarGetNBranchings(SCIP_VAR* var, SCIP_BRANCHDIR dir)
825825
SCIP_Bool SCIPvarMayRoundUp(SCIP_VAR* var)
826-
SCIP_Bool SCIPvarMayRoundDown(SCIP_VAR * var)
826+
SCIP_Bool SCIPvarMayRoundDown(SCIP_VAR* var)
827827

828828
# LP Methods
829829
SCIP_RETCODE SCIPgetLPColsData(SCIP* scip, SCIP_COL*** cols, int* ncols)
@@ -837,8 +837,8 @@ cdef extern from "scip/scip.h":
837837
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP* scip)
838838
int SCIPgetNLPRows(SCIP* scip)
839839
int SCIPgetNLPCols(SCIP* scip)
840-
SCIP_COL** SCIPgetLPCols(SCIP *scip)
841-
SCIP_ROW** SCIPgetLPRows(SCIP *scip)
840+
SCIP_COL** SCIPgetLPCols(SCIP* scip)
841+
SCIP_ROW** SCIPgetLPRows(SCIP* scip)
842842
SCIP_Bool SCIPallColsInLP(SCIP* scip)
843843

844844
# Cutting Plane Methods
@@ -878,11 +878,11 @@ cdef extern from "scip/scip.h":
878878
const char* SCIPconshdlrGetName(SCIP_CONSHDLR* conshdlr)
879879
SCIP_RETCODE SCIPdelConsLocal(SCIP* scip, SCIP_CONS* cons)
880880
SCIP_RETCODE SCIPdelCons(SCIP* scip, SCIP_CONS* cons)
881-
SCIP_RETCODE SCIPsetConsChecked(SCIP *scip, SCIP_CONS *cons, SCIP_Bool check)
882-
SCIP_RETCODE SCIPsetConsRemovable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool removable)
883-
SCIP_RETCODE SCIPsetConsInitial(SCIP *scip, SCIP_CONS *cons, SCIP_Bool initial)
884-
SCIP_RETCODE SCIPsetConsModifiable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool modifiable)
885-
SCIP_RETCODE SCIPsetConsEnforced(SCIP *scip, SCIP_CONS *cons, SCIP_Bool enforce)
881+
SCIP_RETCODE SCIPsetConsChecked(SCIP* scip, SCIP_CONS* cons, SCIP_Bool check)
882+
SCIP_RETCODE SCIPsetConsRemovable(SCIP* scip, SCIP_CONS* cons, SCIP_Bool removable)
883+
SCIP_RETCODE SCIPsetConsInitial(SCIP* scip, SCIP_CONS* cons, SCIP_Bool initial)
884+
SCIP_RETCODE SCIPsetConsModifiable(SCIP* scip, SCIP_CONS* cons, SCIP_Bool modifiable)
885+
SCIP_RETCODE SCIPsetConsEnforced(SCIP* scip, SCIP_CONS* cons, SCIP_Bool enforce)
886886

887887
# Primal Solution Methods
888888
SCIP_SOL** SCIPgetSols(SCIP* scip)
@@ -912,8 +912,8 @@ cdef extern from "scip/scip.h":
912912
SCIP_Real SCIPgetGap(SCIP* scip)
913913
int SCIPgetDepth(SCIP* scip)
914914
SCIP_RETCODE SCIPcutoffNode(SCIP* scip, SCIP_NODE* node)
915-
SCIP_Bool SCIPhasPrimalRay(SCIP * scip)
916-
SCIP_Real SCIPgetPrimalRayVal(SCIP * scip, SCIP_VAR * var)
915+
SCIP_Bool SCIPhasPrimalRay(SCIP* scip)
916+
SCIP_Real SCIPgetPrimalRayVal(SCIP* scip, SCIP_VAR* var)
917917
SCIP_RETCODE SCIPaddSolFree(SCIP* scip, SCIP_SOL** sol, SCIP_Bool* stored)
918918
SCIP_RETCODE SCIPaddSol(SCIP* scip, SCIP_SOL* sol, SCIP_Bool* stored)
919919
SCIP_RETCODE SCIPreadSol(SCIP* scip, const char* filename)
@@ -1057,7 +1057,7 @@ cdef extern from "scip/scip.h":
10571057
SCIP_RETCODE (*consgetnvars) (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success),
10581058
SCIP_RETCODE (*consgetdivebdchgs) (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_DIVESET* diveset, SCIP_SOL* sol, SCIP_Bool* success, SCIP_Bool* infeasible),
10591059
SCIP_RETCODE (*consgetpermsymgraph)(SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SYM_GRAPH* graph, SCIP_Bool* success),
1060-
SCIP_RETCODE (*consgetsignedpermsymgraph)(SCIP * scip, SCIP_CONSHDLR * conshdlr, SCIP_CONS * cons, SYM_GRAPH * graph, SCIP_Bool * success),
1060+
SCIP_RETCODE (*consgetsignedpermsymgraph)(SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SYM_GRAPH* graph, SCIP_Bool* success),
10611061
SCIP_CONSHDLRDATA* conshdlrdata)
10621062
SCIP_CONSHDLRDATA* SCIPconshdlrGetData(SCIP_CONSHDLR* conshdlr)
10631063
SCIP_CONSHDLR* SCIPfindConshdlr(SCIP* scip, const char* name)
@@ -1345,17 +1345,17 @@ cdef extern from "scip/scip.h":
13451345
SCIP_Bool SCIPisLT(SCIP* scip, SCIP_Real val1, SCIP_Real val2)
13461346
SCIP_Bool SCIPisGE(SCIP* scip, SCIP_Real val1, SCIP_Real val2)
13471347
SCIP_Bool SCIPisGT(SCIP* scip, SCIP_Real val1, SCIP_Real val2)
1348-
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
1349-
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
1350-
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
1351-
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
1352-
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
1353-
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
1354-
SCIP_Bool SCIPisHugeValue(SCIP *scip, SCIP_Real val)
1355-
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
1356-
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
1357-
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
1358-
SCIP_Real SCIPgetTreesizeEstimation(SCIP *scip)
1348+
SCIP_Bool SCIPisEQ(SCIP* scip, SCIP_Real val1, SCIP_Real val2)
1349+
SCIP_Bool SCIPisFeasEQ(SCIP* scip, SCIP_Real val1, SCIP_Real val2)
1350+
SCIP_Bool SCIPisFeasLT(SCIP* scip, SCIP_Real val1, SCIP_Real val2)
1351+
SCIP_Bool SCIPisFeasGT(SCIP* scip, SCIP_Real val1, SCIP_Real val2)
1352+
SCIP_Bool SCIPisFeasLE(SCIP* scip, SCIP_Real val1, SCIP_Real val2)
1353+
SCIP_Bool SCIPisFeasGE(SCIP* scip, SCIP_Real val1, SCIP_Real val2)
1354+
SCIP_Bool SCIPisHugeValue(SCIP* scip, SCIP_Real val)
1355+
SCIP_Bool SCIPisPositive(SCIP* scip, SCIP_Real val)
1356+
SCIP_Bool SCIPisNegative(SCIP* scip, SCIP_Real val)
1357+
SCIP_Bool SCIPisIntegral(SCIP* scip, SCIP_Real val)
1358+
SCIP_Real SCIPgetTreesizeEstimation(SCIP* scip)
13591359

13601360
# Statistic Methods
13611361
SCIP_RETCODE SCIPprintStatistics(SCIP* scip, FILE* outfile)
@@ -1621,22 +1621,22 @@ cdef extern from "scip/cons_sos2.h":
16211621
SCIP_VAR* var)
16221622

16231623
cdef extern from "scip/cons_disjunction.h":
1624-
SCIP_RETCODE SCIPcreateConsDisjunction(SCIP *scip,
1625-
SCIP_CONS **cons,
1626-
const char *name,
1624+
SCIP_RETCODE SCIPcreateConsDisjunction(SCIP* scip,
1625+
SCIP_CONS** cons,
1626+
const char* name,
16271627
int nconss,
1628-
SCIP_CONS **conss,
1629-
SCIP_CONS *relaxcons,
1628+
SCIP_CONS** conss,
1629+
SCIP_CONS* relaxcons,
16301630
SCIP_Bool initial,
16311631
SCIP_Bool enforce,
16321632
SCIP_Bool check,
16331633
SCIP_Bool local,
16341634
SCIP_Bool modifiable,
16351635
SCIP_Bool dynamic)
16361636

1637-
SCIP_RETCODE SCIPaddConsElemDisjunction(SCIP *scip,
1638-
SCIP_CONS *cons,
1639-
SCIP_CONS *addcons)
1637+
SCIP_RETCODE SCIPaddConsElemDisjunction(SCIP* scip,
1638+
SCIP_CONS* cons,
1639+
SCIP_CONS* addcons)
16401640

16411641
cdef extern from "scip/cons_and.h":
16421642
SCIP_RETCODE SCIPcreateConsAnd(SCIP* scip,
@@ -1973,7 +1973,7 @@ cdef extern from "scip/pub_lp.h":
19731973
SCIP_Real* SCIPcolGetVals(SCIP_COL* col)
19741974
int SCIPcolGetAge(SCIP_COL* col)
19751975
int SCIPcolGetIndex(SCIP_COL* col)
1976-
SCIP_Real SCIPcolGetObj(SCIP_COL *col)
1976+
SCIP_Real SCIPcolGetObj(SCIP_COL* col)
19771977

19781978
cdef extern from "scip/scip_tree.h":
19791979
SCIP_RETCODE SCIPgetOpenNodesData(SCIP* scip, SCIP_NODE*** leaves, SCIP_NODE*** children, SCIP_NODE*** siblings, int* nleaves, int* nchildren, int* nsiblings)

src/pyscipopt/scip.pxi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3073,7 +3073,7 @@ cdef class Model:
30733073

30743074
def isFeasEQ(self, val1, val2):
30753075
"""
3076-
Returns if relative difference of values is below feasibility tolerance.
3076+
Returns if |val1 - val2| <= feastol.
30773077
30783078
Parameters
30793079
----------
@@ -3089,7 +3089,7 @@ cdef class Model:
30893089

30903090
def isFeasLT(self, val1, val2):
30913091
"""
3092-
Returns if relative difference between val1 and val2 is less than feasibility tolerance.
3092+
Returns if relative difference between val1 - val2 <= -feastol.
30933093
30943094
Parameters
30953095
----------
@@ -3105,7 +3105,7 @@ cdef class Model:
31053105

31063106
def isFeasLE(self, val1, val2):
31073107
"""
3108-
Returns if relative difference between val1 and val2 is less than or equal to feasibility tolerance.
3108+
Returns if val1 - val2 <= feastol.
31093109
31103110
Parameters
31113111
----------
@@ -3121,7 +3121,7 @@ cdef class Model:
31213121

31223122
def isFeasGT(self, val1, val2):
31233123
"""
3124-
Returns if relative difference between val1 and val2 is greater than feasibility tolerance.
3124+
Returns if val1 - val2 > feastol.
31253125
31263126
Parameters
31273127
----------
@@ -3137,7 +3137,7 @@ cdef class Model:
31373137

31383138
def isFeasGE(self, val1, val2):
31393139
"""
3140-
Returns if relative difference between val1 and val2 is greater than or equal to feasibility tolerance.
3140+
Returns if val1 - val2 >= -feastol.
31413141
31423142
Parameters
31433143
----------

0 commit comments

Comments
 (0)