Skip to content

Commit 08f4091

Browse files
authored
Merge pull request #27 from fidelity/fix_isnan
Fix a build error reported by using the Visual Studio build tool on Windows
2 parents 69f7308 + 2a33978 commit 08f4091

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ on:
1010

1111
jobs:
1212
Test:
13-
runs-on: ubuntu-latest
13+
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
python-version: [3.6, 3.7, 3.8, 3.9]
16+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
17+
os: [ubuntu-latest, macos-latest, windows-latest]
1718
steps:
18-
- uses: actions/checkout@v2
19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v2
19+
- uses: actions/checkout@v3
20+
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
21+
uses: actions/setup-python@v4
2122
with:
2223
python-version: ${{ matrix.python-version }}
2324
- name: Check

CHANGELOG.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
CHANGELOG
33
=========
44

5+
-------------------------------------------------------------------------------
6+
July, 13, 2022 1.3.4
7+
-------------------------------------------------------------------------------
8+
9+
Minor:
10+
- Fix a compiling issue in using Visual Studio C++ compiler
11+
512
-------------------------------------------------------------------------------
613
June, 28, 2022 1.3.3
714
-------------------------------------------------------------------------------

sequential/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright FMR LLC <opensource@fidelity.com>
33
# SPDX-License-Identifier: GPL-2.0
44

5-
__version__ = "1.3.3"
5+
__version__ = "1.3.4"

sequential/backend/build_mdd.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ vector<int>* lgap, vector<int>* ugap){ //checks upper and lower gap constraints
101101

102102
for (int att = 0; att < (*lgap).size(); att++){
103103
// Original MPP repo uses zero to indicate non-presence of constraints. When (*lgap)[att] == 0, we skip over the constraint.
104-
// Here we enable the case when lower bound of gap constraint is 0. If lower bound is not a number, we skip over the constraint.
105-
if (isnan((*lgap)[att]))
104+
// Here we enable the case when lower bound of gap constraint is 0. If lower bound is NaN (Not-A-Number) value, we skip over the constraint.
105+
if (isnan(static_cast<double>((*lgap)[att])))
106106
continue;
107107
// Original MPP repo uses abs(att[i] - att[i-1]) as the gap value. Here we remove abs().
108108
if ((*attrs)[(*lgapi)[att]].at(i).at(endp - 1) - (*attrs)[(*lgapi)[att]].at(i).at(strp - 1) < (*lgap)[att])
@@ -111,8 +111,8 @@ vector<int>* lgap, vector<int>* ugap){ //checks upper and lower gap constraints
111111

112112
for (int att = 0; att < (*ugap).size(); att++){
113113
// Original MPP repo uses zero to indicate non-presence of constraints. When (*ugap)[att] == 0, we skip over the constraint.
114-
// Here we enable the case when upper bound of gap constraint is 0. If upper bound is not a number, we skip over the constraint.
115-
if (isnan((*ugap)[att]))
114+
// Here we enable the case when upper bound of gap constraint is 0. If upper bound is NaN (Not-A-Number) value, we skip over the constraint.
115+
if (isnan(static_cast<double>((*ugap)[att])))
116116
continue;
117117
// Original MPP repo uses abs(att[i] - att[i-1]) as the gap value. Here we remove abs().
118118
if ((*attrs)[(*ugapi)[att]].at(i).at(endp - 1) - (*attrs)[(*ugapi)[att]].at(i).at(strp - 1) > (*ugap)[att])

0 commit comments

Comments
 (0)