Skip to content

Commit

Permalink
Fix adjacency matrix loader graph size estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Jul 30, 2024
1 parent 9fcdf9f commit 5155485
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/shared/loading/graphsizeestimate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ QVariantMap graphSizeEstimateThreshold(EdgeList edgeList,
if(edgeList.empty())
return {};

auto maxEdges = maxNodes * maxNodes;
auto maxEdges = maxNodes == std::numeric_limits<size_t>::max() ?
std::numeric_limits<size_t>::max() :
maxNodes * maxNodes;
auto nodesScale = static_cast<double>(maxNodes) / static_cast<double>(numSampleNodes);
auto edgesScale = nodesScale * nodesScale;

Expand Down

0 comments on commit 5155485

Please sign in to comment.