perf: iterate through directed weighted adjacency matrix in storage order#2591
Merged
perf: iterate through directed weighted adjacency matrix in storage order#2591
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2591 +/- ##
========================================
Coverage 84.63% 84.63%
========================================
Files 376 376
Lines 60775 60786 +11
Branches 11884 11887 +3
========================================
+ Hits 51434 51445 +11
Misses 9341 9341
Continue to review full report in Codecov by Sentry.
|
d82b073 to
7ed4ddb
Compare
Member
|
Looks good to me in general and I agree with spelling out that we are not guaranteeing any specific edge ordering. |
007f491 to
e650360
Compare
e650360 to
5a21c53
Compare
Member
Author
|
This is it for now, I won't implement cache blocking for the undirected case yet. For the rest, the performance gains are significant. |
…ed_adjacency() with UNDIRECTED
ntamas
approved these changes
Apr 26, 2024
krlmlr
added a commit
to igraph/rigraph
that referenced
this pull request
Aug 17, 2025
fix: wrap igraph's interruption handler in the Infomap interface to ensure type compatiblity with Infomap's setup fix: Include C++ header chore: Add deps refactor!: igraph_community_leading_eigenvector() takes a history parameter of type igraph_vector_int_t fix: adapt code after merging master into develop Merge branch 'master' into develop Merge branch 'master' into develop chore: update changelog [skip ci] refactor!: igraph_rewire() now takes an igraph_edge_type_sw_t parameter instead of igraph_rewiring_t docs: improve label propagation doc formatting Merge branch 'master' into develop Merge branch 'master' into develop fix: port selection method between Bellman-Ford vs Johnson from Python interface refactor: added weights argument to all shortest path related functions, fixes igraph/igraph#2481 refactor: rename igraph_vector_index_int to igraph_vector_index_in_place, add documentation Merge pull request igraph/igraph#2813 from igraph/feat/directed-leiden fix: do not compile in Infomap's main() and also remove unneeded files and update some missed files to Infoma 2.8.0, including the license fixes igraph/igraph#2814 fix: fix Stimulus function definitions fix: adapt to changed on develop after merging master Merge branch 'master' into develop style: EOL and trailing whitespace fixes chore: updated contributors list feat: igraph_rich_club_sequence() (igraph/igraph#2740) Add coloring verification functions (igraph/igraph#2758) (igraph/igraph#2807) fix: fix header for igraph_invert_permutation() after merging master and update copyright header Merge branch 'master' into develop chore: update changelog [skip ci] feat: igraph_nearest_neighbor_graph() (igraph/igraph#2788) Merge branch 'master' into develop fix: remove duplicate entry of igraph_invert_permutation() from changelog now that it is also on master Merge branch 'master' into develop tests: some cleanup in igraph_maximal_cliques() test tests: check community indexing for Infomap Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop refactor: rename resolution_parameter to resolution in Leiden implementation refactor: shorten names of static functions in Leiden implementation refactor: use "vertex" instead of "node" phrasing in Leiden implementation tests: update tests after removal of POS/NEGINFINITY refactor!: remove IGRAPH_POSINFINITY/NEGINFINITY Merge branch 'master' into develop docs: improve Infomap docs docs: improve Infomap docs fix: improve input validation for Infomap refactor: some validation reordering for clearer errors/warnings and cleanup Merge branch 'master' into develop Merge branch 'master' into develop tests: improve Infomap tests, document that isolated vertices are supported fix: use moduleIndex() in Infomap-to-igraph membership translation as we must ensure that cluster indices < vcount fix: validate graph size before calling Infomap refactor: enable OpenMP for Infomap refactor: leave handling of unweighted graphs up to Infomap chore: update Infomap to 2.8.0 tests: prettify Infomap test refactor: Infomap prettification refactor: add basic validation to Infomap input fix: use appropriate headers in Infomap docs: update Infomap documentation fix: do consider number of trials in Infomap function refactor: rename infomap top-level code to .cpp extension refactor: readability and formatting in Infomap top-level code chore: update Infomap copyright header and remove outdated information Merge branch 'master' into develop Merge branch 'master' into develop chore: include Infomap in acknowledgements [skip ci] fix: adapted new percolation functions to the new API Merge branch 'master' into develop Merge branch 'master' into develop Merge pull request igraph/igraph#2801 from igraph/feat/setup-random fix: remove RNG_BEGIN() macro that creeped back into the codebase Merge branch 'master' into develop feat: igraph_is_simple() can now ignore edge directions Merge branch 'master' into develop refactor: removed experimental marker from several functions, refs igraph/igraph#2576 doc: document that the sortedness of igraph_adjlist_t is not guaranteed refactor!: igraph_adjlist_init_complementer() now takes an igraph_loops_t argument refactor!: deprecated igraph_sparsemat() and igraph_weighted_sparsemat() functions were removed Merge branch 'master' into develop chore: updated changelog fix: fix copyright header in infomap.cc Merge branch 'develop' into update/infomap fix: allow membership == null in igraph_community_infomap() ci: exclude vendor/infomap from coverage calculations refactor: infomap integration CMakeLists.txt cleanup chore: remove unneeded files from vendored infomap source fix: decrease testing precision due to numerical precision / differences. Remove RNG_BEGIN and RNG_END, following igraph/igraph#2583. Merge branch 'develop' into update/infomap test: spaces should not be trimmed refactor: use igraph's RNG instead of the C++ RNG doc: move igraph_community_infomap doc snippet to the right place Merge branch 'develop' into update/infomap Use network from infomap class. Change argument checking style: Change indent Add exception handling for graph to network function Check arguments, handle NULL arguments. Handle directed networks Do not use InfomapWrapper test: Updated tests fix: NULL pointer for interruption fix: pass config Add interruption and exception handling Configure infomap separately, and seed RNG. Extract get membership to separate function Return code length Make infomap silent fix: initialise membership vector Handle NULL node / edge weight vectors Remove exception handling for debugging fix missing sources fix: correct building against infomap Copy infomap source instead of submodule Always use internal build for Infomap. Make Infomap vendored optional dependency cmake: Require CXX 14 because of infomap. infomap: initial rough implementation. cmake: add infomap source files. refactor: Added upstream infomap repository. refactor: remove old implementation of infomap. Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop tests: better tests for community optimal modularity feat: resolution parameter for community_optimal_modularity() Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop refactor!: igraph_barabasi_aging_game() no longer considers an empty outseq vector as missing. refactor!: do not interpret empty outseq vectors are missing in recent_degree_game() and recent_degree_aging_game() Merge pull request igraph/igraph#2688 from igraph/refactor/null-vectors doc: remove accidentally re-added 'scale' parameter documentation from eigenvector centralization Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop chore: fix typos in changelog [skip ci] fix: feedback_vertex_set interface after merging master Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge pull request igraph/igraph#2667 from igraph/refactor/strvector-print refactor!: igraph_vector_reverse() no longer returns an error code Merge branch 'master' into develop refactor!: igraph_vector_swap_elements() no longer returns an error code fix: adapt strvector_swap_elements() after mering master Merge branch 'master' into develop Merge branch 'master' into develop feat: igraph_int_t, refs igraph/igraph#2664 refactor: minor header cleanup refactor: remove unneeded header Merge branch 'master' into develop Merge branch 'master' into develop refactor!: remove vector_binsearch2() Merge branch 'master' into develop refactor!: remove igraph_vector_qsort_ind(), refs igraph/igraph#2616 Merge branch 'master' into develop refactor: remove unnecessary struct names chore: move note about rng_set_default() to beginning of changelog [skip ci] Merge branch 'master' into develop refactor: typed list swap functions no longer return an error code Merge branch 'master' into develop fix: eliminate compiler warning about unused parameter fix: restore GML reader warning about composite attributes, fixes igraph/igraph#2659 chore: comment typos [skip ci] Merge branch 'master' into develop Merge branch 'master' into develop Merge pull request igraph/igraph#2652 from igraph/refactor/all-simple-paths refactor!: remove igraph_array3_t Merge branch 'master' into develop Merge pull request igraph/igraph#2656 from igraph/refactor/internal-vector-functions Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop chore: fix typo in parameter name fix: add missing error check fix: null-dereference in community_optimal_modularity() when passing the null or singleton graph, requesting modularity, but not requesting membership fix: null-dereference in igraph_community_voronoi() when membership == NULL and modularity != NULL fix: igraph_modularity() no longer allows NULL for 'modularity' as this is pointless and wasn't working correctly anyway refactor: readability and variable localization in max flow implementation Merge branch 'master' into develop fuzzer: expand fuzzers fuzzer: expand misc_algos fuzzer Merge branch 'master' into develop fix: work around potential infinite loop in igraph_community_multilevel() by repeated re-randomization of the vertex processing order fixes igraph/igraph#2650 Merge branch 'master' into develop fuzzer: fix another memory leak in misc_algos_weighted fuzzer: improve misc_algos_weighted fuzzer: fix memory leak in misc_algos_weighted fuzzer Merge branch 'master' into develop Merge branch 'master' into develop bench: fix severe memory leak due to repetition in igraph_adjacency() benchmark fuzzer: remove unused data structures from misc_algos_weighted bench: adapt community benchmark for changes on develop bench: more cleanup in benchmarks Merge branch 'master' into develop Merge branch 'master' into develop fuzzing: fix weighted_centrality fuzzer fuzzing: add more fuzzers Merge branch 'master' into develop chore: mean_degree(), count_loops() and hypercube() are no longer experimental refactor!: remove igraph_random_edge_walk() refactor!: remove igraph_zeroin() refactor!: remove igraph_sparsemat_(copy|eye|diag)() refactor!: remove igraph_vector_move_interval2() fix: remove commented assert from vector_ptr_size() feat: igraph_vector_ptr_resize_min() refactor: remove no-longer-needed performance workaround for vector_append from GraphML reader chore: update changelog doc: include missing vector_ptr functions in docs refactor: doubling allocation strategy for vector_ptr_append() feat: igraph_vector_ptr_capacity() refactor: doubling allocation strategy for strvector_append() refactor: doubling allocation strategy for vector_append() refactor: igraph_get_stochastic_sparse() no longer rejects graphs with zero out/in degrees. Closes igraph/igraph#2502 Merge branch 'master' into develop refactor: rename igraph_topology.h to igraph_isomorphism.h refactor!: remove deprecated igraph_transitive_closure_dag() refactor: remove deprecated isomorphism functions refactor!: remove igraph_(read|write)_graph_dimacs() refactor!: remove igraph_subgraph_edges() refactor!: remove the deprecated igraph_laplacian() and igraph_are_connected() Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop refactor!: remove deprecated igraph_get_sparsemat() and igraph_get_stochastic_sparsemat() fix: handle error code in Kruskal implementation Merge branch 'master' into develop chore: update changelog, mention C++14 requirement [skip ci] Merge branch 'master' into develop refactor: remove redundant spanning tree functions as discussed with @ntamas igraph_minimum_spanning_tree() gives access to all available functionality refactor: cleanup in spanning tree functions chore: update changelog to mention spanning tree API refactoring tests: minimum spanning tree benchmark and tests refactor!: refactor spanning tree API to return edge IDs, step two feat: complete spanning tree with Kruskal’s algorithm refactor!: refactor spanning tree to use edge IDs, step one feat: minimum spanning tree with Kurskal's algorithm Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop chore: updated changelog chore: run pre-commit hooks chore: bump VERSION property in shared library Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop chore: error message update doc: fix references to parameter names in igraph_delete_vertices_map() Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop chore: minor cleanup adjlist / inclist docs doc: update HITS and eigenvector centrality docs test: clean up many examples Merge branch 'master' into develop Merge branch 'master' into develop fix: fix functions.yaml Merge branch 'master' into develop Merge branch 'master' into develop Merge pull request igraph/igraph#2627 from igraph/fix/init_adjlist-multiloop-detection Merge branch 'master' into develop Merge pull request igraph/igraph#2625 from igraph/refactor/undirected-hub-authority fuzzing: add graphicality and graph realization fuzzers test: test multi-loop detection/caching with adjlist_init() Merge branch 'master' into develop interfaces: remove unused types chore: update changelog Merge branch 'master' into develop refactor!: remove deprecated igraph_lattice(), igraph_tree(), igraph_erdos_renyi_game(), igraph_bipartite_game() chore: update changelog [skip ci] doc: remove leftover references to deprecated functions in docs Merge branch 'master' into develop refactor!: remove deprecated vector_init_seq() refactor!: remove deprecated vs/vss/es/ess_seq() refactor!: remove deprecated vector/matrix_e/e_ptr/copy() Merge branch 'master' into develop fix: ensure non-negative random perturbation also for undirected eigenvector centrality chore: add note about random initial vector perturbation in eigenvectore-related functions refactor: remove accidentally committed dead code fix: for eigenvector-related centralities, add only positive noise to starting ARPACK vector this eliminates "Error from calculation of a real Schur form" errors when using both vendored ARPACK and LAPACK Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop bench: fix LAD benchmark after merging master into develop Merge pull request igraph/igraph#2621 from igraph/fix/error-text doc: update error code docs Merge branch 'master' into develop Merge pull request igraph/igraph#2620 from igraph/fix/hub-authority-robustness bench: fix benchmarks after merging master into develop Merge branch 'master' into develop refactor: make use of bitsets in community_edge_betweenness() tests: fix example after merging master branch Merge branch 'master' into develop fuzzing: expand algorithm fuzzers Merge branch 'master' into develop Merge branch 'master' into develop fuzz: IGRAPH_LPA_FAST label propagation is now undirected only, refs igraph/igraph#2608 Merge branch 'master' into develop docs: further improvements to community_edges_betweenness() docs docs: improve community_edge_betweenness() docs Merge pull request igraph/igraph#2594 from igraph/refactor/hub-authority chore: typo in changelog [skip ci] Merge pull request igraph/igraph#2592 from igraph/refactor/eigenvector-centrality-mode-support Merge branch 'master' into develop fuzz: compile libxml2 with optimizations Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop fix: fix Stimulus specs after recent merge Merge branch 'master' into develop Merge pull request igraph/igraph#2591 from igraph/perf/adjmat-interation-order bench: improve adj. matrix -> graph conversion benchmark bench: add benchmark for dense adjacency matrix to graph conversion docs: more educational igraph_weighted_adjacency() example docs: add missing docs for weights parameter of igraph_weighted_biadjacency() refactor: do not minimize weights storage in igraph_weighted_biadjacency() fix: add some missing IGRAPH_CHECK after label propagation update Add fast label propagation (igraph/igraph#2451) Merge branch 'master' into develop tests: test biadjacency matrix with zero row or coumn count tests: igraph_weighted_biadjacency tests: finish "incidence" -> "biadjacency" renaming tests: expand igraph_biadjacency tests tests: use "bipartite adjacency matrix" instead of "incidence matrix" refactor!: igraph_biadjacency() now truancates non-integer matrix entires instead of rounding them up refactor!: remove deprecated igraph_incidence() and igraph_get_incidence() refactor: remove unused 'types' parameter of igraph_i_bipartite_game_gnm_multi() refactor!: igraph_biadjacency() now only requires positive entries when creating multi-edges feat: igraph_weighted_biadjacency(), refs igraph/igraph#2414 refactor: cleanup in igraph_biadjacency() refactor!: igraph_get_biadjacency() now takes a weights parameter, refs igraph/igraph#2414 chore: updated pre-commit hooks chore: update changelog test: test NaN passthrough in weighted_adjacency() fix: pass through NaN values when building graph from weighted adjacency matrix refactor: minort cleanup in some games fix: remove RNG_BEGIN/END from igraph_rng_get_dirichlet() as it lead to nested RNG_BEGIN/END calls and it's unnecessary since this function takes an RNG object as input chore: punctuation in error message Merge branch 'master' into develop Merge branch 'master' into develop Merge pull request igraph/igraph#2580 from igraph/refactor/remove-deprecated-1 Merge branch 'master' into develop chore: update changelog tests: update variable naming in community_edge_betweenness() tests docs: update community_edge_betweenness docs and example refactor: edge betweenness community detection now takes separate weights and lengths and uses weights as defined by Newman: Analysis of weighted networks (2004) refactor!: minimum_size_separators() no longer returns any separators for complete graphs Fixes igraph/igraph#1910 Fixes igraph/igraph#2518 Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop fix: `ARPACK_DEFAULTS` typo in functions.yaml (igraph/igraph#2569) Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop refactor: improve readability, eliminate warnings in cattributes implementation Merge branch 'master' into develop fix: fix memory leak in igraph_read_graph_lgl() when weights are present, fixes igraph/igraph#2557 Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop refactor!: removed IGRAPH_ARPACK_... in favour of IGRAPH_EARPACK refactor!: remove IGRAPH_GLP_... error codes refactor!: progress and status handlers now return error codes intact, refs igraph/igraph#2199 refactor!: remove IGRAPH_CPUTIME error code and the time limit feature of igraph_subisomorphic_lad() refactor!: remove IGRAPH_EGLP and IGRAPH_ELAPACK error codes docs: fix doc build (correct typo in function name) Merge branch 'master' into develop docs: complete removal of deprecated igraph_automorphisms() and fix doc build fix: fix signature of igraph_canonical_permutation() Merge branch 'master' into develop fix: update error strings refactor!: remove deprecated IGRAPH_EDRL refactor!: removed unused IGRAPH_ENONZERO and IGRAPH_EATTRIBUTES error codes feat: added IGRAPH_EINVEID error code refactor!: remove IGRAPH_NONSQUARE error code, refs igraph/igraph#1975 refactor!: remove IGRAPH_EINVEVECTOR error code, refs igraph/igraph#1975 feat: added generic, algorithm-agnostic versions of igraph_count_automorphisms(), igraph_automorphism_group() and igraph_canonical_permutation() refactor!: rename BLISS-specific isomorphism functions so they always have _bliss in the suffix - part 2 refactor!: rename BLISS-specific isomorphism functions so they always have _bliss in the suffix Merge branch 'master' into develop fix: fix segfault in GraphML reader refactor: remove unneeded include refactor: remove deprecated igraph_decompose_destroy() Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge pull request igraph/igraph#2470 from igraph/feat/is-biconnected Merge branch 'master' into develop Merge pull request igraph/igraph#2462 from igraph/feat/attribute-record-list Merge branch 'master' into develop fix: re-added missing master header in changelog Merge branch 'master' into develop Merge branch 'master' into develop refactor: consistently use ARPACK_DEFAULTS as the default arpack options chore: updated changelog feat: include Texinfo docs in source tarball fix: fix typo fix: look for either docbook2x-texi or docbook2texi fix: replace utf8 with utf-8 to prevent a warning when building texinfo docs ci: make sure that the Texinfo docs are also built Add target to build documentation in info format docs: clarify that Infomap considers edge directions fuzzer: update libxml2 to 2.12.3 fix: correct header includion in cliquer chore(deps): bump github/codeql-action from 2 to 3 chore(deps): bump actions/upload-artifact from 3 to 4 doc: clarify the effect of loop edges in igraph_similarity_inverse_log_weighted(), closes igraph/igraph#2448 refactor: rename deprecated functions in generated interfaces docs: fix typos refactor: clean up dfs/bfs and their docs refactor: replace void* with const igraph_vector_ptr_t* in attribute-related functions; more refactoring coming soon refactor!: strvector now contains pointers to const Merge branch 'master' into develop refactor: rename igraph_i_attribute_gettype() to igraph_i_attribute_get_type() for sake of consistency refactor: simplify attribute table init, copy and destroy methods chore: post-release tasks Merge branch 'master' into develop fix: fix stimulus function spec Merge branch 'master' into develop fix: community_spinglass_single() now uses igraph_real_t for output parameters that return real values, fixes igraph/igraph#2435 Merge branch 'master' into develop fix: fix jdm unit test and add rate-limited interruption to erdos_renyi_gnm_multi() fix: fix Stimulus type specs Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop fix: fix Stimulus type specs fix: allow interruption for multigaph case of G(n,m) generator Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop chore: fixed line endings and stale whitespace fix!: NCOL and LGL readers now use a default weight of 1, closes igraph/igraph#2395 fix: EDGEWEIGHTS type parameter was renamed to EDGE_WEIGHTS earlier Merge branch 'master' into develop Merge branch 'master' into develop refactor!: igraph_vector_swap() and igraph_matrix_swap() no longer return an error code Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Multi edge support for igraph_bipartite_game_gnm (igraph/igraph#2375) Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop correct number of erdos_renyi arguments in voronoi test chore: fix mismerged changelog refactor!: remove deprecated allocation macros Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop docs: clarify that usage of sub-headers is not supported closes igraph/igraph#2332 Merge branch 'master' into develop refactor: more readable variable named in similarity code Use two vertex selectors in Jaccard and Dice (igraph/igraph#2346) Merge branch 'master' into develop chore: update changelog, mentioning the the Pajek reader/writer now uses the 'name' attribute docs: update Pajek docs, mentioning that the 'name' attribute is used Merge pull request igraph/igraph#2276 from igraph/fix/pajek-names Merge pull request igraph/igraph#2265 from VRajesh7649/feat/erdos_penyi_gnm_multiedges Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop refactor: fixed singular/plural issues with abstract types in types.yaml, now they are consistent fix: fix typo in functions.yaml refactor: rename igraph_delete_vertices_idx() to igraph_delete_vertices_map(), closes igraph/igraph#2310 Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop chore: update changelog [skip ci] refactor: igraph_rng_set_default() now returns old RNG, fixes igraph/igraph#2273 Merge branch 'master' into develop Merge branch 'master' into develop move community_fastgreedy example to tests move community_edge_betweenness example to tests (igraph/igraph#2270) Revert "move community_edge_betweenness example to tests" move community_edge_betweenness example to tests Merge branch 'master' into develop refactor!: igraph_vector_shuffle() no longer returns an error code, closes igraph/igraph#2268 Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop fix: standards-complient definition for igraph_allow_interruption() refactor: replace IGRAPH_SUCCESS by false in IGRAPH_ALLOW_INTERRUPTION() refactor!: interruption handlers now return igraph_bool_t Merge branch 'master' into develop refactor!: removed void* argument of interruption handlers Merge branch 'master' into develop refactor!: igraph_induced_subgraph_map() does not offset the vertex IDs in the mapping any more refactor!: igraph_delete_vertices_idx() does not offset the vertex IDs in the mapping any more Merge branch 'master' into develop Merge branch 'master' into develop Merge branch 'master' into develop add mode parameter to distances_johnson (igraph/igraph#2218) Merge branch 'master' into develop chore: added 'develop' section to changelog Merge branch 'master' into develop Merge branch 'master' into develop refactor: remove unused 'destroy' field from heap data types; ABI-breaking change; refs igraph/igraph#2214
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.
Before going further with these sorts of changes, I want to make sure that we are in agreement. The idea is to iterate through (bi)adjacency matrices in storage order for the sake of better performance.
We never formally guaranteed a certain edge ordering here, but neither did we spell out that we don't. Thus some people may have been relying on it. The best time to make this change is therefore 1.0.
Another argument for not guaranteeing an edge order is that those matrix -> graph conversions which do access both$A_{ij}$ and $A_{ji}$ at the same time could be sped up in the future by a similar blocking technique to what was used in
igraph_matrix_transpose(). Block sizes should be tunable, and would affect the edge ordering.If there is a serious concern about the non-stable edge ordering produced by these functions, I suggest adding a new function that canonicalizes the edge order in-place. People who need to rely on the edge order can call this function explicitly. Note that some level of consistency is already achievable using the
orderparameter ofigraph_es_all().