Skip to content

Commit ba20d45

Browse files
committed
artificial_nz is 64-bit
1 parent 4c06807 commit ba20d45

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

highs/ipm/hipo/factorhighs/Analyse.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -437,20 +437,21 @@ void Analyse::relaxSupernodes() {
437437
Int child = first_child[sn];
438438

439439
// info for first criterion
440-
Int nz_fakenz = kHighsIInf;
440+
int64_t nz_fakenz = kHighsIInf;
441441
Int size_fakenz = 0;
442442
Int child_fakenz = -1;
443443

444444
while (child != -1) {
445445
// how many zero rows would become nonzero
446-
const Int rows_filled =
446+
const int64_t rows_filled =
447447
sn_size[sn] + clique_size[sn] - clique_size[child];
448448

449449
// how many zero entries would become nonzero
450-
const Int nz_added = rows_filled * sn_size[child];
450+
const int64_t nz_added = rows_filled * sn_size[child];
451451

452452
// how many artificial nonzeros would the merged supernode have
453-
const Int total_art_nz = nz_added + fake_nz_[sn] + fake_nz_[child];
453+
const int64_t total_art_nz =
454+
nz_added + fake_nz_[sn] + fake_nz_[child];
454455

455456
// Save child with smallest number of artificial zeros created.
456457
// Ties are broken based on size of child.
@@ -576,18 +577,18 @@ void Analyse::relaxSupernodesSize() {
576577
// info for first criterion
577578
Int size_smallest = kHighsIInf;
578579
Int child_smallest = -1;
579-
Int nz_smallest = 0;
580+
int64_t nz_smallest = 0;
580581

581582
while (child != -1) {
582583
// how many zero rows would become nonzero
583-
const Int rows_filled =
584+
const int64_t rows_filled =
584585
sn_size[sn] + clique_size[sn] - clique_size[child];
585586

586587
// how many zero entries would become nonzero
587-
const Int nz_added = rows_filled * sn_size[child];
588+
const int64_t nz_added = rows_filled * sn_size[child];
588589

589590
// how many artificial nonzeros would the merged supernode have
590-
const Int total_art_nz = nz_added + fake_nz_[sn] + fake_nz_[child];
591+
const int64_t total_art_nz = nz_added + fake_nz_[sn] + fake_nz_[child];
591592

592593
if (sn_size[child] < size_smallest) {
593594
size_smallest = sn_size[child];
@@ -698,7 +699,7 @@ void Analyse::afterRelaxSn() {
698699
}
699700

700701
// keep track of total number of artificial nonzeros
701-
artificial_nz_ += (int64_t)fake_nz_[sn];
702+
artificial_nz_ += fake_nz_[sn];
702703

703704
// Compute number of indices for new sn.
704705
// This is equal to the number of columns in the new sn plus the clique

highs/ipm/hipo/factorhighs/Analyse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Analyse {
5959
std::vector<Int> sn_parent_{};
6060

6161
// temporary storage for relaxing supernodes
62-
std::vector<Int> fake_nz_{};
62+
std::vector<int64_t> fake_nz_{};
6363
std::vector<Int> merged_into_{};
6464
Int merged_sn_{};
6565

0 commit comments

Comments
 (0)