Skip to content

Commit 3e06b50

Browse files
committed
Name of constants
1 parent ec01213 commit 3e06b50

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

highs/ipm/hipo/factorhighs/Analyse.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,11 +1310,11 @@ void Analyse::findTreeSplitting() {
13101310
sn_ops[sn] += (double)(fr - i - 1) * (fr - i - 1);
13111311
}
13121312

1313-
// add assembly operations times spops_weight to the parent
1313+
// add assembly operations times kSpopsWeight to the parent
13141314
if (sn_parent_[sn] != -1) {
13151315
const Int ldc = fr - sz;
1316-
sn_ops[sn_parent_[sn]] += ldc * (ldc + 1) / 2 * spops_weight;
1317-
total_ops += ldc * (ldc + 1) / 2 * spops_weight;
1316+
sn_ops[sn_parent_[sn]] += ldc * (ldc + 1) / 2 * kSpopsWeight;
1317+
total_ops += ldc * (ldc + 1) / 2 * kSpopsWeight;
13181318
}
13191319
}
13201320

@@ -1333,7 +1333,7 @@ void Analyse::findTreeSplitting() {
13331333

13341334
// Divide the tree into single nodes and subtrees, such that each subtree has
13351335
// at most small_thresh operations overall.
1336-
const double small_thresh = small_thresh_coeff * total_ops;
1336+
const double small_thresh = kSmallSubtreesCoeff * total_ops;
13371337
for (Int sn = 0; sn < sn_count_; ++sn) {
13381338
if (subtree_ops[sn] > small_thresh) {
13391339
// sn is a single node

highs/ipm/hipo/factorhighs/FactorHiGHSSettings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ const Int kMaxRefinementIter = 3;
5252
const double kRefinementTolerance = 1e-12;
5353

5454
// tree splitting
55-
const double small_thresh_coeff = 0.01;
56-
const double spops_weight = 30.0;
55+
const double kSmallSubtreesCoeff = 0.01; // 1%
56+
const double kSpopsWeight = 30.0;
5757

5858
struct Regul {
5959
double primal{};

0 commit comments

Comments
 (0)