Repository navigation
Leiden Algorithm 1.0.1: work without the UI, in filtered views and on any graph - #368
Merged
Merged
Conversation
The settings were only initialized by the user interface, so the statistics threw a NullPointerException when run without it. Use the same defaults. Progress can be null, use the null-safe Progress helper. The network used node store ids as indices, which are out of range in a filtered view, use consecutive indices. An empty graph and edges with a zero or negative weight crashed the clustering library, skip them. Version 1.0.1. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by the SPI contract tests of gephi-plugins-tests (
StatisticsContractTest), run against Gephi 0.11.4.algorithm,qualityFunction, resolution, iterations, ...) were only set byRunClusteringUI, so aRunClusteringrun any other way (scripts, the statistics controller) threwNullPointerExceptiononalgorithm. The fields now start with the values the UI's defaults use.progress.start()/progress()/finish()threw when there is no progress ticket. Now usesProgress.start(progress, ...)and friends, which are null-safe.node.getStoreId()as the node index, but a filtered view has fewer nodes than the highest store id (ArrayIndexOutOfBoundsException). Nodes are now mapped to consecutive indices, also when writing theClustercolumn back.NegativeArraySizeExceptionon a network without nodes. Returns an empty clustering instead.Network.createReducedNetworkthrewArrayIndexOutOfBoundsException. The algorithms need positive weights, so such edges are left out.Verified: the contract tests (gephi-plugins-tests 1.1.1) pass, apart from existing columns of another type, which becomes a warning in the next gephi-plugins-tests release. Short-lived branch off
master-forge, 2 files.