Skip to content

Commit 8459ea3

Browse files
authored
theoretical bugFix
starting numSteps should be equal to starting numQueries
1 parent 2d7f7a4 commit 8459ea3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/mstPlanner.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ static constexpr uint64_t MAX_ALLOWED_TMP_EDGES_IN_FILE{64000000};//{130000000};
1010

1111

1212
struct Cost {
13-
// sum of number of steps from all leaves' paths
13+
// sum of number of steps from all leaves' paths for all queries
1414
uint64_t numSteps{1};
1515
// sum of number of queries for all nodes along all paths leading to this node
1616
uint64_t numQueries{1};
@@ -123,8 +123,10 @@ class MSTPlanner {
123123
for (auto &e: uniqueEdges[mstIdx]) {
124124
if (e.first != mstZero[mstIdx]) {
125125
mstCost[mstIdx][e.first].numQueries++;
126+
mstCost[mstIdx][e.first].numSteps++;
126127
} else if (e.second != mstZero[mstIdx]) {
127128
mstCost[mstIdx][e.second].numQueries++;
129+
mstCost[mstIdx][e.first].numSteps++;
128130
}
129131
}
130132
uniqueEdges[mstIdx].clear();

0 commit comments

Comments
 (0)