Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@domischweisgut
Copy link
Contributor

In this PR, we fix Issue #1270

The root cause of the problem is most likely the randomized nature of the test. To reduce nondeterminism, we now rely on fixed graphs from input/, testing one unweighted and one weighted instance. However, randomness cannot be eliminated entirely, since it is inherently used by the underlying solver.

Additionally, this fix reduces the number of tests. Previously, the test was also run on directed graphs. However, to my understanding, the algebraic distance on a graph is only defined for undirected graphs. Therefore, omitting these directed cases does not constitute a loss in test coverage.

I also added a check in the AlgebraicDistance constructor to ensure that the input graph is undirected, since this should not be allowed, and added a corresponding test.

@domischweisgut domischweisgut linked an issue Jan 21, 2026 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Jan 21, 2026

Pull Request Test Coverage Report for Build 21286476336

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 79.448%

Totals Coverage Status
Change from base Build 21203256296: 0.02%
Covered Lines: 29515
Relevant Lines: 37150

💛 - Coveralls

@fabratu fabratu merged commit edb41ff into networkit:master Jan 26, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two Failing Unit Tests on local Master Branch (DistanceGTest)

3 participants