Skip to content

Commit f479c2f

Browse files
committed
Fixes from review
1 parent 5583903 commit f479c2f

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

src/main/java/com/github/javabdd/BDDFactory.java

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,21 @@ public void enableMeasurements() {
12681268
enabled = true;
12691269
}
12701270

1271+
public void disableMeasurements() {
1272+
enabled = false;
1273+
}
1274+
1275+
public void resetMeasurements() {
1276+
uniqueAccess = 0;
1277+
uniqueChain = 0;
1278+
uniqueHit = 0;
1279+
uniqueMiss = 0;
1280+
opAccess = 0;
1281+
opHit = 0;
1282+
opMiss = 0;
1283+
swapCount = 0;
1284+
}
1285+
12711286
/* (non-Javadoc)
12721287
* @see java.lang.Object#toString()
12731288
*/
@@ -1359,11 +1374,15 @@ public void disableMeasurements() {
13591374
enabled = false;
13601375
}
13611376

1377+
public void resetMeasurements() {
1378+
maxUsedBddNodes = 0;
1379+
}
1380+
13621381
public void newMeasurement(int newUsedBddNodes) {
13631382
maxUsedBddNodes = Math.max(newUsedBddNodes, maxUsedBddNodes);
13641383
}
13651384

1366-
public int getMaxUsedNodes() {
1385+
public int getMaxUsedBddNodes() {
13671386
return maxUsedBddNodes;
13681387
}
13691388
}
@@ -1376,7 +1395,7 @@ public int getMaxUsedNodes() {
13761395
/**
13771396
* <p>Return the current maximum used BDD nodes statistics for this BDD factory.</p>
13781397
*
1379-
* @return maximum used BDD statistics
1398+
* @return maximum used BDD nodes statistics
13801399
*/
13811400
public MaxUsedBddNodesStats getMaxUsedBddNodesStats() {
13821401
return maxusedbddnodesstats;
@@ -1403,6 +1422,11 @@ public void disableMeasurements() {
14031422
enabled = false;
14041423
}
14051424

1425+
public void resetMeasurements() {
1426+
contUsedBddNodes = new ArrayList<Integer>();
1427+
contOperations = new ArrayList<Long>();
1428+
}
1429+
14061430
public List<Integer> getNodesStats() {
14071431
if (contUsedBddNodes.size() != contOperations.size()) {
14081432
throw new AssertionError("Incorrect data collection.");
@@ -1428,7 +1452,7 @@ public List<Long> getOperationsStats() {
14281452
*
14291453
* @return continuous statistics
14301454
*/
1431-
public ContinuousStats getContinousStats() {
1455+
public ContinuousStats getContinuousStats() {
14321456
return continuousstats;
14331457
}
14341458

src/main/java/com/github/javabdd/JFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3513,7 +3513,7 @@ int bdd_used_nodes_count() {
35133513
}
35143514

35153515
int bdd_delref(int root) {
3516-
bdd_add_per_stats();
3516+
bdd_add_perf_stats();
35173517

35183518
if (root == INVALID_BDD)
35193519
bdd_error(BDD_BREAK); /* distinctive */
@@ -5042,13 +5042,13 @@ int bdd_reorder_gain() {
50425042
}
50435043

50445044
public void done() {
5045-
bdd_add_per_stats();
5045+
bdd_add_perf_stats();
50465046

50475047
super.done();
50485048
bdd_done();
50495049
}
50505050

5051-
void bdd_add_per_stats() {
5051+
void bdd_add_perf_stats() {
50525052
// The number of currently used BDD nodes, between 0 and bddnodesize.
50535053
// -1 indicates that it has not yet been calculated.
50545054
int usedBddNodes = -1;

0 commit comments

Comments
 (0)