Skip to content

Commit db23fee

Browse files
committed
Merge remote-tracking branch 'origin/v10-minor'
2 parents 9dc5848 + 5b6c27d commit db23fee

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

src/scip/iisfinder_greedy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ SCIP_RETCODE deletionFilterBatch(
517517
int nconss;
518518
int nvars;
519519
int batchindex;
520-
int batchsize;
520+
int batchsize = initbatchsize;
521521
int iteration;
522522
int i;
523523
int k;

src/scip/matrix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ SCIP_RETCODE setColumnMajorFormat(
548548
int* rowpnt;
549549
int* rowend;
550550
SCIP_Real* valpnt;
551-
SCIP_RATIONAL* valpntrational;
551+
SCIP_RATIONAL* valpntrational = NULL;
552552
int* fillidx;
553553

554554
assert(scip != NULL);

src/scip/multiprecision.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ namespace scip
112112
};
113113
using Integer = Rational;
114114
using sparsevec = std::vector<SCIP_RATIONAL>;
115-
Rational& abs(Rational& r){return r;}
116-
Rational& max(Rational& r1, Rational& r2){return r1;}
117-
Rational& min(Rational& r1, Rational& r2){return r1;}
118-
SCIP_Longint denominator(Rational& r){return 0L;}
119-
SCIP_Longint numerator(Rational& r){return 0L;}
115+
INLINE Rational& abs(Rational& r){return r;}
116+
INLINE Rational& max(Rational& r1, Rational& r2){return r1;}
117+
INLINE Rational& min(Rational& r1, Rational& r2){return r1;}
118+
INLINE SCIP_Longint denominator(Rational& r){return 0L;}
119+
INLINE SCIP_Longint numerator(Rational& r){return 0L;}
120120
}
121121
#endif
122122

src/scip/rational.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ using namespace scip;
6565
#endif
6666

6767
/** print SCIP_RATIONAL to output stream */
68+
static
6869
std::ostream& operator<<(
6970
std::ostream& os, /**< output stream */
7071
SCIP_RATIONAL const & r /**< rational to print */
@@ -1834,10 +1835,8 @@ void SCIPrationalPrint(
18341835
{
18351836
if( rational == NULL )
18361837
std::cout << "unknown" << std::flush;
1837-
else if( rational->isinf )
1838-
std::cout << (rational->val.sign() > 0 ? "+" : "-") << "infinity" << std::flush;
18391838
else
1840-
std::cout << rational->val << std::flush;
1839+
std::cout << *rational << std::flush;
18411840
}
18421841

18431842
/** printf extension for rationals (not supporting all format options) */
@@ -2358,7 +2357,7 @@ void SCIPrationalComputeApproximationLong(
23582357
res->isinf = FALSE;
23592358
res->isfprepresentable = SCIP_ISFPREPRESENTABLE_UNKNOWN;
23602359

2361-
SCIPdebug(std::cout << "approximating " << src->val << " by " << res->val << std::endl);
2360+
SCIPdebug(std::cout << "approximating " << *src << " by " << *res << std::endl);
23622361

23632362
return;
23642363
}
@@ -2382,7 +2381,7 @@ void SCIPrationalComputeApproximationLong(
23822381

23832382
done = 0;
23842383

2385-
SCIPdebug(std::cout << "approximating " << src->val << " by continued fractions with maxdenom " << maxdenom << std::endl);
2384+
SCIPdebug(std::cout << "approximating " << *src << " by continued fractions with maxdenom " << maxdenom << std::endl);
23862385
SCIPdebug(std::cout << "confrac initial values: p0 " << p[1] << " q0 " << q[1] << " p1 " << p[2] << " q1 " << q[2] << std::endl);
23872386

23882387
/* if q is already big, skip loop */
@@ -2563,7 +2562,7 @@ void SCIPrationalComputeApproximation(
25632562
res->isinf = FALSE;
25642563
res->isfprepresentable = SCIP_ISFPREPRESENTABLE_UNKNOWN;
25652564

2566-
SCIPdebug(std::cout << "approximating " << src->val << " by " << res->val << std::endl);
2565+
SCIPdebug(std::cout << "approximating " << *src << " by " << *res << std::endl);
25672566

25682567
return;
25692568
}
@@ -2584,7 +2583,7 @@ void SCIPrationalComputeApproximation(
25842583

25852584
done = 0;
25862585

2587-
SCIPdebug(std::cout << "approximating " << src->val << " by continued fractions with maxdenom " << maxdenom << std::endl);
2586+
SCIPdebug(std::cout << "approximating " << *src << " by continued fractions with maxdenom " << maxdenom << std::endl);
25882587
SCIPdebug(std::cout << "confrac initial values: p0 " << p[1] << " q0 " << q[1] << " p1 " << p[2] << " q1 " << q[2] << std::endl);
25892588

25902589
/* if q is already big, skip loop */

0 commit comments

Comments
 (0)