Recent Releases of igraph
igraph - igraph 1.0.0-rc1
This is the first release candidate of the upcoming 1.0.0 igraph release. Some API changes are still expected in the next few days. The changelog posted here is merged from the changelogs of the master and develop branches, and it represents all the changes compared to the latest stable release (0.10.16). These changes will be repeated in the changelog of 1.0.0 when we are ready.
Breaking changes
This section gives detailed on breaking changes you need to consider when updating code written for igraph 0.10.x.
General changes
- igraph now requires a C++ compiler that supports the C++14 standard.
igraph_setup()is now recommended to be called before using the library. This function may gain essential functions in the future. See below for details.igraph_integer_twas renamed toigraph_int_t, butigraph_integer_tis kept as an alias and it will remain available for at least the next major version. Library headers and source code usesigraph_int_tfrom now on.igraph_rng_set_default()now returns a pointer to the previous RNG. Furthermore, this function now only stores a pointer to theigraph_rng_tstruct passed to it, instead of copying the struct. Thus theigraph_rng_tmust continue to exist for as long as it is used as the default RNG.- Interruption handlers do not take a
void*argument any more; this is relevant to maintainers of higher-level interfaces only. - Interruption handlers now return an
igraph_bool_tinstead of anigraph_error_t; the returned value must be true if the calculation has to be interrupted and false otherwise. igraph_status(),igraph_statusf()and their macro versions (IGRAPH_STATUS()andIGRAPH_STATUSF()) do not convert error codes toIGRAPH_INTERRUPTEDany more. Any error code returned from the status handler function is forwarded intact to the caller. If you want to trigger the interruption of the current calculation from the status handler without reporting an error, reportIGRAPH_INTERRUPTEDexplicitly. It is the responsibility of higher-level interfaces to handle this error code appropriately.- The
RNG_BEGIN()andRNG_END()macros were removed. You are now responsible for seeding the RNG before using any igraph function that may use random numbers by callingigraph_rng_seed(igraph_rng_default(), ...), or by simply ensuring thatigraph_setup()was called before the first use of the library.
Error codes
- The
IGRAPH_EINVEVECTORerror code was removed;igraph_create()andigraph_add_edges()that used to return this error code for invalid edge vectors will now returnIGRAPH_EINVALinstead. - The
IGRAPH_NONSQUAREerror code was removed; functions that used this error code now returnIGRAPH_EINVALinstead when encountering a non-square matrix. - The
IGRAPH_EGLPerror code and all other GLP-specific error codes (starting withIGRAPH_GLP_) were removed; functions that used this error code now returnIGRAPH_FAILUREinstead, providing more details in the message associated to the error code. - The
IGRAPH_ELAPACKerror code was removed; functions that used this error code now returnIGRAPH_FAILUREinstead, providing more details in the message associated to the error code. - The
IGRAPH_CPUTIMEerror code was removed in favour of the interruption mechanism built into igraph. - The unused
IGRAPH_EDIVZEROandIGRAPH_EATTRIBUTESerror codes were removed with no replacement. - The deprecated error code
IGRAPH_ENEGLOOPwas removed. UseIGRAPH_ENEGCYCLEinstead. The underlying numerical value is the same as it was forIGRAPH_ENEGLOOP. - ARPACK-specific error codes (starting with
IGRAPH_ARPACK_...) were replaced with a singleIGRAPH_EARPACKerror code. Details about the underlying ARPACK failure are provided in the error message. - A new error code called
IGRAPH_EINVEIDwas added for cases when an invalid edge ID was encountered in an edge ID vector.
Core data structures
igraph_strvector_push_back_len()now takes a length parameter ofsize_tinstead ofigraph_integer_t.igraph_strvector_print()no longer takes a file parameter. Useigraph_strvector_fprint()to print to a file.igraph_vector_reverse()no longer returns an error code.igraph_vector_shuffle()no longer returns an error code.igraph_vector_swap()andigraph_matrix_swap()no longer return an error code.igraph_vector_list_swap()andigraph_graph_list_swap()no longer return an error code.igraph_vector_swap_elements()no longer returns an error code.igraph_vector_list_swap_elements()andigraph_graph_list_swap_elements()no longer return an error code.igraph_matrix_copy_to()gained anigraph_matrix_storage_t storageparameter that specifies whether the data should be written in column-major or row-major format.
Attribute handling
igraph_attribute_handler_tmembers that formerly took an untypedigraph_vector_ptr_targument are now taking a typedigraph_attribute_record_list_targument instead.- The deprecated
IGRAPH_ATTRIBUTE_DEFAULTvalue of theigraph_attribute_type_tenum was removed. - The
gettypemember ofigraph_attribute_table_twas renamed toget_typefor sake of consistency with the naming scheme of other struct members. - Attribute table members that retrieve graph, vertex or edge attributes must not clear the incoming result vector any more; results must be appended to the end of the provided result vector instead.
- The
valuemember ofigraph_attribute_record_tis now a union that can be used to formally treat the associated pointer as anigraph_vector_t *,igraph_strvector_t *origraph_vector_bool_t *.
Core graph manipulation
igraph_delete_vertices_map()(formerly calledigraph_delete_vertices_idx()) andigraph_induced_subgraph_map()now use-1to represent unmapped vertices in the returned forward mapping vector and they do not offset vertex indices by 1 any more. (Note that the inverse map always behaved this way, this change makes the two mappings consistent).igraph_edges()gained a newbycolargument that determines the order in which the edges are returned.bycol = falsereproduces the existing behaviour, whilebycol = truereturns the edges suitable for a matrix stored in column-wise order.igraph_neighbors()andigraph_vs_adj()gained two extra arguments to specify what to do with loop and multiple edges. This makes their interfaces consistent withigraph_adjlist_init().igraph_incident()andigraph_es_incident()gained an extra arguments to specify what to do with loop edges. This makes their interfaces consistent withigraph_inclist_init().igraph_multiple_twas removed from the public API as it is essentially a boolean. The symbolic constantsIGRAPH_MULTIPLEandIGRAPH_NO_MULTIPLEwere kept to improve readability of code written directly in C.
Basic graph properties
igraph_density()now takes an optionalweightsparameter.igraph_is_simple()gained an extraigraph_bool_targument that decides whether edge directions should be considered. Directed graphs with a mutual edge pair are treated as non-simple if this argument is set toIGRAPH_UNDIRECTED(which treats the graph as if it was undirected).- The type of the
loopsargument ofigraph_adjlist_init_complementer(),igraph_centralization_degree(),igraph_centralization_degree_tmax(),igraph_degree(),igraph_maxdegree(),igraph_sort_vertex_ids_by_degree()andigraph_strength()was changed toigraph_loops_tfromigraph_bool_t, allowing finer-grained control about how loop edges are treated. igraph_get_biadjacency()now takes aweightsparameter, and can optionally create weighted biadjacency matrices.igraph_adjacency()now treatsIGRAPH_LOOPS_TWICEasIGRAPH_LOOPS_ONCEwhen the mode isIGRAPH_ADJ_DIRECTED,IGRAPH_ADJ_UPPERorIGRAPH_ADJ_LOWER. For directed graphs, this is for the sake of consistency with the rest of the library whereIGRAPH_LOOPS_TWICEis considered for undirected graphs only. For the "upper" and "lower" modes, double-counting the diagonal makes no sense because the double-counting artifact appears when you add the transpose of an upper (or lower) diagonal matrix on top of the matrix itself. See Github issue #2501 for more context.
Graph generators
igraph_barabasi_game(),igraph_barabasi_aging_game(),igraph_recent_degree_game()andigraph_recent_degree_aging_game()no longer interprets an emptyoutseqvector as a missing out-degree sequence. PassNULLif you don't wish to specify an out-degree sequence.igraph_degree_sequence_game()no longer interprets an empty in-degree vector as a request for generating undirected graphs. To generate undirected graphs, passNULLfor in-degrees.igraph_lcf()was renamed toigraph_lcf_small()andigraph_lcf_vector()was renamed toigraph_lcf(). Nowigraph_lcf()takes shifts as a vector input, whileigraph_lcf_small()accepts a shorthand notation where shifts are given as a variable number of function arguments.igraph_sbm_game()uses anigraph_edge_type_sw_t allowed_edge_typesparameter instead ofigraph_bool_t loopsand supports generating graphs with mutli-edges. The parameter determining the total number of vertices (n) was removed as it was redundant.igraph_rewire_edges()uses anigraph_edge_type_sw_t allowed_edge_typesparameter instead ofloopsandmultiple.igraph_watts_strogatz_game()uses anigraph_edge_type_sw_t allowed_edge_typesparameter instead ofloopsandmultiple.igraph_static_fitness_game()uses anigraph_edge_type_sw_t allowed_edge_typesparameter instead ofloopsandmultiple.igraph_static_power_law_game()uses anigraph_edge_type_sw_t allowed_edge_typesparameter instead ofloopsandmultiple.
Shortest paths
igraph_distances(),igraph_distances_cutoff(),igraph_get_shortest_path(),igraph_get_shortest_paths()andigraph_get_all_shortest_paths()gained aweightsargument. The functions now automatically select the appropriate implementation (unweighted, Dijkstra, Bellman-Ford or Johnson) algorithm based on whether weights are present and whether there are negative weights or not. You can still call the individual methods by their more specific names.igraph_distances_johnson()now takes a mode parameter to determine in which direction paths should be followed.igraph_similarity_jaccard()andigraph_similarity_dice()now take two sets of vertices to create vertex pairs of, instead of one.- The weighted variants of
igraph_diameter(),igraph_pseudo_diameter(),igraph_radius(),igraph_graph_center(),igraph_eccentricity()andigraph_average_path_length()were merged into the undirected ones by adding a new argument namedweightsin the second position. - The
weightsparameter ofigraph_average_path_length(),igraph_global_efficiency(),igraph_local_efficiency()andigraph_average_local_efficiency()were moved to the second position, after thegraphitself, for sake of consistency with other functions. igraph_get_all_simple_paths()returns its results in an integer vector list (igraph_vector_int_list_t) instead of a single integer vector.igraph_get_all_simple_paths()now has an additional parameter that allows restricting paths by minimum length as well.
Community detection
igraph_community_edge_betweenness()now takes both aweightsand alengthsparameter. Egde weights (interpreted as connection strengths) are used to divide betweenness scores before selecting them for removal as well as for the modularity computation. Edge lengths are used for defining shortest path lengths during the betweenness computation. This fixes issues #2229 and #1040.igraph_community_infomap()now supports regularization and gained theis_regularizedandregularization_strengthparameters.igraph_community_label_propagation()changed signature to allow specification of label propagation algorithm (LPA) variants. A new fast label propagation variant was added.igraph_community_leiden()now takes twovertex_out_weightsandvertex_in_weightsparameters in order to support directed graphs, instead of the previous singlenode_weightsparameter. To obtain the old behavior for undirected graphs, pass the vertex weights asvertex_out_weightsand setvertex_in_weightstoNULL.- The
historyparameter ofigraph_community_leading_eigenvector()is now a pointer to anigraph_vector_int_tinstead of anigraph_vector_t. igraph_community_optimal_modularity()now takes aresolutionparameter and itsweightparameter was moved to the second place.igraph_community_spinglass_single()now usesigraph_real_tfor itsinner_linksandouter_linksoutput parameters, as these return not simply edge counts, but the sum of the weights of some edges.
Isomorphism functions and permutations
igraph_count_automorphisms()has been renamed toigraph_count_automorphisms_bliss()because it has a BLISS-specific interface. A newigraph_count_automorphisms()function was added with a simplified interface that does not depend on BLISS.igraph_automorphism_group()has been renamed toigraph_automorphism_group_bliss()because it has a BLISS-specific interface. A newigraph_automorphism_group()function was added with a simplified interface that does not depend on BLISS.igraph_canonical_permutation()has been renamed toigraph_canonical_permutation_bliss()because it has a BLISS-specific interface. A newigraph_canonical_permutation()function was added with a simplified interface that does not depend on BLISS.igraph_subisomorphic_lad()does not have a CPU time limit parameter any more. If you wish to stop the calculation from another thread or a higher level interface, use igraph's interruption mechanism.- The semantics of the
igraph_permute_vertices()permutation argument has changed: the i-th element of the vector now contains the index of the original vertex that will be mapped to the i-th vertex in the new graph. This is now consistent with how other igraph functions treat permutations and vertex index vectors; for instance, you can now pass the result ofigraph_topological_sorting()directly toigraph_permute_vertices()to obtain a new graph where the vertices are sorted topologically. - As a consequence to the change in the semantics of the
igraph_permute_vertices()permutation argument, the semantics of the permutations returned fromigraph_canonical_permutation()andigraph_canonical_permutation_bliss()have also been inverted to maintain the invariant that the output of these functions can be fed intoigraph_permute_vertices()directly.
Centralities
- All betweenness functions got
normalizedparameter to support normalizing the result by the number of vertex pairs in the graph. At the same time, parameter ordering was standardized. The following functions are affected:igraph_betweenness(),igraph_betweenness_cutoff(),igraph_edge_betweenness(),igraph_edge_betweenness_cutoff(),igraph_betweenness_subset(),igraph_edge_betweenness_subset(). igraph_edge_betweenness()andigraph_edge_betweenness_cutoff()now have aneidsparameter to return only a subset of results. This makes their interface consistent with other betweenness functions.igraph_eigenvector_centrality(),igraph_centralization_eigenvector_centrality()andigraph_centralization_eigenvector_centrality_tmax()now use amodeparameter with possible valuesIGRAPH_OUT,IGRAPH_INorIGRAPH_ALLto control how edge directions are considered. Previously they used a booleandirectedparameter.igraph_eigenvector_centrality(),igraph_centralization_eigenvector_centrality()andigraph_centralization_eigenvector_centrality_tmax()no longer have ascaleparameter. The result is now always scaled so that the largest centrality value is 1.igraph_hub_and_authority_scores()no longer has ascaleparameter. The result is now always scaled so that the largest hub and authority scores are each 1.igraph_pagerank(),igraph_personalized_pagerank()andigraph_personalized_pagerank_vs()had their parameter ordering standardized.
Layouts
igraph_layout_sugiyama()does not return an "extended graph" any more. The bends in the edges of the layout are encoded in a list of matrices instead; each item in the list belongs to an edge of the original graph and contains the control points of the edge in a row-wise fashion. The matrix will have no rows if no control points are needed on the edge.
Other network analysis
igraph_minimum_spanning_tree()takes a newmethodparameter that controls the algorithm used for finding the spanning tree. Kruskal's algorithm was added.- The deprecated
igraph_rng_get_dirichlet()function was removed. igraph_motifs_randesu_no()andigraph_motifs_randesu_estimate()now take anigraph_real_tas theirresultargument to prevent overflows when igraph is compiled with 32-bit integers.- The experimental functions
igraph_fundamental_cycles()andigraph_minimum_cycle_basis()now use the typeigraph_real_tfor theirbfs_cutoffparameter, and had theirweightsparameter moved to the 2nd position. igraph_rewire()now takes anigraph_edge_type_sw_tparameter to specify whether to create self-loops. Theigraph_rewiring_tenum type was removed. Instead of the oldIGRAPH_REWIRING_SIMPLE, useIGRAPH_SIMPLE_SW. Instead of the oldIGRAPH_REWIRING_SIMPLE_LOOPS, useIGRAPH_LOOPS_SW.
Foreign formats
igraph_read_graph_ncol()andigraph_read_graph_lgl()now uses a default edge weight of 1 instead of 0 for files that do not contain edge weights for at least some of the edges.
Added
igraph_setup()performs all initialization tasks that are recommended before using the igraph library. Right now this function only initializes igraph's internal random number generator with a practically random seed, but it may also perform other tasks in the future. It is recommended to call this function before using any other function from the library (although most of the functions will work fine now even if this function is not called).igraph_erdos_renyi_game_gnm()gained amultipleBoolean argument to uniformly sample G(n,m) graphs with multi-edges.igraph_bipartite_game_gnm()gained amultipleBoolean argument to uniformly sample bipartite G(n,m) graphs with multi-edges.igraph_iea_game()samples random multigraphs through independent edge assignment.igraph_bipartite_iea_game()samples random bipartite multigraph through independent edge assignment.igraph_weighted_biadjacency()creates a weighted graph from a bipartite adjacency matrix.igraph_vector_ptr_capacity()returns the allocated capacity of a pointer vector.igraph_vector_ptr_resize_min()deallocates unused capacity of a pointer vector.igraph_strvector_fprint()prints a string vector to a file.igraph_rng_sample_dirichlet(),igraph_rng_sample_sphere_volume()andigraph_rng_sample_sphere_surface()samples vectors from a Dirichlet distribution or from the volume or surface of a sphere while allowing the user to specify the random number generator to use.igraph_nearest_neighbor_graph()computes a neighborhood graph of spatial points based on a neighbor count, cutoff distance, and chosen metric (experimental function). Thanks to Arnór Friðriksson @Zepeacedust for implementing this in #2788!igraph_delaunay_graph()computes a Delaunay graph of a spatial point set (experimental function). Thanks to Arnór Friðriksson @Zepeacedust for implementing this in #2806!igraph_spatial_edge_lengths()computes edges lengths based on spatial vertex coordinates (experimental function).igraph_community_leiden_simple()is a simplified interface toigraph_community_leiden()that allows selecting the objective function to maximize directly.igraph_vector_difference_and_intersection_sorted()calculates the intersection and the differences of two vectors simultaneously.igraph_layout_align()attempts to align a graph layout with the coordinate axes in a visually pleasing manner (experimental function).igraph_product()supports the lexicographic, strong and modular graph products. Thanks to Gulshan Kumar @gulshan-123 for contributing this functionality in #2772 and #2793!igraph_rooted_product()computes the the rooted graph product. Thanks to Gulshan Kumar @gulshan-123 for contributing this functionality in #2793!igraph_mycielskian()andigraph_mycielski_graph()compute a Mycielski transformation of a graph, and a Mycielski graph, respectively. Thanks to Gulshan Kumar @gulshan-123 for contributing this functionality in #2741!igraph_path_graph()is a convenience wrapper forigraph_ring()withcircular=false.igraph_cycle_graph()is a convenience wrapper forigraph_ring()withcircular=true.igraph_bond_percolation(),igraph_site_percolation()andigraph_edgelist_percolation()calculates the time evolution of the size of the giant component of a graph when edges or vertices are added one by one in a certain (or random) order. Thanks to Arnór Friðriksson @Zepeacedust for implementing this in #2778!igraph_invert_permutation()inverts a permutation stored in an integer vector.igraph_is_vertex_coloring()andigraph_is_edge_coloring()check if a vertex or edge coloring is valid, i.e. whether adjacenct vertices/edges always have distinct colors. Thanks to Sarah Rashidi @its-serah for contributing this in #2807!igraph_rich_club_sequence()calculates how the density of a graph changes as vertices are removed. Thanks to Zara Zong @minifinity for contributing this in #2740!
Changed
- The Pajek format reader and writer now map vertex labels to the
namevertex attribute in igraph. Theidattribute is no longer used. igraph_minimum_size_separators()no longer returns any separating vertex sets for complete graphs. Prior to igraph 1.0, it would return alln - 1size vertex subsets wherenis the vertex count.igraph_community_edge_betweenness()now treats edges with large weights as strong connections.igraph_biadjacency()now truncates non-integer matrix entries to their integer part instead of rounding them up. This brings consistency with related functions such asigraph_adjacency().- The order of edges in the graph returned by
igraph_(weighted_)adjacency()andigraph_biadjacency()has changed. Note that these functions do not guarantee any specific edge order. igraph_eigenvector_centrality()now warns about eigenvector centralities equal to zero, as these indicate a disconnected graph, for which eigenvector centrality is not meaningful.igraph_hub_and_authority_scores()now warns when a large fraction of centrality scores are zero, as this indicates a non-unique solution, and thus the returned result may not be meaningful.igraph_hub_and_authority_scores()now warns when providing an undirected graph as input, and falls back to the equivalent eigenvector centrality computation.igraph_get_stochastic_sparse()no longer throws an error when some row or column sums are zero. This brings its behaviour in line withigraph_get_stochastic().igraph_vector_append(),igraph_strvector_append()andigraph_vector_ptr_append()now use a different allocation strategy: if thetovector has insufficient capacity, they double its capacity. Previously they reserved precisely as much capacity as needed for appending thefromvector.- The implementation of the Infomap algorithm behind
igraph_community_infomap()has been updated with a more recent version (2.8.0). Isolated vertices are now supported. igraph_vector_difference_sorted()now handles multisets properly (and documents how the multiplicities are handled).igraph_bipartite_game_gnp()can now generate graphs with more than a hundred million vertices. Thanks to Dev Lohani @devlohani99 for implementing this in #2767!igraph_reindex_membership()now supports arbitrary cluster indices. Previously, it would error when indices are not within0 .. n-1wherenis the membership vector length.igraph_modularity()now supports arbitrary cluster indices. However, ensuring that cluster indices are within the range0 .. n-1, wherenis the vertex count, allows for better performance.
Finalized experimental functions
- The following functions are not experimental any more:
igraph_count_loops(),igraph_count_reachable(),igraph_degree_correlation_vector,igraph_distances_cutoff(),igraph_distances_floyd_warshall(),igraph_distances_dijkstra_cutoff(),igraph_ecc(),igraph_enter_safelocale(),igraph_exit_safelocale(),igraph_feedback_vertex_set(),igraph_find_cycle(),igraph_get_shortest_path_astar(),igraph_graph_power(),igraph_hexagonal_lattice(),igraph_hypercube(),igraph_is_bipartite_coloring(),igraph_is_clique(),igraph_is_complete(),igraph_is_edge_coloring(),igraph_is_vertex_coloring(),igraph_is_independent_vertex_set(),igraph_join(),igraph_joint_degree_distribution(),igraph_joint_degree_matrix(),igraph_joint_type_distribution(),igraph_layout_align(),igraph_layout_merge_dla(),igraph_mean_degree(),igraph_radius(),igraph_realize_bipartite_degree_sequence(),igraph_reachability(),igraph_transitive_closure(),igraph_tree_from_parent_vector(),igraph_triangular_lattice(),igraph_vector_intersection_size_sorted(),igraph_voronoi().
Fixed
igraph_community_spinglass_single()now usesigraph_real_tfor itsinner_linksandouter_linksoutput parameters, as these return not simply edge counts, but the sum of the weights of some edges. Thus these results are no longer incorrectly rounded.- Fix failure in SIR simulation due to roundoff errors creating slightly negative rates.
- Fix infinite coordinates for certain path graphs with
igraph_layout_kamada_kawai_3d(). igraph_community_leiden()did not iterate until the partition ceased to change whenn_iterations < 0. Thanks to Lucas Lopes Felipe @lucaslopes for fixing this in #2799!- The widest path functions
igraph_widest_path_widths_floyd_warshall(),igraph_widest_path_widths_dijkstra(),igraph_get_widest_paths(), andigraph_get_widest_path()incorrectly ignored edges with positive infinite width. Now they ignore edges with negative infinite width.
Removed
- Removed
igraph_Calloc(),igraph_Realloc()andigraph_Free(). UseIGRAPH_CALLOC(),IGRAPH_REALLOC()andIGRAPH_FREE()instead. - The deprecated
igraph_adjacent_triangles()was removed. Useigraph_count_adjacent_triangles()instead. - The deprecated
igraph_are_connected()was removed. Useigraph_are_adjacent()instead. - The deprecated
igraph_automorphisms()was removed. Useigraph_count_automorphisms()origraph_count_automorphisms_bliss()instead. - The deprecated
igraph_convex_hull()was removed. Useigraph_convex_hull_2d()instead. - The deprecated
igraph_decompose_destroy()was removed. - The deprecated
igraph_hub_score()andigraph_authority_score()were removed. - The deprecated
igraph_vs_seq(),igraph_vss_seq(),igraph_es_seq(),igraph_ess_range(), andigraph_vector_init_seq()were removed. Use therangealternatives instead of the oldseqones. - The deprecated
igraph_erdos_renyi_game()andigraph_bipartite_game()were removed. Use the corresponding functions with_gnm()and_gnp()in the name instead. - The deprecated
igraph_tree()was removed. Useigraph_kary_tree()instead. - The deprecated
igraph_lattice()was removed. Useigraph_square_lattice()instead. - The deprecated
igraph_minimum_spanning_tree_prim()was removed. Useigraph_minimum_spanning_tree()in conjunction withigraph_subgraph_from_edges()instead. - The deprecated
igraph_minimum_spanning_tree_unweighted()was removed. Useigraph_minimum_spanning_tree()in conjunction withigraph_subgraph_from_edges()instead. - The deprecated
igraph_get_sparsemat()was removed. Useigraph_get_adjacency_sparse()instead. - The deprecated
igraph_get_stochastic_sparsemat()was removed. Useigraph_get_stochastic_sparse()instead. - The deprecated
igraph_laplacian()was removed. Useigraph_get_laplacian()origraph_get_laplacian_sparse()instead. - The deprecated
igraph_subgraph_edges()was removed. Useigraph_subgraph_from_edges()instead. - The deprecated
igraph_read_graph_dimacs()andigraph_write_graph_dimacs()were removed. These names may be re-used in the future. Useigraph_read_graph_dimacs_flow()andigraph_write_graph_dimacs_flow()instead. - The deprecated
igraph_isomorphic_function_vf2()was removed. Useigraph_get_isomorphisms_vf2_callback()instead. - The deprecated
igraph_subisomorphic_function_vf2()was removed. Useigraph_get_subisomorphisms_vf2_callback()instead. - The deprecated
igraph_isomorphic_34()was removed. Its functionality is accessible throughigraph_isomorphic(). - The deprecated
igraph_transitive_closure_dag()was removed. Useigraph_transitive_closure()instead, which works for all graphs, not just DAGs. - The deprecated
igraph_sparsemat_copy()was removed. Useigraph_sparsemat_init_copy()instead. - The deprecated
igraph_sparsemat_eye()was removed. Useigraph_sparsemat_init_eye()instead. - The deprecated
igraph_sparsemat_diag()was removed. Useigraph_sparsemat_init_diag()instead. - The deprecated
igraph_sparsemat()andigraph_weighted_sparsemat()functions were removed; useigraph_get_adjacency_sparse()instead. - The deprecated
igraph_random_edge_walk()was removed. Its functionality is incorporated inigraph_random_walk(). - The deprecated
igraph_vector_qsort_ind()was removed. Useigraph_vector_sort_ind()instead. - The deprecated
igraph_vector_binsearch2()was removed. Useigraph_vector_contains_sorted()instead. - The deprecated
igraph_vector_copy()andigraph_matrix_copy()were removed. Useigraph_vector_init_copy()andigraph_matrix_init_copy()instead. - The deprecated
igraph_vector_e(),igraph_vector_e_ptr(),igraph_matrix_e()andigraph_matrix_e_ptr()were removed. Use the alternatives ending in_get()and_get_ptr()instead. - The deprecated
igraph_vector_move_interval2()was removed. - The deprecated
igraph_zeroin()was removed. - The deprecated
igraph_deterministic_optimal_imitation(),igraph_moran_process(),igraph_roulette_wheel_imitation()andigraph_stochastic_imitation()functions were removed. igraph_sample_dirichlet(),igraph_sample_sphere_surface()andigraph_sample_sphere_volume()were removed in favour ofigraph_rng_sample_dirichlet(),igraph_rng_sample_sphere_surface()andigraph_rng_sample_sphere_volume(), which allow the user to specify the random number generator to use.- The unused enum type
igraph_fileformat_type_twas removed. - The macros
IGRAPH_POSINFINITYandIGRAPH_NEGINFINITYwere removed. UseIGRAPH_INFINITYand-IGRAPH_INFINITYinstead.
Deprecated
igraph_delete_vertices_idx()is now deprecated in favour ofigraph_delete_vertices_map(), which is functionally equivalent but has a name that is consistent withigraph_induced_subgraph_map().
Other
- Documentation improvements.
- Improved performance when creating graphs from dense adjacency matrices (
igraph_adjacency()andigraph_weighted_adjacency()).
- C
Published by ntamas 6 months ago
igraph - igraph 0.10.16
Added
igraph_count_triangles()counts undirected triangles in a graph.igraph_count_adjacent_triangles()(rename ofigraph_adjacent_triangles()).igraph_rng_get_bool()andRNG_BOOL()produce a single random boolean.igraph_product()computes various kinds of graph products of two graphs. Thanks to Gulshan Kumar @gulshan-123 for contributing this functionality in #2748!
Changed
igraph_neighborhood_size(),igraph_neighborhood()andigraph_neighborhood_graphs()now accept a negativeordervalue and interpret it as infinite order. Previously, a negativeordervalue was disallowed.igraph_famous()now acceptsGroetzschas an alias ofGrotzsch.igraph_vertex_path_from_edge_path()can now determine the start vertex automatically.
Fixed
igraph_largest_independent_vertex_sets()andigraph_maximal_independent_vertex_sets()would sometimes return incorrect results for graphs with self-loops. This is now corrected.igraph_vertex_path_from_edge_path()now validates the start vertex.- Fixed a memory leak in the GraphML parser for cases when the
idattribute was specified multiple times within the same XML tag.
Deprecated
- The undocumented function
igraph_vector_sumsq()is deprecated. Useigraph_blas_dnrm2()to compute the Euclidean norm of real vectors. igraph_adjacent_triangles()is deprecated and scheduled for removal in 1.0.igraph_deterministic_optimal_imitation(),igraph_moran_process(),igraph_roulette_wheel_imitation()andigraph_stochastic_imitation()are now deprecated and scheduled for removal in 1.0.igraph_rng_get_dirichlet()is deprecated and scheduled for removal in 1.0. Its interface is inconsistent with the otherigraph_rng_get_...()functions and we have a replacemenet for it inigraph_sample_dirichlet(). igraph 1.0 will gain anigraph_rng_sample_dirichlet()function that lets the caller pass in anigraph_rng_tinstance as well.
Other
- Workaround for bug in CMake 3.31.0, see https://gitlab.kitware.com/cmake/cmake/-/issues/26449
- Updated the vendored
plfitlibrary to version 1.0.0. This works around a bug in some MSVC / Windows SDK versions that define aNANmacro that is not a compile-time constant. - Updated vendored BLAS to 3.12.0 and vendored ARPACK to ARPACK-NG 3.7.0.
- Re-translated vendored BLAS/LAPACK/ARPACK sources with f2c version 20240504.
- The performance of
igraph_transitivity_undirected()is improved by a factor of about 2.5. - The performance of
igraph_degree_sequence_game()is improved when usingIGRAPH_DEGSEQ_CONFIGURATION_SIMPLE. - Documentation improvements and fixes.
- C
Published by ntamas 9 months ago
igraph - igraph 0.10.15
Added
igraph_bitset_update()copies the contents of one bitset into another (experimental function).igraph_vector_sort_ind()(rename ofigraph_vector_qsort_ind()).igraph_vector_contains_sorted()(rename ofigraph_vector_binsearch2()).igraph_vector_reverse_section()reverses a contiguous section of a vector.igraph_vector_rotate_left()applies a cyclic permutation to a vector.igraph_strvector_swap_elements()swaps two strings in anigraph_strvector_t.igraph_find_cycle()finds a single cycle in a graph, if it exists (experimental function).igraph_feedback_vertex_set()finds a minimum feedback vertex set in a directed or undirected graph (experimental function).igraph_simple_cycles()andigraph_simple_cycles_callback()find all simple cycles in a graph, optionally with an upper bound on the cycle length (experimental functions). Many thanks to Tim Bernhard @GenieTim for contributing this functionality in #2181.
Changed
igraph_feedback_arc_set()uses a much faster method for solving the exact minimum feedback arc set problem. The new method (IGRAPH_FAS_EXACT_IP_CG) is used by default (i.e. withIGRAPH_FAS_EXACT_IP), but the previous method is also kept available (IGRAPH_FAS_EXACT_IP_TI).igraph_motifs_randesu(),igraph_motifs_randesu_callback(),igraph_motifs_randesu_estimate()andigraph_motifs_randesu_no()now acceptNULLfor theircut_probparameter, signifying that a complete search should be performed.igraph_centralization_eigenvector_centrality_tmax()andigraph_centralization_eigenvector_centrality()cannot produce meaningful results without normalizing vertex-level eigenvector centrality in a well-defined way. This was not the case when usingscale=false. These functions now ignore the value of thescaleparameter and always scale vertex-level centrality scores to have a maximum of 1. If you require a different type of normalization for the vertex-level eigenvector centrality scores, perform this normalization manually, and calligraph_centralization()to compute the centralization.- When
igraph_eigenvector_centrality()receives a directed acyclic graph as input, it now produces an eigenvector which has 1s in sink vertices and 0s everywhere else. Previously, it would return an all-zero vector. Note that eigenvector centrality is not uniquely defined for graphs that are not (strongly) connected, and both of these results can be considered valid. This change is to ensure consistency with the definition of the theoretical maximum of eigenvector centralization, which assumes the in-star to be the most centralized directed network.
Fixed
igraph_layout_drl()andigraph_layout_drl_3d()would crash with an assertion failure when interrupted. This is now fixed.- Removed broken interruption support from
igraph_community_spinglass_single(). - In rare cases
igraph_community_multilevel()could enter an infinite loop. This is now corrected. - Fixed null-dereference in
igraph_community_voronoi()when requestingmodularitybut notmembership. - Fixed null-dereference in
igraph_community_optimal_modularity()when requestingmodularitybut notmembershipand passing a null graph or singleton graph. igraph_layout_umap()andigraph_layout_umap_3d()would crash when passingdistances=NULLanddistances_are_weights=true. This is now fixed.igraph_layout_umap()andigraph_layout_umap_3d()would crash on interruption. This is now fixed.igraph_read_graph_pajek()now warns about duplicate vertex IDs in input files.- The documented
igraph_strvector_resize_min()was missing from headers. igraph_feedback_arc_set()now validates the edge weights.igraph_layout_lgl()was not working correctly since igraph 0.10.0 due to a poor choice of initial coordinates. This is now fixed.igraph_centralization_degree_tmax(),igraph_centralization_betweenness_tmax(),igraph_centralization_closeness_tmax(), andigraph_centralization_eigenvector_centrality_tmax()now validate theirnodesparameter.igraph_centralization_degree_tmax(),igraph_centralization_betweenness_tmax(),igraph_centralization_closeness_tmax(), andigraph_centralization_eigenvector_centrality_tmax()now return NaN for zero-vertex graphs. Previously they would return invalid values.igraph_centralization_eigenvector_centrality_tmax()now returns 0 for the undirected singleton graph. Previous it would return an invalid value.igraph_motifs_randesu_estimate()now validates the sample size.igraph_bipartite_projection_size()now validates the bipartitetypesvector.
Deprecated
igraph_minimum_spanning_tree_prim()andigraph_minimum_spanning_tree_unweighted()are deprecated. Useigraph_minimum_spanning_tree()in conjunction withigraph_subgraph_from_edges()instead.igraph_array3_tand all associated functions are deprecated and scheduled for removal in igraph 1.0.igraph_vector_qsort_ind()is deprecated in favour ofigraph_vector_sort_ind().igraph_vector_binsearch2()is deprecated in favour ofigraph_vector_contains_sorted().
Other
- Fixed multiple memory leaks in benchmark programs.
- Documentation improvements.
- C
Published by ntamas over 1 year ago
igraph - igraph 0.10.13
Added
igraph_bitset_fill()sets all elements of a bitset to the same value (experimental function).igraph_bitset_null()clears all elements of a bitset (experimental function).igraph_bitset_is_all_zero(),igraph_bitset_is_all_one(),igraph_bitset_is_any_zero(),igraph_bitset_is_any_one()check if any/all elements of a bitset are zeros/ones (experimental functions).igraph_chung_lu_game()implements the classic Chung-Lu model, as well as a number of its variants (experimental function).igraph_mean_degree()computes the average of vertex degrees (experimental function).igraph_count_loops()counts self-loops in the graph (experimental function).igraph_is_clique()checks if all pairs within a set of vertices are connected (experimental function).igraph_is_independent_vertex_set()checks if no pairs within a set of vertices are connected (experimental function).igraph_hypercube()creates a hypercube graph (experimental function).igraph_vector_intersection_size_sorted()counts elements common to two sorted vectors (experimental function).igraph_stack_capacity()returns the allocated capacity of a stack.igraph_vector_is_all_finite()checks if all elements in a vector are finite (i.e. neither NaN nor Inf).
Fixed
- Fixed a bug that incorrectly cached that a graph has no multiple edges when
igraph_init_adjlist()was called withIGRAPH_NO_LOOPSandIGRAPH_NO_MULTIPLEand all the multi-edges were loop edges. igraph_is_forest()would fail to set the result variable when testing for a directed forest, and it was already cached that the graph was not an undirected forest.igraph_hub_and_authority_scores()no longer clips negative results to zeros when negative weights are present.- Fixed an assertion failure in
igraph_realize_bipartite_degree_sequence()with some non-graphical degree sequences when requesting simple bipartite graphs. igraph_static_fitness_game()checks the input more carefully, and avoids an infinite loop in rare edge cases, such as when (almost) all fitness scores are zero.igraph_arpack_rnsolve()used the incorrect error message text for some errors. This is now corrected.- Corrected the detection of some MSVC-specific bitset intrinsics during configuration.
- Corrected a bug in the fallback implementation of
igraph_bitset_countl_zero()whenIGRAPH_INTEGER_SIZEwas set to 32. This fallback implementation was not used with GCC, Clang, or MSVC.
Changed
igraph_is_graphical()andigraph_is_bigraphical()are now linear-time in all cases, and generally several times faster than before (thanks to @gendelpiekel, contributed in #2605).igraph_erdos_renyi_game_gnp()can now generate graphs with more than a hundred million vertices.igraph_hub_and_authority_scores()now warns when negative edge weights are present.igraph_layout_lgl()now uses a BFS tree rooted in the vertex specified asprootto guide the layout. Previously it used an unspecified (arbitrary) spanning tree.- Updated the internal heuristics used by igraph's ARPACK interface,
igraph_arpack_rssolve()andigraph_arpack_rnsolve(), to improve the robustness of calculations. - Updated the initial vector construction in
igraph_hub_and_authority_scores(),igraph_eigenvector_centrality()andigraph_(personalized_)pagerank()withIGRAPH_PAGERANK_ALGO_ARPACK. This improves the robustness and convergence of calculations.
Other
- Documentation improvements.
- Reduced the memory usage of several functions by using bitsets instead of Boolean vectors.
igraph_vector_intersect_sorted()has better performance when the input vector sizes are similar.
- C
Published by ntamas over 1 year ago
igraph - igraph 0.10.12
Added
igraph_transitive_closure()computes the transitive closure of a graph (experimental function).igraph_reachability()determines which vertices are reachable from each other in a graph (experimental function).igraph_count_reachable()counts how many vertices are reachable from each vertex (experimental function).- Added a bitset data structure,
igraph_bitset_t, and a set of corresponding functions (experimental functionality).
Fixed
igraph_community_label_propagation()is now interruptible.igraph_is_bipartite()would on rare occasions return invalid results when the cache was employed.igraph_weighted_adjacency()correctly passes through NaN values withIGRAPH_ADJ_MAX, and correctly recognizes symmetric adjacency matrices containing NaN values withIGRAPH_ADJ_UNDIRECTED.igraph_read_graph_gml()can now read GML files that use ids larger than what is representable on 32 bits, provided that igraph was configured with a 64-bitigraph_integer_tsize.- Fixed a performance issue in
igraph_read_graph_graphml()with files containing a very large number of entities, such as>. igraph_read_graph_pajek()has improved vertex ID validation that better matches that of Pajek's own behavior.
Changed
igraph_eigenvector_centrality()no longer issues a warning when the input is directed and weighted. When using this function, keep in mind that eigenvector centrality is well-defined only for (strongly) connected graphs, and edges with a zero weights are effectively treated as absent.
Deprecated
igraph_transitive_closure_dag()is deprecated in favour ofigraph_transitive_closure()
Other
- Documentation improvements.
igraph_strength()andigraph_degree(loops=false)are now faster when calculating values for all vertices (contributed by @gendelpiekel in #2602)
- C
Published by ntamas almost 2 years ago
igraph - igraph 0.10.11
Added
igraph_is_complete()checks whether there is a connection between all pairs of vertices (experimental function, contributed by Aymeric Agon-Rambosson @aagon in #2510).
Fixed
- Fixed a corruption of the "finally" stack in
igraph_write_graph_gml()for certain invalid GML files. - Fixed a memory leak in
igraph_write_graph_lgl()when vertex names were present but edge weights were not. - Fixed the handling of duplicate edge IDs in
igraph_subgraph_from_edges(). - Fixed conversion of sparse matrices to dense with
igraph_sparsemat_as_matrix()when sparse matrix object did not make use of its full allocated capacity. igraph_write_graph_ncol()andigraph_write_graph_lgl()now refuse to write vertex names which would result in an invalid file that cannot be read back in.igraph_write_graph_gml()now ignores graph attributes callededgeornodewith a warning. Writing these would create an invalid GML file that igraph couldn't read back.igraph_disjoint_union()andigraph_disjoint_union_many()now check for overflow.igraph_read_graph_graphml()now correctly compares attribute values with certain expected values, meaning that prefixes of valid values ofattr.typeare not accepted anymore.- Empty IDs are not allowed any more in
<key>tags of GraphML files as this is a violation of the GraphML specification. igraph_is_separator()andigraph_is_minimal_separator()now work correctly with disconnected graphs.igraph_linegraph()now considers self-loops to be self-adjacent in undirected graphs, bringing consistency with how directed graphs were already handled in previous versions.igraph_all_st_mincuts()now correctly returns all minimum cuts. This also fixes a problem withigraph_minimum_size_separators().- Corrected minor error in
igraph_community_label_propagation()when adding labels to isolated nodes with some fixed labels present. igraph_community_spinglass()no longer crashes when passing an edgeless graph and an empty weight vector.igraph_rewire()no longer crashes on graphs with more than three vertices but fewer than two edges.
Changed
igraph_rewire()on longer throws an error on graphs with fewer than four vertices. These graphs are now returned unchanged, just like other graphs which are the unique realization of their degree sequence.
Other
- Performance:
igraph_is_simple()now makes more granular use of the cache. - Performance:
igraph_degree()now makes use of the cache when checking for self-loops. - The performance of
igraph_is_minimal_separator()was improved. igraph_is_graphical()now performs graphicality checks for degree sequences of simple directed graphs in linear time, an improvement from the previously used quadratic algorithm (contributed by Arnar Bjarni Arnarson @Tagl in #2537).- Documentation improvements.
- C
Published by ntamas almost 2 years ago
igraph - igraph 0.10.10
Fixed
- When
igraph_is_forest()determined that a graph is not a directed forest, and therootsoutput parameter was set toNULL, it would incorrectly cache that the graph is also not an undirected forest. igraph_spanner()now correctly ignores edge directions, and no longer crashes on directed graphs.
Deprecated
igraph_are_connected()is renamed toigraph_are_adjacent(); the old name is kept available until at least igraph 1.0.
Other
- Documentation improvements.
- C
Published by ntamas about 2 years ago
igraph - igraph 0.10.9
Added
igraph_is_biconnected()checks if a graph is biconnected.igraph_realize_bipartite_degree_sequence()constructs a bipartite graph that has the given bidegree sequence, optionally ensuring that it is connected (PR #2425 by Lára Margrét Hólmfríðardóttir @larah19).
Fixed
- More robust error handling in HRG code.
- Fixed infinite loop in
igraph_hrg_sample_many(). igraph_community_fastgreedy()no longer crashes when providing a modularity vector only, but not a merges matrix of membership vector.- The graph property cache was not initialized correctly on systems where the size of
boolwas not 1 byte (#2477). - Compatibility with libxml2 version 2.12 (#2442).
Deprecated
- The macro
STR()is deprecated; use the functionigraph_strvector_get()instead.
Other
- Performance: Reduced memory usage and improved initialization performance for
igraph_strvector_t. - Performance: Improved cache use by
igraph_is_bipartite(). - The documentation is now also generated in Texinfo format.
- Documentation improvements
- C
Published by ntamas about 2 years ago
igraph - igraph 0.10.8
Added
igraph_joint_degree_matrix()computes the joint degree matrix, i.e. counts connections between vertices of different degrees. (PR #2407 by Lára Margrét Hólmfríðardóttir @larah19)igraph_joint_degree_distribution()computes the joint distribution of degrees at either end of edges.igraph_joint_type_distribution()computes the joint distribution of vertex categories at either end of edges, i.e. the mixing matrix.igraph_degree_correlation_vector()computes the degree correlation function and its various directed generalizations.
Changed
- The behaviour of the Pajek format reader and writer is now more closely aligned with the Pajek software and the reader is more tolerant of input it cannot interpret. Only those vertex and edge parameters are treated as valid which Pajek itself understands, therefore support for
sizeis now dropped, and support for thefontedge parameter is added. See http://mrvar.fdv.uni-lj.si/pajek/DrawEPS.htm for more information. Invalid/unrecognized parameters are now converted to igraph attributes by the reader, but just as before, they are not output by the writer. - The Pajek format writer now encodes newline and quotation mark characters in a Pajek-compatible manner (
\nand", respectively). igraph_avg_nearest_neighbor_degree()now supports non-simple graphs.
Fixed
- Resolved "ignoring duplicate libraries" warning when building tests with Xcode 15 on macOS.
- Fixed the handling of duplicate vertex IDs in
igraph_induced_subgraph(). igraph_vector_which_min()andigraph_vector_which_max()no longer allow zero-length input, which makes them consistent with other similar functions, and was the originally intended behaviour. Passing zero-length input is invalid use and currently triggers an assertion failure.igraph_erdos_renyi_game_gnm()andigraph_erdos_renyi_game_gnp()are now interruptible.igraph_de_bruijn()andigraph_kautz()are now interruptible.igraph_full(),igraph_full_citation(),igraph_full_multipartite()andigraph_turan()are now interruptible.igraph_avg_nearest_neighbor_degree()did not computeknnkcorrectly in the weighted case.- Fixed variadic arguments of invalid types, which could cause incorrect behaviour with
igraph_matrix_print(), as well as test suite failures, on some platforms. 32-bit x86 was affected when settingIGRAPH_INTEGER_SIZEto 64. igraph_subisomorphic_lad()now returns a single null map when the pattern is the null graph.igraph_community_spinglass()now checks its parameters more carefully.igraph_similarity_dice_pairs()andigraph_similarity_jaccard_pairs()now validate vertex IDs.igraph_maxflow()now returns an error code if the source and target vertices are the same. It used to get stuck in an infinite loop in earlier versions when theflowargument was non-NULL.
- C
Published by ntamas over 2 years ago
igraph - igraph 0.10.7
Added
igraph_radius_dijkstra()computes the graph radius with weighted edges (experimental function).igraph_graph_center_dijkstra()computes the graph center, i.e. the set of minimum eccentricity vertices, with weighted edges (experimental function).
Fixed
igraph_full_bipartite()now checks for overflow.igraph_bipartite_game_gnm()andigraph_bipartite_game_gnp()are now more robust to overflow.- Bipartite graph creation functions now check input arguments.
igraph_write_graph_dot()now quotes real numbers written in exponential notation as necessary.- Independent vertex set finding functions could trigger the fatal error "Finally stack too large" when called on large graphs.
Deprecated
igraph_bipartite_game()is now deprecated; useigraph_bipartite_game_gnm()andigraph_bipartite_game_gnp()instead.
Other
- Documentation improvements.
- C
Published by ntamas over 2 years ago
igraph - igraph 0.10.6
Fixed
- Compatibility with libxml2 2.11.
- Fixed some converge failures in
igraph_community_voronoi(). IGRAPH_CALLOC()andIGRAPH_REALLOC()now check for overflow.- CMake packages created with the
installtarget of the CMake build system are now relocatable, i.e. the generatedigraph-targets.cmakefile does not contain absolute paths any more.
- C
Published by ntamas over 2 years ago
igraph - igraph 0.10.5
Added
igraph_graph_power()computes the kth power of a graph (experimental function).igraph_community_voronoi()for detecting communities using Voronoi partitioning (experimental function).
Changes
igraph_community_walktrap()no longer requiresmodularityandmergesto be non-NULL whenmembershipis non-NULL.igraph_isomorphic()now supports multigraphs.- Shortest path related functions now consistently ignore edges with positive infinite weights.
Fixed
igraph_hub_and_authority_scores(),igraph_hub_score()andigraph_authority_score()considered self-loops only once on the diagonal of the adjacency matrix of undirected graphs, thus the result was not identical to that obtained byigraph_eigenvector_centrality()on loopy undirected graphs. This is now corrected.igraph_community_infomap()now checks edge and vertex weights for validity.igraph_minimum_spanning_tree()andigraph_minimum_spanning_tree_prim()now check that edge weights are not NaN.- Fixed an initialization error in the string attribute combiner of the C attribute handler.
- Fixed an issue with the weighted clique number calculation when all the weights were the same.
- HRG functions now require a graph with at least 3 vertices; previous versions crashed with smaller graphs.
igraph_arpack_rssolve()andigraph_arpack_rnsolve(), i.e. the ARPACK interface in igraph, are now interruptible. As a result, several other functions that rely on ARPACK (eigenvector centrality, hub and authority scores, etc.) also became interruptible.igraph_get_shortest_paths_dijkstra(),igraph_get_all_shortest_paths_dijkstra()andigraph_get_shortest_paths_bellman_ford()now validate thefromvertex.- Fixed bugs in
igraph_local_scan_1_ecount()for weighted undirected graphs which would miscount loops and multi-edges.
Deprecated
igraph_automorphisms()is now deprecated; its new name isigraph_count_automorphisms(). The old name is kept available until at least igraph 0.11.igraph_hub_score()andigraph_authority_score()are now deprecated. Useigraph_hub_and_authority_scores()instead.igraph_get_incidence()is now deprecated; its new name isigraph_get_biadjacency()to reflect that the returned matrix is an adjacency matrix between pairs of vertices and not an incidence matrix between vertices and edges. The new name is kept available until at least igraph 0.11. We plan to re-use the name in later versions to provide a proper incidence matrix where the rows are vertices and the columns are edges.igraph_hrg_dendrogram()is deprecated because it requires an attribute handler and it goes against the convention of returning attributes in vectors where possible. Useigraph_from_hrg_dendrogram()instead, which constructs the dendrogram as an igraph graph and returns the associated probabilities in a vector.
Other
- Improved performance for
igraph_vertex_connectivity(). igraph_simplify()makes use of the cache, and avoids simplification when the graph is already known to be simple.- Documentation improvements.
- C
Published by ntamas over 2 years ago
igraph - igraph 0.10.4
Added
igraph_get_shortest_path_astar()finds a shortest path with the A* algorithm.igraph_vertex_coloring_greedy()now supports the DSatur heuristics (#2284, thanks to @professorcode1).
Changed
- The
testbuild target now only runs the unit tests, but it does not build them. In order to both build and run tests, use thechecktarget, which continues to behave as before (PR #2291). - The experimental function
igraph_distances_floyd_warshall()now hasfromandtoparameters for choosing source and target vertices. - The experimental function
igraph_distances_floyd_warshall()now has an additionalmethodparameter to select a specific algorithm. A faster "Tree" variant of the Floyd-Warshall algorithm is now available (#2267, thanks to @rfulekjames).
Fixed
- The Bellman-Ford shortest path finder is now interruptible.
- The Floyd-Warshall shortest path finder is now interruptible.
- Running CTest no longer builds the tests automatically, as this interfered with VSCode, which would invoke the
ctestexecutable after configuring a project in order to determine test executables. Use thebuild_teststarget to build the tests first, or use thechecktarget to both build and run all unit tests (PR #2291).
Other
- Improved the performance and memory usage of
igraph_widest_path_widths_floyd_warshall(). - Documentation improvements.
- C
Published by ntamas about 3 years ago
igraph - igraph 0.10.3
Added
igraph_matrix_init_array()to initialize an igraph matrix by copying an existing C array in column-major or row-major order.igraph_layout_umap_compute_weights()computes weights for the UMAP layout algorithm from distances. This used to be part ofigraph_layout_umap(), but it is now in a separate function to allow the user to experiment with different weighting schemes.igraph_triangular_lattice()to generate triangular lattices of various kinds (#2235, thanks to @rfulekjames).igraph_hexagonal_lattice()to generate hexagonal lattices of various kinds (#2262, thanks to @rfulekjames).igraph_tree_from_parent_vector()to create a tree or a forest from a parent vector (i.e. a vector that encodes the parent vertex of each vertex).igraph_induced_subgraph_edges()produces the IDs of edges contained within a subgraph induced by the given vertices.
Changed
- The signature of the experimental
igraph_layout_umap()function changed; the last argument is now a Boolean that specifies whether distances should already be treated as weights, and the sampling probability argument was removed.
Fixed
igraph_transitivity_barrat(),igraph_community_fluid_communities(),igraph_sir(),igraph_trussness()and graphlet functions did not correctly detect when a directed input graph had effective multi-edges due to ignoring edge directions. Such graphs are now rejected by these functions.- Fixed a bug in
igraph_2dgrid_move()that sometimes crashed the Large Graph Layout function when a grid cell became empty. igraph_pagerank()andigraph_personalized_pagerank()would fail to converge when the ARPACK implementation was used and a vertex had more than one outgoing edge but all these edges had zero weights.igraph_pagerank()andigraph_personalized_pagerank()no longer allow negative weights. Previously, edges with negative weights were silently ignored when using the PRPACK implementation. The ARPACK implementation would issue a warning saying that they are ignored, but in fact it computed an incorrect result.igraph_all_st_cuts()andigraph_all_st_mincuts()no longer trigger the "Finally stack too large" fatal error when called on certain large graphs. This was a regression in igraph 0.10.igraph_community_label_propagation()no longer rounds weights to integers. This was a regression in igraph 0.10.igraph_read_graph_graphdb()does more thorough checks on the input file.igraph_calloc()did not zero-initialize the allocated memory. This is now corrected. Note that the macroIGRAPH_CALLOC()was not affected.- Fixed new warnings issued by the Xcode 14.1 toolchain.
Deprecated
igraph_subgraph_edges()is now deprecated to avoid confusion withigraph_induced_subgraph_edges(); its new name isigraph_subgraph_from_edges(). The old name is kept available until at least igraph 0.11.
Other
- Significantly improved performance for
igraph_matrix_transpose(). - Documentation improvements.
- C
Published by ntamas about 3 years ago
igraph - igraph 0.10.2
Added
igraph_distances_cutoff()andigraph_distances_dijkstra_cutoff()calculate shortest paths with an upper limit on the path length (experimental functions).igraph_distances_floyd_warshall()for computing all-pairs shortest path lengths in dense graphs (experimental function).igraph_ecc()computes the edge clustering coefficient of some edges (experimental function).igraph_voronoi()computes a Voronoi partitioning of vertices (experimental function).igraph_count_multiple_1()determines the multiplicity of a single edge in the graph.igraph_dqueue_get()accesses an element in a queue by index.igraph_degree_1()efficiently retrieves the degee of a single vertex.igraph_lazy_adjlist_has()andigraph_lazy_inclist_has()to check if adjacent vertices / incident edges have already been computed and stored for a given vertex in a lazy adjlist / inclist.
Changed
igraph_edge()now verifies that the input edge ID is valid.igraph_community_leading_eigenvector(),igraph_adjacency_spectral_embedding(),igraph_laplacian_spectral_embedding(),igraph_arpack_rssolve()andigraph_arpack_rnsolve()now generate a random starting vector using igraph's own RNG if needed instead of relying on LAPACK or ARPACK to do so. This makes sure that the results obtained from these functions remain the same if igraph's RNG is seeded with the same value.igraph_community_leading_eigenvector()does not stop the splitting process any more when there are multiple equally likely splits (indicated by the multiplicity of the leading eigenvector being larger than 1). The algorithm picks an arbitrary split instead and proceeds normally.
Fixed
- Fixed a bug in
igraph_get_k_shortest_paths()that sometimes yielded incorrect results on undirected graphs when themodeargument was set toIGRAPH_OUTorIGRAPH_IN. igraph_trussness()is now interruptible.igraph_spanner()is now interruptible.igraph_layout_umap()andigraph_layout_umap3d()are now interruptible.- In some rare cases, roundoff errors would cause
igraph_distance_johnson()to fail on graphs with negative weights. igraph_eulerian_cycle()andigraph_eulerian_path()now returns a more specific error code (IGRAPH_ENOSOL) when the graph contains no Eulerian cycle or path.igraph_heap_init_array()did not copy the array data correctly for non-real specializations.igraph_layout_umap_3d()now actually uses three dimensions.igraph_layout_umap()andigraph_layout_umap_3d()are now interruptible.igraph_vit_create()andigraph_eit_create()no longer fails when trying to create an iterator for the null graph or edgeless graph from an empty range-based vertex or edge selector.igraph_write_graph_leda()did not correctly print attribute names in some warning messages.- Addressed new warnings introduced by Clang 15.
- In the generated pkg-config file, libxml2 is now placed in the
Requires.privatesection instead of theLibs.privateone.
Removed
- Removed unused and undocumented
igraph_bfgs()function. - Removed the undocumented function
igraph_complex_mod(). Useigraph_complex_abs()instead, as it has identical functionality.
Deprecated
- The
IGRAPH_EDRLerror code was deprecated; the DrL algorithm now returnsIGRAPH_FAILUREwhen it used to returnIGRAPH_EDRL(not likely to happen in practice). - The undocumented function
igraph_dqueue_e()is now deprecated and replaced byigraph_dqueue_get(). igraph_finite(),igraph_is_nan(),igraph_is_inf(),igraph_is_posinf()andigraph_is_neginf()are now deprecated. They were relics from a time when no standard alternatives existed. Use the C99 standardisfinite(),isnan()andisinf()instead.
- C
Published by ntamas over 3 years ago
igraph - igraph 0.10.1
Fixed
- Corrected a regression (compared to igraph 0.9) in weighted clique search functions.
igraph_girth()no longer fails when the graph has no cycles and thegirthparameter is set toNULL.igraph_write_graph_gml()did not respect entity encoding options when writing theCreatorline.- Fixed potential memory leak on out-of-memory condition in
igraph_asymmetric_preference_game(),igraph_vs_copy()andigraph_es_copy(). - Fixed an assertion failure in
igraph_barabasi_game()andigraph_barabasi_aging_game()when passing in negative degree exponents. - Fixed a compilation failure with some old Clang versions.
Changes
igraph_write_graph_leda()can now write boolean attributes.
Other
- Support for ARM64 on Windows.
- Documentation improvements.
- C
Published by ntamas over 3 years ago
igraph - igraph 0.10.0
This release focuses on infrastructural improvements, stability, and making the igraph interface more consistent, more predictable and easier to use. It contains many API-breaking changes and function renamings, in preparation for a future 1.0 release, at which point the API will become stable. Changes in this direction are likely to continue through a 0.11 release. It is recommended that you migrate your code from 0.9 to 0.10 soon, to make the eventual transition to 1.0 easier.
Some of the highlights are:
- A consistent use of
igraph_integer_tfor all indices and most integer quantities, both in the API and internally. This type is 64-bit by default on all 64-bit systems, bringing support for very large graphs with more than 2 billion vertices. Previously, vertex and edge indices were often represented asigraph_real_t. The move to anigraph_integer_talso implies a change fromigraph_vector_ttoigraph_vector_int_tin many functions. - The random number generation framework has been overhauled. Sampling from the full range of
igraph_integer_tis now possible. Similarly, the sampling of random reals has been improved to utilize almost the full range of the mantissa of anigraph_real_t. - There is a new fully memory-managed container type for lists of vectors (
igraph_vector_list_t), replacing most previous uses of the non-managedigraph_vector_ptr_t. Functions that previously usedigraph_vector_ptr_tto return results and relied on the user to manage memory appropriately are now usingigraph_vector_list_t,igraph_graph_list_tor similar and manage memory on their own. - Some simple graph properties, such as whether a graph contains self-loops or multi-edges, or whether it is connected, are now cached in the graph data structure. Querying these properties for a second time will take constant computational time. The
igraph_invalidate_cache()function is provided for debugging purposes. It will invaidate all cache entries. - File format readers are much more robust and more tolerant of invalid input.
- igraph is much more resilient to overflow errors.
- Many improvements to robustness and reliability, made possible by internal refactorings.
Breaking changes
- igraph now requires CMake 3.18 or later.
- In order to facilitate the usage of graphs with more than 2 billion vertices and edges, we have made the size of the
igraph_integer_tdata type to be 32 bits on 32-bit platforms and 64 bits on 64-bit platforms by default. You also have the option to compile a 32-bit igraph variant on a 64-bit platform by changing theIGRAPH_INTEGER_SIZEbuild variable in CMake to 32. igraph_bool_tis now a C99booland not anint. Similarly,igraph_vector_bool_tnow consumessizeof(bool)bytes per entry only, notsizeof(int). The standard constantstrueandfalsemay be used for Boolean values for readability.- The random number generator interface,
igraph_rng_type_t, has been overhauled. Check the declaration of the type for details. - The default random number generator has been changed from Mersenne Twister to PCG32.
- Functions related to spectral coarse graining (i.e. all functions starting with
igraph_scg_...) were separated into a project of its own. If you wish to keep on using these functions, please refer to the repository hosting the spectral coarse graining code at https://github.com/igraph/igraph-scg . The spectral coarse graining code was updated to support igraph 0.10. - Since
igraph_integer_taims to be the largest integer size that is feasible on a particular platform, there is no need for generic data types based onlong intany more. Thelongvariants of generic data types (e.g.,igraph_vector_long_t) are therefore removed; you should use the correspondingintvariant instead, whose elements are of typeigraph_integer_t. - Generic data types based on
floatwere removed as they were not used anywhere in the library. - Several igraph functions that used to take a
long intor return along intnow takes or returns anigraph_integer_tinstead to make the APIs more consistent. Similarly, igraph functions that usedigraph_vector_tfor arguments that take or return integral vectors (e.g., vertex or edge indices) now takeigraph_vector_int_tinstead. Graph-related functions where the API was changed due to this reason are listed below, one by one. - Similarly, igraph functions that used to accept the
longvariant of a generic igraph data type (e.g.,igraph_vector_long_t) now take theintvariant of the same data type. - The type
igraph_stack_ptr_tand its associated functions were removed. Useigraph_vector_ptr_tand associated functions instead. - Error handlers should no longer perform a
longjmp(). Doing so will introduce memory leaks, as resource cleanup is now done in multiple stages, through multiple calls to the error handler. Thus, the error handler should either abort execution immediately (as the default handler does), or report the error, callIGRAPH_FINALLY_FREE(), and return normally. - Most callback functions now return an error code. In previous versions they returned a boolean value indicating whether to terminate the search. A request to stop the search is now indicated with the special return code
IGRAPH_STOP. igraph_add_edges()now uses anigraph_vector_int_tfor itsedgesparameter.igraph_adjacency()no longer accepts a negative number of edges in its adjacency matrix. When negative entries are found, an error is generated.igraph_adjacency()gained an additionalloopsargument that lets you specify whether the diagonal entries should be ignored or should be interpreted as raw edge counts or twice the number of edges (which is common in linear algebra contexts).igraph_all_minimal_st_separators()now returns the separators in anigraph_vector_int_list_tcontainingigraph_vector_int_tvectors.igraph_all_st_cuts()andigraph_all_st_mincuts()now return the cuts in anigraph_vector_int_list_tcontainingigraph_vector_int_tvectors.igraph_arpack_unpack_complex()now usesigraph_integer_tfor itsnevargument instead oflong int.igraph_articulation_points()now uses anigraph_vector_int_tto return the list of articulation points, not anigraph_vector_t.igraph_assortativity_nominal()now accepts vertex types in anigraph_vector_int_tinstead of anigraph_vector_t.igraph_asymmetric_preferennce_game()now uses anigraph_vector_int_tto return the types of the nodes in the generated graph.igraph_atlas()now usesigraph_integer_tfor itsnumberargument.igraph_automorphism_group()now returns the generators in anigraph_vector_int_list_tinstead of a pointer vector containingigraph_vector_tobjects.igraph_barabasi_game(),igraph_barabasi_aging_game(),igraph_recent_degree_game()andigraph_recent_degree_aging_game()now use anigraph_vector_int_tfor the out-degree sequence of the nodes being generated instead of anigraph_vector_t.igraph_bfs()now takes anigraph_vector_int_tfor itsroots,restricted,order,father,pred,succanddistarguments instead of anigraph_vector_t.igraph_bfs_simple()now takesigraph_vector_int_tfor itsvids,layersandparentsarguments instead of anigraph_vector_t.igraph_bfs_simple()now returns -1 inparentsfor the root node of the traversal, and -2 for unreachable vertices. This is now consistent with other functions that return a parent vector.igraph_biconnected_components()now uses anigraph_vector_int_tto return the list of articulation points, not anigraph_vector_t. Also, the container used for the edges and vertices of the components is now anigraph_vector_int_list_tinstead of a pointer vector containingigraph_vector_tobjects.igraph_bipartite_projection()now usesigraph_vector_int_tto returnmultiplicity1andmultiplicity2, notigraph_vector_t.igraph_bridges()now uses anigraph_vector_int_tto return the list of bridges, not anigraph_vector_t.igraph_callaway_traits_game()returns the node types in anigraph_vector_int_tinstead of anigraph_vector_t.igraph_canonical_permutation()now uses anigraph_vector_int_tfor its labeling parameter.igraph_cattribute_list()now usesigraph_vector_int_tto returngtypes,vtypesandetypes.igraph_cited_type_game()now uses anigraph_vector_int_tfor its types parameter.igraph_citing_cited_type_game()now uses anigraph_vector_int_tfor its types parameter.igraph_clique_handler_tnow uses anigraph_vector_int_tfor itscliqueparameter, and must return anigraph_error_t. UseIGRAPH_STOPas the return code to terminate the search prematurely. The vector that the handler receives is owned by the clique search routine. If you want to hold on to the vector for a longer period of time, you need to make a copy of it in the handler. Cliques passed to the callback are marked asconstas a reminder to this change.- The
resparameter ofigraph_cliques()is now anigraph_vector_int_list_t. - Callbacks used by
igraph_cliques_callback()need to be updated to account for the fact that the callback does not own the clique passed to it any more; the callback needs to make a copy if it wants to hold on to the clique for a longer period of time. If the callback does not need to store the clique, it does not need to do anything any more, and it must not destroy or free the clique. igraph_closeness()andigraph_closeness_cutoff()now use anigraph_vector_int_tto returnreachable_count, not anigraph_vector_t.igraph_cohesive_blocks()now uses anigraph_vector_int_tto return the mapping from block indices to parent block indices, and thecohesion; also, it uses anigraph_vector_int_list_tto return the blocks themselves instead of a pointer vector ofigraph_vector_t.- The
igraph_community_eb_get_merges()bridges parameter now starts the indices into the edge removal vector at 0, not 1. - The
igraph_community_eb_get_merges()now reports an error when not all edges in the graph are removed, instead of a nonsensical result. igraph_community_edge_betweenness()now uses anigraph_vector_int_tto return the edge IDs in the order of their removal as well as the list of edge IDs whose removal broke a single component into two.igraph_community_fluid_communities()does not provide the modularity in a separate output argument any more; useigraph_modularity()to retrieve the modularity if you need it.igraph_community_infomap()now usesigraph_integer_tfor itsnb_trialsargument.igraph_community_label_propagation()now uses anigraph_vector_int_tfor itsinitialparameter. It also takes amodeargument that specifies how labels should be propagated along edges (forward, backward or ignoring edge directions).igraph_community_label_propagation()does not provide the modularity in a separate output argument any more; useigraph_modularity()to retrieve the modularity if you need it.igraph_community_leiden()has an additional parameter to indicate the number of iterations to perform (PR #2177).igraph_community_walktrap(),igraph_community_edge_betweenness(),igraph_community_eb_get_merges(),igraph_community_fastgreedy(),igraph_community_to_membership(),igraph_le_community_to_membership(),igraph_community_leading_eigenvector()now use anigraph_vector_int_tfor theirmergesparameter.igraph_community_walktrap()now usesigraph_integer_tfor itsstepsargument.igraph_coreness()now uses anigraph_vector_int_tto return the coreness values.igraph_convex_hull()now uses anigraph_vector_int_tto return the indices of the input vertices that were chosen to be in the convex hull.igraph_correlated_game()andigraph_correlated_pair_game()now take anigraph_vector_int_tas the permutation vector, not anigraph_vector_t.igraph_create()now uses anigraph_vector_int_tfor itsedgesparameter.igraph_create_bipartite()now uses anigraph_vector_int_tfor itsedgesparameter.igraph_compose()now returns the edge maps in anigraph_vector_int_tinstead of anigraph_vector_t.igraph_count_multiple()now returns the multiplicities in anigraph_vector_int_tinstead of anigraph_vector_t.igraph_decompose()now uses anigraph_integer_tfor itsmaxcompnoandminelementsarguments instead of along int.igraph_degree()now uses anigraph_vector_int_tto return the degrees. If you need the degrees in a vector containing floating-point numbers instead (e.g., because you want to pass them on to some other function that takes anigraph_vector_t), useigraph_strength()instead with a null weight vector.igraph_degree_sequence_game()now takes degree sequences represented asigraph_vector_int_tinstead ofigraph_vector_t.igraph_degseq_t, used byigraph_degree_sequence_game(), uses new names for its constants. The old names are deprecated, but retained for compatibility. Seeigraph_constants.hto see which new name corresponds to which old one.igraph_delete_vertices_idx()now usesigraph_vector_int_tvectors to return the mapping and the inverse mapping of old vertex IDs to new ones.igraph_deterministic_optimal_imitation()now expects the list of strategies in anigraph_vector_int_tinstead of anigraph_int_t.igraph_dfs()now takes anigraph_vector_int_tfor itsorder,order_out,fatheranddistarguments instead of anigraph_vector_t. Furthermore, these vectors will contain -2 for vertices that have not been visited; in earlier versions, they used to contain NaN instead. Note that -1 is still used in thefathervector to indicate the root of a DFS tree.igraph_diameter()andigraph_diameter_dijkstra()now useigraph_vector_int_tvectors to return the list of vertex and edge IDs in the diameter.igraph_dominator_tree()now takes anigraph_vector_int_tfor itsdomandleftoutarguments instead of anigraph_vector_t.igraph_dyad_census()now usesigraph_real_tinstead ofigraph_integer_tfor its output arguments, and it no longer returns -1 when overflow occurs.igraph_edges()now takes anigraph_vector_int_tfor itsedgesargument instead of anigraph_vector_t.igraph_es_multipairs()was removed; you can use the newly addedigraph_es_all_between()instead.igraph_establishment_game()now takes anigraph_vector_int_tfor itsnode_type_vecargument instead of anigraph_vector_t.igraph_eulerian_path()andigraph_eulerian_cycle()now useigraph_vector_int_tto return the list of edge and vertex IDs participating in an Eulerian path or cycle instead of anigraph_vector_t.igraph_feedback_arc_set()now uses anigraph_vector_int_tto return the IDs of the edges in the feedback arc set instead of anigraph_vector_t.igraph_get_adjacency()no longer has theeidsargument, which would produce an adjacency matrix where non-zero values were 1-based (not 0-based) edge IDs. If you need a matrix with edge IDs, create it manually.igraph_get_adjacency_sparse()now returns the sparse adjacency matrix in anigraph_sparsemat_tstructure, and it assumes that the input matrix is initialized for sake of consistency with other igraph functions.igraph_get_adjacency()andigraph_get_adjacency_sparse()now has aloopsargument that lets the user specify how loop edges should be handled.igraph_get_edgelist()now uses anigraph_vector_int_tfor itsresparameter.igraph_get_eids()now usesigraph_vector_int_tto return lists of edge IDs and to receive lists of vertex IDs.- The
pathargument ofigraph_get_eids()was removed. You can replicate the old behaviour by constructing the list of vertex IDs explicitly from the path by duplicating each vertex in the path except the first and last ones. A helper function calledigraph_expand_path_to_pairs()is provided to ease the transition. igraph_get_eids_multi()was removed as its design was fundamentally broken; there was no way to retrieve the IDs of all edges between a specific pair of vertices without knowing in advance how many such edges there are in the graph. Useigraph_get_all_eids_between()instead.igraph_get_incidence()now returns the vertex IDs corresponding to the rows and columns of the incidence matrix asigraph_vector_int_t.igraph_get_shortest_path(),igraph_get_shortest_path_bellman_ford()andigraph_get_shortest_path_dijkstra()now useigraph_vector_int_tvectors to return the list of vertex and edge IDs in the shortest path.igraph_get_shortest_paths(),igraph_get_shortest_paths_dijkstra()andigraph_get_shortest_paths_bellman_ford()now use anigraph_vector_int_tto return the predecessors and inbound edges instead of anigraph_vector_long_t.- The functions
igraph_get_all_shortest_paths(),igraph_get_all_shortest_paths_dijkstra(),igraph_get_shortest_paths(),igraph_get_shortest_paths_bellman_ford()andigraph_get_shortest_paths_dijkstra()now return paths in anigraph_vector_int_list_tinstead of a pointer vector containingigraph_vector_tobjects. - The vector of parents in
igraph_get_shortest_paths(),igraph_get_shortest_paths_bellman_ford()andigraph_get_shortest_paths_dijkstra()now use -1 to represent the starting vertex, and -2 for unreachable vertices. - The
mapsparameters inigraph_get_isomorphisms_vf2()andigraph_get_subisomorphisms_vf2()are now of typeigraph_vector_int_list_t. igraph_get_stochastic()now has an additionalweightsargument for edge weights.igraph_get_stochastic_sparse()now returns the sparse adjacency matrix in anigraph_sparsemat_tstructure, and it assumes that the input matrix is initialized for sake of consistency with other igraph functions. It also received an additionalweightsargument for edge weights.igraph_girth()now uses anigraph_vector_int_tfor itscircleparameter.igraph_girth()now usesigraph_real_tas the return value so we can return infinity for graphs with no cycles (instead of zero).- The
cliquesparameters of typeigraph_vector_ptr_tinigraph_graphlets(),igraph_graphlets_candidate_basis()andigraph_graphlets_project()were changed to anigraph_vector_int_list_t. igraph_hrg_init()andigraph_hrg_resize()now takes anigraph_integer_tas their size arguments instead of anint.igraph_hrg_consensus()now returns the parent vector in anigraph_vector_int_tinstead of anigraph_vector_t.igraph_hrg_create()now takes a vector of probabilities corresponding to the internal nodes of the dendogram. It used to also take probabilities for the leaf nodes and then ignore them.igraph_hrg_predict()now uses anigraph_vector_int_tfor itsedgesparameter.igraph_hrg_sample()now always samples a single graph only. Useigraph_hrg_sample_many()if you need more than one sample, and calligraph_hrg_fit()beforehand if you do not have a HRG model but only a single input graph.igraph_hrg_size()now returns anigraph_integer_tinstead of anint.igraph_incidence()does not accept negative incidence counts any more.igraph_incident()now uses anigraph_vector_int_tfor itseidsparameter.- The
resparameter inigraph_independent_vertex_sets()is now anigraph_vector_int_list_t. igraph_induced_subgraph_map()now usesigraph_vector_int_tvectors to return the mapping and the inverse mapping of old vertex IDs to new ones.igraph_intersection()now uses anigraph_vector_int_tfor itsedge_map1andedge_map2parameters.- The
edgemapsparameter ofigraph_intersection_many()is now anigraph_vector_int_list_tinstead of a pointer vector. igraph_is_chordal()now uses anigraph_vector_int_tfor itsalpha,alpham1andfill_inparameters.igraph_is_graphical()andigraph_is_bigraphical()now take degree sequences represented asigraph_vector_int_tinstead ofigraph_vector_t.igraph_is_matching(),igraph_is_maximal_matching()andigraph_maximum_bipartite_matchingnow use anigraph_vector_int_tto return the matching instead of anigraph_vector_long_t.igraph_is_mutual()has an additional parameter which controls whether directed self-loops are considered mutual.- The
vidsparameter forigraph_isoclass_subgraph()is now anigraph_vector_int_tinstead ofigraph_vector_t. igraph_isomorphic_vf2(),igraph_get_isomorphisms_vf2_callback()(which used to be calledigraph_isomorphic_function_vf2()) andigraph_isohandler_tnow all useigraph_vector_int_tfor theirmap12andmap21parameters.- The
cliquesparameter of typeigraph_vector_ptr_tinigraph_largest_cliques()was changed to anigraph_vector_int_list_t. - The
resparameters of typeigraph_vector_ptr_tinigraph_largest_independent_vertex_sets()andigraph_largest_weighted_cliques()were changed to anigraph_vector_int_list_t. - The dimension vector parameter for
igraph_square_lattice()(used to beigraph_lattice()) is now anigraph_vector_int_tinstead ofigraph_vector_t. - The maxiter parameter of
igraph_layout_bipartite()is now anigraph_integer_tinstead oflong int. - The fixed parameter of
igraph_layout_drl()andigraph_layout_drl_3d()was removed as it has never been implemented properly. - The width parameter of
igraph_layout_grid()is now anigraph_integer_tinstead oflong int. - The width and height parameters of
igraph_layout_grid_3d()are nowigraph_integer_tinstead oflong int. - The dimension parameter of
igraph_layout_mds()is now anigraph_integer_tinstead oflong int. - The
rootsandrootlevelparameters ofigraph_layout_reingold_tilford()are nowigraph_vector_int_tinstead ofigraph_vector_t. - The
rootsandrootlevelparameters ofigraph_layout_reingold_tilford_circular()are nowigraph_vector_int_tinstead ofigraph_vector_t. - The order parameter of
igraph_layout_star()is now anigraph_vector_int_tinstead of anigraph_vector_t. - The maxiter parameter of
igraph_layout_sugiyama()is now anigraph_integer_tinstead oflong int. Also, the function now uses anigraph_vector_int_tfor itsextd_to_orig_eidsparameter. - The shifts parameter of
igraph_lcf_vector()is now anigraph_vector_int_tinstead of anigraph_vector_t. igraph_matrix_minmax(),igraph_matrix_which_minmax(),igraph_matrix_which_min()andigraph_matrix_which_max()no longer return an error code. The return type is nowvoid. These functions never fail.igraph_maxflow()now uses anigraph_vector_int_tfor itscut,partitionandpartition2parameters.- The
igraph_maxflow_stats_tstruct now containsigraph_integer_tvalues instead ofintones. - The
resparameters inigraph_maximal_cliques()andigraph_maximal_cliques_subset()are now of typeigraph_vector_int_list_t. - Callbacks used by
igraph_maximal_cliques_callback()need to be updated to account for the fact that the callback does not own the clique passed to it any more; the callback needs to make a copy if it wants to hold on to the clique for a longer period of time. If the callback does not need to store the clique, it does not need to do anything any more, and it must not destroy or free the clique. - The
resparameter inigraph_maximal_independent_vertex_sets()is now anigraph_vector_int_list_t. igraph_maximum_cardinality_search()now uses anigraph_vector_int_tfor itsalphaandalpham1arguments.igraph_mincut()now uses anigraph_vector_int_tfor itscut,partitionandpartition2parameters.igraph_moran_process()now expects the list of strategies in anigraph_vector_int_tinstead of anigraph_int_t.- Motif callbacks of type
igraph_motifs_handler_tnow take anigraph_vector_int_twith the vertex IDs instead of anigraph_vector_t, and useigraph_integer_tfor the isoclass parameter. - Motif functions now use
igraph_integer_tinstead ofintfor theirsizeparameter. igraph_neighborhood_size()now uses anigraph_vector_int_tfor itsresparameter.- The
resparameter ofigraph_neighborhood()is now anigraph_vector_int_list_t. igraph_neighbors()now uses anigraph_vector_int_tfor itsneisparameter.igraph_permute_vertices()now takes anigraph_vector_int_tas the permutation vector.igraph_power_law_fit()does not calculate the p-value automatically any more because the previous estimation method did not match the results from the original paper of Clauset, Shalizi and Newman (2009) and the implementation of the method outlined in the paper runs slower than the previous naive estimate. A separate function namedigraph_plfit_result_calculate_p_value()is now provided for calculating the p-value. The automatic selection of thex_mincutoff also uses a different method than earlier versions. As a consequence, results might be slightly different if you used tests where thex_mincutoff was selected automatically. The new behaviour is now consistent with the defaults of the underlyingplfitlibrary.igraph_preference_game()now uses anigraph_vector_int_tto return the types of the nodes in the generated graph.igraph_random_walk()now uses anigraph_vector_int_tfor its results. Also, the function now takes both vertices and edges as parameters. It can return IDs of vertices and/or edges on the walk. The function now takes weights as a parameter to support weighted graphs.igraph_random_edge_walk()now uses anigraph_vector_int_tfor itsedgewalkparameter.igraph_read_graph_dimacs_flow()now uses anigraph_vector_int_tfor its label parameter.igraph_read_graph_graphml()now usesigraph_integer_tfor itsindexargument.igraph_read_graph_pajek()now creates a Booleantypeattribute for bipartite graphs. Previously it created a numeric attribute.igraph_realize_degree_sequence()now uses anigraph_vector_int_tfor itsoutdegandindegparameters.igraph_reindex_membership()now uses anigraph_vector_int_tfor itsnew_to_oldparameter.igraph_rng_seed()now requires anigraph_uint_tas its seed arguments. RNG implementations are free to use only the lower bits of the seed if they do not support 64-bit seeds.igraph_rngtype_rand(i.e. the RNG that is based on BSDrand()) was removed due to poor statistical properties that sometimes resulted in weird artifacts like all-even "random" numbers when igraph's usage patterns happened to line up with the shortcomings of therand()generator in a certain way.igraph_roulette_wheel_imitation()now expects the list of strategies in anigraph_vector_int_tinstead of anigraph_int_t.igraph_similarity_dice_pairs()now uses anigraph_vector_int_tfor itspairsparameter.igraph_similarity_jaccard_pairs()now uses anigraph_vector_int_tfor itspairsparameter.igraph_simple_interconnected_islands_game()does not generate multi-edges between islands any more.igraph_sort_vertex_ids_by_degree()andigraph_topological_sorting()now use anigraph_vector_int_tto return the vertex IDs instead of anigraph_vector_t.igraph_spanning_tree(),igraph_minimum_spanning_tree()andigraph_random_spanning_tree()now all use anigraph_vector_int_tto return the vector of edge IDs in the spanning tree instead of anigraph_vector_t.igraph_sparsemat_cholsol(),igraph_sparsemat_lusol(),igraph_sparsemat_symbqr()andigraph_sparsemat_symblu()now take anigraph_integer_tas theirorderparameter.igraph_sparsemat_count_nonzero()andigraph_sparsemat_count_nonzerotol()now return anigraph_integer_t.igraph_sparsemat_is_symmetric()now returns an error code and the result itself is provided in an output argument.- The
valuesargument ofigraph_sparsemat_transpose()was removed; now the function always copies the values over to the transposed matrix. igraph_spmatrix_tand related functions were removed as they mostly duplicated functionality that was already present inigraph_sparsemat_t. Functions that usedigraph_spmatrix_tin the library now useigraph_sparsemat_t.igraph_stochastic_imitation()now expects the list of strategies in anigraph_vector_int_tinstead of anigraph_int_t.igraph_st_mincut()now uses anigraph_vector_int_tfor itscut,partitionandpartition2parameters.igraph_st_vertex_connectivity()now ignores edges between source and target forIGRAPH_VCONN_NEI_IGNOREigraph_strvector_get()now returns strings in the return value, not in an output argument.igraph_subcomponent()now uses anigraph_integer_tfor the seed vertex instead of anigraph_real_t. It also uses anigraph_vector_int_tto return the list of vertices in the same component as the seed vertex instead of anigraph_vector_t.igraph_subisomorphic_vf2(),igraph_get_subisomorphisms_vf2_callback()(which used to be calledigraph_subisomorphic_function_vf2()) andigraph_isomorphic_bliss()now all useigraph_vector_int_tfor theirmap12andmap21parameters.- The
mapsparameters inigraph_subisomorphic_lad(),igraph_get_isomorphisms_vf2()andigraph_get_subisomorphisms_vf2()are now of typeigraph_vector_int_list_t. igraph_subisomorphic_lad()now uses anigraph_vector_int_tfor itsmapparameter. Also, itsdomainsparameter is now anigraph_vector_int_list_tinstead of a pointer vector containingigraph_vector_tobjects.igraph_unfold_tree()now uses anigraph_vector_int_tfor itsvertex_indexandrootsparameters.igraph_union()now uses anigraph_vector_int_tfor itsedge_map1andedge_map2parameters.- The
edgemapsparameter ofigraph_union_many()is now anigraph_vector_int_list_tinstead of a pointer vector. igraph_vector_init_copy()was refactored to take another vector that the newly initialized vector should copy. The old array-based initialization function is now calledigraph_vector_init_array().igraph_vector_ptr_init_copy()was renamed toigraph_vector_ptr_init_array()for sake of consistency.igraph_vs_vector(),igraph_vss_vector()andigraph_vs_vector_copy()now all take anigraph_vector_int_tas the vector of vertex IDs, not anigraph_vector_t. Similarly,igraph_vs_as_vector()now returns the vector of matched vertex IDs in anigraph_vector_int_t, not anigraph_vector_t.- The
resparameter ofigraph_weighted_cliques()is now anigraph_vector_int_list_t. igraph_write_graph_dimacs_flow()now usesigraph_integer_tfor the source and target vertex index instead of along int.igraph_vector_*(),igraph_matrix_*(),igraph_stack_*(),igraph_array_*()and several other generic igraph data types now useigraph_integer_tfor indexing, notlong int. Please refer to the headers for the exact details; the list of affected functions is too large to include here.igraph_vector_minmax()andigraph_vector_which_minmax()no longer return an error code. The return type is nowvoid. These functions never fail.igraph_vector_order()was removed; useigraph_vector_int_pair_order()instead. (The original function worked for vectors containing integers only).igraph_vector_resize_min()andigraph_matrix_resize_min()no longer return an error code (return type is nowvoid). The vector or matrix is always left in a consistent state by these functions, with all data intact, even if releasing unused storage is not successful.igraph_vector_qsort_ind()and its variants now take anigraph_order_tenum instead of a boolean to denote whether the order should be ascending or descending.igraph_weighted_adjacency()now returns the weights in a separate vector instead of storing it in a vertex attribute. The reason is twofold: first, the previous solution worked only with the C attribute handler (not the ones from the higher-level interfaces), and second, it wasn't consistent with other igraph functions that use weights provided as separate arguments.- The
loopsargument ofigraph_weighted_adjacency()was converted to anigraph_loops_tfor sake of consistency withigraph_adjacency()andigraph_get_adjacency(). igraph_write_graph_gml()takes an additional bitfield parameter controlling some aspects of writing the GML file.- The
add_edges()function in the attribute handler now takes anigraph_vector_int_tfor itsedgesparameter instead of anigraph_vector_t. Theadd_vertices()function now takes anigraph_integer_tfor the vertex count instead of along int. Thecombine_vertices()andcombine_edges()functions now take anigraph_vector_ptr_tcontaining vectors of typeigraph_vector_int_tin theirmergesparameters. Theget_info()function now usesigraph_vector_int_tto return the types of the graph, vertex and edge attribute types. Thepermute_vertices()andpermute_edges()functions in the attribute handler tables now take anigraph_vector_int_tinstead of anigraph_vector_tfor the index vectors. These are relevant only to maintainers of higher level interfaces to igraph; they should update their attribute handlers accordingly. - igraph functions that interface with external libraries such as BLAS or LAPACK may now fail if the underlying BLAS or LAPACK implementation cannot handle the size of input vectors or matrices (BLAS and LAPACK are usually limited to vectors whose size fits in an
int).igraph_blas_dgemv()andigraph_blas_dgemv_array()thus now return anigraph_error_t, which may be set toIGRAPH_EOVERFLOWif the input vectors or matrices are too large. - Functions that used an
igraph_vector_tto represent cluster size and cluster membership now use anigraph_vector_int_tinstead. These are:igraph_connected_components()(used to beigraph_clusters()in 0.9 and before)igraph_community_eb_get_merges()igraph_community_edge_betweenness()igraph_community_fastgreedy()igraph_community_fluid_communities()igraph_community_infomap()igraph_community_label_propagation()igraph_community_leading_eigenvector()igraph_community_leiden()igraph_community_multilevel()igraph_community_optimal_modularity()igraph_community_spinglass()igraph_community_spinglass_single()igraph_community_to_membership()igraph_community_walktrap()igraph_compare_communities()igraph_le_community_to_membership()igraph_modularity()igraph_reindex_membership()igraph_split_join_distance()igraph_community_multilevel()additionally uses aigraph_matrix_int_tinstead ofigraph_matrix_t()for its memberships parameter.
IGRAPH_TOTALwas removed from theigraph_neimode_tenum; use the equivalentIGRAPH_ALLinstead.
Added
- A new integer type,
igraph_uint_thas been added. This is the unsigned pair ofigraph_integer_tand they are always consistent in size. - A new container type,
igraph_vector_list_thas been added, replacing most uses ofigraph_vector_ptr_tin the API where it was used to hold a variable-length list of vectors. The type containsigraph_vector_tobjects, and it is fully memory managed (i.e. its contents do not need to be allocated and destroyed manually). There is also a variant namedigraph_vector_int_list_tfor vectors ofigraph_vector_int_tobjects. - A new container type,
igraph_matrix_list_thas been added, replacing most uses ofigraph_vector_ptr_tin the API where it was used to hold a variable-length list of matrices. The type containsigraph_matrix_tobjects, and it is fully memory managed (i.e. its contents do not need to be allocated and destroyed manually). - A new container type,
igraph_graph_list_thas been added, replacing most uses ofigraph_vector_ptr_tin the API where it was used to hold a variable-length list of graphs. The type containsigraph_tobjects, and it is fully memory managed (i.e. its contents do not need to be allocated and destroyed manually). - The vector container type,
igraph_vector_t, has been extended with a new variant whose functions all start withigraph_vector_fortran_int_.... This vector container can be used for interfacing with Fortran code as it guarantees that the integers in the vector are compatible with Fortran integers. Note thatigraph_vector_int_tis not suitable any more, as the elements ofigraph_vector_int_tare of typeigraph_integer_t, whose size may differ on 32-bit and 64-bit platforms, depending on how igraph was compiled. igraph_adjlist_init_from_inclist()to create an adjacency list from an already existing incidence list by resolving edge IDs to their corresponding endpoints. This function is useful for algorithms when both an adjacency and an incidence list is needed and they should be in the same order.igraph_almost_equals()andigraph_cmp_epsilon()to compare floating point numbers with a relative tolerance.igraph_betweenness_subset()andigraph_edge_betweenness_subset()calculates betweenness and edge betweenness scores using shortest paths between a subset of vertices only (#1711, thanks to @guyroznb)igraph_blas_dgemm()to multiply two matrices.igraph_calloc()andigraph_realloc()are now publicly exposed; these functions provide variants ofcalloc()andrealloc()that can safely be deallocated within igraph functions.igraph_circulant()to create circulant graphs (#1856, thanks to @Gomango999).igraph_complex_almost_equals()to compare complex numbers with a relative tolerance.igraph_eccentricity_dijkstra()finds the longest weighted path length among all shortest paths between a set of vertices.igraph_enter_safelocale()andigraph_exit_safelocale()for temporarily setting the locale to C. Foreign format readers and writers require a locale which uses a decimal point instead of decimal comma.igraph_es_all_between()to create an edge selector that selects all edges between a pair of vertices.igraph_full_multipartite()generates full multipartite graphs (a generalization of bipartite graphs to multiple groups).igraph_fundamental_cycles()computes a fundamental cycle basis (experimental).igraph_generalized_petersen()to create generalized Petersen graphs (#1844, thanks to @alexsyou).igraph_get_all_eids_between()returns the IDs of all edges between a pair of vertices.igraph_get_k_shortest_paths()finds the k shortest paths between a source and a target vertex.igraph_get_laplacian()andigraph_get_laplacian_sparse()return the Laplacian matrix of the graph as a dense or sparse matrix, with various kinds of normalizations. They replace the now-deprecatedigraph_laplacian()function. This makes the API consistent withigraph_get_adjacency()andigraph_get_adjacency_sparse().igraph_get_widest_path(),igraph_get_widest_paths(),igraph_widest_path_widths_dijkstra()andigraph_widest_path_widths_floyd_warshall()to find widest paths (#1893, thanks to @Gomango999).igraph_graph_center()finds the central vertices of the graph. The central vertices are the ones having a minimum eccentricity (PR #2084, thanks to @pradkrish).igraph_graph_count()returns the number of unlabelled graphs on a given number of vertices. It is meant to find the maximum isoclass value.igraph_has_mutual()checks if a directed graph has any mutual edges.igraph_heap_clear()andigraph_heap_min_clear()remove all elements from anigraph_heap_tor anigraph_heap_min_t, respectively.igraph_invalidate_cache()invalidates all cached graph properties, forcing their recomputation next time they are requested. This function should not be needed in everyday usage, but may be useful in debugging and benchmarking.igraph_is_forest()to check whether a graph is a forest (#1888, thanks to @rohitt28).igraph_is_acyclic()to check whether a graph is acyclic (#1945, thanks to @borsgeorgica).igraph_is_perfect()to check whether a graph is a perfect graph (#1730, thanks to @guyroznb).igraph_hub_and_authority_scores()calculates the hub and authority scores of a graph as a matching pair.igraph_layout_umap()andigraph_layout_umap_3d()to lay out a graph in 2D or 3D space using the UMAP dimensionality reduction algorithm.igraph_local_scan_subset_ecount()counts the number of edges in induced sugraphs from a subset of vertices.igraph_matrix_view_from_vector()allows interpreting the data stored in a vector as a matrix of the specified size.igraph_minimum_cycle_basis()computes an unweighted minimum cycle basis (experimental).igraph_pseudo_diameter()andigraph_pseudo_diameter_dijkstra()to determine a lower bound for the diameter of a graph (unweighted or weighted).igraph_regular_tree()creates a regular tree where all internal vertices have the same total degree.igraph_rngtype_pcg32andigraph_rngtype_pcg64implement 32-bit and 64-bit variants of the PCG random number generator.igraph_rng_get_pois()generates random variates from the Poisson distribution.igraph_roots_for_tree_layout()computes a set of roots suitable for a nice tree layout.igraph_spanner()calculates a spanner of a graph with a given stretch factor (#1752, thanks to @guyroznb)igraph_sparse_adjacency()andigraph_sparse_weighted_adjacency()constructs graphs from (weighted) sparse matrices.igraph_sparsemat_get()to retrieve a single element of a sparse matrix.igraph_sparsemat_normalize_rows()andigraph_sparsemat_normalize_cols()to normalize sparse matrices row-wise or column-wise.igraph_stack_capacity()to query the capacity of a stack.igraph_strvector_capacity()returns the maximum number of strings that can be stored in a string vector without reallocating the memory block holding the pointers to the individual strings.igraph_strvector_merge()moves all strings from one string vectors to the end of another without re-allocating them.igraph_strvector_push_back_len()adds a new string to the end of a string vector and allows the user to specify the length of the string being added.igraph_strvector_reserve()reserves space for a given number of string pointers in a string vector.igraph_symmetric_tree()to create a tree with the specified number of branches at each level (#1859, thanks to @YuliYudith and @DoruntinaM).igraph_trussness()calculates the trussness of each edge in the graph (#1034, thanks to @alexperrone)igraph_turan()generates Turán graphs (#2088, thanks to @pradkrish)igraph_vector_all_almost_e(),igraph_vector_complex_all_almost_e(),igraph_matrix_all_almost_e(),igraph_matrix_complex_all_almost_e()for elementwise comparisons of floating point vector and matrices with a relative tolerance.igraph_vector_complex_zapsmall()andigraph_matrix_complex_zapsmall()for replacing small components of complex vector or matrix elements with exact zeros.igraph_vector_lex_cmp_untyped()andigraph_vector_colex_cmp_untyped()for lexicographic and colexicographic comparison of vectors, similarly toigraph_vector_lex_cmp()andigraph_vector_colex_cmp(). The difference between the two variants is that the untyped versions declare the vectors asconst void*, making the functions suitable as comparators forqsort().igraph_vector_permute()functions to permute a vector based on an index vector.igraph_vector_ptr_sort_ind()to obtain an index vector that would sort a vector of pointers based on some comparison function.igraph_vector_range()to fill an existing vector with a range of increasing numbers.igraph_vector_remove_fast()functions to remove an item from a vector by swapping it with the last element and then popping it off. It allows one to remove an item from a vector in constant time if the order of items does not matter.igraph_vertex_path_from_edge_path()converts a sequence of edge IDs representing a path to an equivalent sequence of vertex IDs that represent the vertices the path travelled through.igraph_vs_range(),igraph_vss_range(),igraph_es_range()andigraph_ess_range()creates vertex and edge sequences from C-style intervals (closed from the left, open from the right).igraph_wheel()to create a wheel graph (#1938, thanks to @kwofach).
Removed
igraph_adjlist_remove_duplicate(),igraph_betweenness_estimate(),igraph_closeness_estimate(),igraph_edge_betweenness_estimate(),igraph_inclist_remove_duplicate(),igraph_is_degree_sequence()andigraph_is_graphical_degree_sequence()were deprecated earlier in 0.9.0 and are now removed in this release.igraph_dnorm(),igraph_strvector_move_interval(),igraph_strvector_permdelete()andigraph_strvector_remove_negidx()were removed. These are not breaking changes as the functions were never documented, they were only exposed from one of the headers.igraph_eigen_laplacian(),igraph_es_fromto()andigraph_maximum_matching()were removed. These are not breaking changes either as the functions were never implemented, they returned an error code unconditionally.
Changed
igraph_degree_sequence_game()now supports an additional method,IGRAPH_DEGSEQ_EDGE_SWITCHING_SIMPLE, an edge-switching MCMC sampler.igraph_get_adjacency()andigraph_get_adjacency_sparse()now count loop edges twice in undirected graphs when usingIGRAPH_GET_ADJACENCY_BOTH. This is to ensure consistency withIGRAPH_GET_ADJACENCY_UPPERandIGRAPH_GET_ADJACENCY_LOWERsuch that the sum of the upper and the lower triangle matrix is equal to the full adjacency matrix even in the presence of loop edges.igraph_matrix_print()andigraph_matrix_fprint()functions now align columns when priting.igraph_read_graph_gml()now supports graph attributes (in addition to vertex and edge attributes).igraph_read_graph_gml()now uses NaN as the default numerical attribute values instead of 0.- The Pajek parser in
igraph_read_graph_pajek()is now less strict and accepts more files. igraph_ring()no longer simplifies its result when generating a one- or two-vertex graph. The one-cycle has a self-loop and the undirected two-cycle has parallel edges.igraph_vector_view()now allowsdatato beNULLin the special case whenlength == 0.igraph_version()no longer returns an error code.igraph_write_graph_gml()uses thecreatorparameter in a different way: the supplied string is now written into the Creator line as-is instead of being appended to a default value.igraph_write_graph_gml()skips writing NaN values. These two changes ensure consistent round-tripping.igraph_write_graph_gml()andigraph_read_graph_gml()now have limited support for entity encoding.igraph_write_graph_ncol()now preserves the edge ordering of the graph when writing an NCOL file.- igraph functions that take an ARPACK options object now also accept
NULLin place of an options object, and they will fall back to using a default object provided byigraph_arpack_options_get_default(). - Foreign format readers now present more informative error messages.
- The default tolerance of the zapsmall functions is now
eps^(2/3)instead ofeps^(1/2)where eps is the machine epsilon ofigraph_real_t. - It is now possible to override the uniform integer and the Poisson samplers in the random number generator interface.
Fixed
- When an error occurs during parsing DL, GML, NCOL, LGL or Pajek files, line numbers are now reported correctly.
- The GraphML parser does not print to stderr any more in case of encoding errors and other error conditions originating from the underlying
libxml2library. - The GraphML parser would omit some edges and vertices when reading files with custom attribute types, such as those produced by yEd. This is now corrected.
- The GML parser no longer mixes up Inf and NaN and -Inf now works.
- The GML parser now supports nodes with no id field.
- The GML parser now performs more stringent checks on the input file, such as verifying that
id,source,targetanddirectedfields are not duplicated. - The core data structures (vector, etc.) have overflow checks now.
- Deterministic graph generators, as well as most random ones, have overflow checks now.
- Graphs no longer lose all their attributes after calling
igraph_contract_vertices(). igraph_hrg_init()does not throw an assertion error anymore for zero vertices.igraph_matrix_complex_create()andigraph_matrix_complex_create_polar()now set their sizes correctly.igraph_random_walk()took one fewer steps than specified.igraph_sparsemat_getelements_sorted()did not sort the elements for triplet matrices correctly; this is fixed now.igraph_write_graph_gml()no longer produces corrupt output when some string attribute values contain"characters.
Deprecated
igraph_clusters()has been renamed toigraph_connected_components(); the old name is deprecated and will be removed in 0.11.igraph_complex_eq_tol()is now deprecated in favour ofigraph_complex_almost_equals().igraph_get_sparsemat()is deprecated in favour ofigraph_get_adjacency_sparse(), and will be removed in 0.11. Note thatigraph_get_adjacency_sparse()takes an initialized sparse matrix as input, unlikeigraph_get_sparsemat()which takes an uninitialized one.igraph_get_stochastic_sparsemat()is deprecated in favour ofigraph_get_stochastic_sparse(), and will be removed in 0.11. Note thatigraph_get_stochastic_sparse()takes an initialized sparse matrix as input, unlikeigraph_get_stochastic_sparsemat(), which takes an uninitialized one.igraph_isomorphic_34()has been deprecated in favour ofigraph_isomorphic(). Note thatigraph_isomorphic()calls an optimized version for directed graphs of size 3 and 4, and undirected graphs with 3-6 vertices, so there is no need for a separate function.igraph_laplacian()is now deprecated; useigraph_get_laplacian()origraph_get_laplacian_sparse()depending on whether you need a dense or a sparse matrix.igraph_lattice()has been renamed toigraph_square_lattice()to indicate that this function generates square lattices only. The old name is deprecated and will either be removed in 0.11 or will be changed to become a generic lattice generator that also supports other types of lattices.igraph_local_scan_neighborhood_ecount()is now deprecated in favour ofigraph_local_scan_subset_ecount().igraph_matrix_all_e_tol()is now deprecated in favour ofigraph_matrix_all_almost_e().igraph_matrix_copy()is now deprecated; useigraph_matrix_init_copy()instead. The new name emphasizes that the function initializes the first argument instead of expecting an already-initialized target matrix. The old name will be removed in 0.11.igraph_matrix_e()andigraph_matrix_e_ptr()have been renamed toigraph_matrix_get()andigraph_matrix_get_ptr(). The old names are deprecated and will be removed in 0.11.igraph_random_edge_walk()has been deprecated byigraph_random_walk()to support edges and/or vertices for the random walk in a single function. It will be removed in 0.11.
igraph_read_graph_dimacs()has been renamed toigraph_read_graph_dimacs_flow(); the old name is deprecated and might be re-used as a generic DIMACS reader in the future. Also, the function now usesigraph_integer_tas the source and target vertex IDs instead of along int.igraph_shortest_paths()and related functions were renamed toigraph_distances(); the old name was unfortunate because these functions calculated path lengths only and not the paths themselves. The old names are deprecated and will be removed in 0.11.igraph_sparsemat_copy(),igraph_sparsemat_diag()andigraph_sparsemat_eye()have been renamed toigraph_sparsemat_init_copy(),igraph_sparsemat_init_diag()andigraph_sparsemat_init_eye()to indicate that they initialize a new sparse matrix. The old names are deprecated and will be removed in 0.11.igraph_strvector_add()has been renamed toigraph_strvector_push_back()for sake of consistency with other vector-like data structures; the old name is deprecated and will be removed in 0.11.igraph_strvector_copy()has been renamed toigraph_strvector_init_copy()for sake of consistency with other vector-like data structures; the old name is deprecated and will be removed in 0.11.igraph_strvector_get()now returns aconst char*and not achar*to indicate that you are not supposed to modify the string in the vector directly. If you do want to modify it and you are aware of the implications (i.e. the new string must not be longer than the original one), you can cast away the constness of the return value before modifying it.igraph_strvector_set2()has been renamed toigraph_strvector_set_len(); the old name is deprecated and will be removed in 0.11.igraph_tree()has been renamed toigraph_kary_tree(); the old name is deprecated and will be removed in 0.11.igraph_vector_e()andigraph_vector_e_ptr()have been renamed toigraph_vector_get()andigraph_vector_get_ptr(). The old names are deprecated and will be removed in 0.11.igraph_vector_e_tol()is now deprecated in favour ofigraph_vector_all_almost_e().igraph_vector_copy()is now deprecated; useigraph_vector_init_copy()instead. The new name emphasizes that the function initializes the first argument instead of expecting an already-initialized target vector. The old name will be removed in 0.11.igraph_vector_init_seq()is now deprecated in favour ofigraph_vector_init_range(), which uses C-style intervals (closed from the left and open from the right).igraph_vs_seq(),igraph_vss_seq(),igraph_es_seq()andigraph_ess_seq()are now deprecated in favour ofigraph_vs_range(),igraph_vss_range(),igraph_es_range()andigraph_ess_range()because these use C-style intervals (closed from the left, open from the right).igraph_write_graph_dimacs()has been renamed toigraph_write_graph_dimacs_flow(); the old name is deprecated and might be re-used as a generic DIMACS writer in the future. Also, the function now usesigraph_integer_tas the source and target vertex IDs instead of along int.igraph_zeroin()is deprecated and will be removed in 0.11, with no replacement. The function is not graph-related and was never part of the public API.- The macros
igraph_Calloc,igraph_Reallocandigraph_Freehave been deprecated in favour ofIGRAPH_CALLOC,IGRAPH_REALLOCandIGRAPH_FREEto simplify the API. The deprecated variants will be removed in 0.11.
Other
- Documentation improvements.
- Support for Intel's LLVM-based compiler.
- C
Published by ntamas over 3 years ago
igraph - igraph 0.9.10
Added
igraph_reverse_edges()reverses the specified edges in the graph while preserving all attributes.
Changed
- The
IGRAPH_ARPACK_PRODerror code is no longer used. Instead, the specific error encountered while doing matrix multiplication is reported. - XML external entities are not resolved any more when parsing GraphML files to prevent XML external entity injection (XXE) attacks. Standard XML entities like
<or"still work.
Fixed
- Fixed incorrect results from
igraph_local_scan_1_ecount()when the graph was directed but the mode wasIGRAPH_ALLand some nodes had loop edges. See issue #2092. - Fixed incorrect counting of self-loops in
igraph_local_scan_neighborhood_ecount()when the graph was undirected. - In some rare edge cases,
igraph_pagerank()with the ARPACK method andigraph_hub_score()/igraph_authority_score()could return incorrect results. The problem could be detected by checking that the returned eigenvalue is not negative. See issue #2090. igraph_permute_vertices()now checks for out-of-range indices and duplicates in the permutation vector.igraph_create()now checks for non-finite vertex indices in the edges vector.igraph_eigenvector_centrality()would return incorrect scores when some weights were negative.igraph_es_seq()andigraph_ess_seq()did not include thetovertex in the sequence.igraph_eit_create()andigraph_vit_create()now check that all edge/vertex indices are in range when creating iterators from sequence-type selectors.igraph_grg_game()now validates its arguments.igraph_layout_drl()and its 3D version now validate their inputs.igraph_layout_kamada_kawai(),igraph_layout_fruchterman_reingold(),igraph_layout_drl(), as well as their 3D versions now check for non-positive weights.igraph_asymmetric_preference_game()interpreted itstype_dist_matrixargument incorrectly.- Fixed incorrect result of
igraph_community_spinglass()for null and singleton graphs. igraph_layout_gem()does not crash any more for graphs with only a single vertex.igraph_bridges()no longer uses recursion and thus is no longer prone to stack overflow.- Include paths of dependent packages would be specified incorrectly in some environments.
- C
Published by ntamas over 3 years ago
igraph - igraph 0.10.0-rc.2
igraph 0.10.0-rc.1, the first release candidate of igraph 0.10.0 is now available for download. We decided to go for a release candidate because there are lots of breaking changes in igraph 0.10.0 compared to previous versions, and we would like to gather some feedback from the community before going forward.
The release notes posted here summarize the changes between 0.10.0-rc.1 and 0.10.0-rc.2 only; please refer to the release notes of 0.10.0-rc.1 for a general understanding of what will change between 0.9 and 0.10 and why.
Fixed
igraph_dyad_census()now usesigraph_real_tinstead ofigraph_integer_tfor its output arguments, and it no longer returns -1 when overflow occurs.igraph_girth()now usesigraph_real_tas the return value so we can return infinity for graphs with no cycles (instead of zero).igraph_sparsemat_is_symmetric()now returns an error code and the result itself is provided in an output argument.Documentation updates and build infrastructure fixes.
- C
Published by ntamas over 3 years ago
igraph - igraph 0.10.0-rc.1
igraph 0.10.0-rc.1, the first release candidate of igraph 0.10.0 is now available for download. We decided to go for a release candidate because there are lots of breaking changes in igraph 0.10.0 compared to previous versions, and we would like to gather some feedback from the community before going forward.
This release focuses on infrastructural improvements, stability, and making the igraph interface more consistent, more predictable and easier to use. It contains many API-breaking changes and function renamings, in preparation for a future 1.0 release, at which point the API will become stable. Changes in this direction are likely to continue through a 0.11 release. It is recommended that you migrate your code from 0.9 to 0.10 soon, to make the eventual transition to 1.0 easier.
Some of the highlights are:
A consistent use of
igraph_integer_tfor all indices and most integer quantities, both in the API and internally. This type is 64-bit by default on all 64-bit systems, bringing support for very large graphs with more than 2 billion vertices. Previously, vertex and edge indices were often represented asigraph_real_t. The move to anigraph_integer_talso implies a change fromigraph_vector_ttoigraph_vector_int_tin many functions.The random number generation framework has been overhauled. Sampling from the full range of
igraph_integer_tis now possible. Similarly, the sampling of random reals has been improved to utilize almost the full range of the mantissa of anigraph_real_t.There is a new fully memory-managed container type for lists of vectors (
igraph_vector_list_t), replacing most previous uses of the non-managedigraph_vector_ptr_t. Functions that previously usedigraph_vector_ptr_tto return results and relied on the user to manage memory appropriately are now usingigraph_vector_list_t,igraph_graph_list_tor similar and manage memory on their own.File format readers are much more robust and more tolerant of invalid input.
igraph is much more resilient to overflow errors.
Many improvements to robustness and reliability, made possible by internal refactorings.
As there are numerous breaking changes in this release, please read the changelog (CHANGELOG.md) carefully and pay special attention to the "Breaking changes" section.
- C
Published by ntamas over 3 years ago
igraph - igraph 0.9.9
Changed
igraph_community_walktrap()now uses double precision floating point operations internally instead of single precision.- In
igraph_community_leiden(), thenb_clustersoutput parameter is now optional (i.e. it can beNULL). igraph_read_graph_graphml()no longer attempts to temporarily set the C locale, and will therefore not work correctly if the current locale uses a decimal comma.
Fixed
igraph_community_walktrap()would return an invalidmodularityvector when themergesmatrix was not requested.igraph_community_walktrap()would return amodularityvector that was too long for disconnected graphs. This would cause a failure in some weighted graphs when themembershipvector was requested.igraph_community_walktrap()now checks the weight vector: only non-negative weights are accepted, and all vertices must have non-zero strength.igraph_community_walktrap()now returns a modularity score of NaN for graphs with no edges.igraph_community_fast_greedy()now returns a modularity score of NaN for graphs with no edges.igraph_community_edge_betweenness()now returns a modularity vector with a single NaN entry for graph with no edges. Previously it returned a zero-length vector.igraph_community_leading_eigenvector()does not ignore non-ARPACK-related errors fromigraph_arpack_rssolve()any more.igraph_preference_game()now works correctly whenfixed_sizeis true andtype_distis not given; earlier versions had a bug where more than half of the vertices mistakenly ended up in group 0.- Fixed a memory leak in
igraph_hrg_fit()when usingstart=1. igraph_write_graph_dot()now outputs NaN values unchanged.igraph_write_graph_dot()no longer produces invalid DOT files when empty string attributes are present.igraph_layout_fruchterman_reingold()andigraph_layout_kamada_kawai(), as well as their 3D versions, did not respect vertex coordinate bounds (xmin,xmax, etc.) when minimum values were large or maximum values were small. This is now fixed.- The initial coordinates of the Kamada-Kawai layout (
igraph_layout_kamada_kawai()andigraph_layout_kamada_kawai_3d()) are chosen to be more in line with the original publication, improving the stability of the result. See issue #963. This changes the output of the function for the same graph, compared with previous versions. To obtain the same layout, initialize coordinates withigraph_layout_circle()(in 2D) origraph_layout_sphere()(in 3D). - Improved numerical stability in Kamada-Kawai layout.
- Corrected a problem in the calculation of displacements in
igraph_layout_fruchterman_reingold()and its 3D version. This fixes using the "grid" variant of the algorithm on disconnected graphs. igraph_sumtree_search()would consider search interval opens on the left and closed on the right, contrary to the documentation. This is now corrected to closed on the left and open on the right. In some cases this lead to a zero-weight element being returned for a zero search value. See issue #2080.
Other
- Documentation improvements.
- C
Published by ntamas over 3 years ago
igraph - igraph 0.9.8
Fixed
- Assertion failure in
igraph_bfs()when an emptyrootsorrestrictedvector was provided. igraph_diversity()now returns 0 for degree-1 vertices. Previously it incorrectly returned NaN or +-Inf depending on roundoff errors.igraph_community_walktrap()does not crash any more when provided withmodularity=NULLandmembership=NULL.
Other
- Documentation improvements.
- C
Published by ntamas almost 4 years ago
igraph - igraph 0.9.7
Changed
igraph_get_all_shortest_paths_dijsktra()now uses tolerances when comparing path lengths, and is thus robust to numerical roundoff errors.igraph_vector_*_swapandigraph_matrix_swapnow take O(1) instead of O(n) and accept all sizes.
Fixed
- NCOL and LGL format writers no longer accept "name" and "weight" attributes of invalid types.
- The LGL writer could not access numerical weight attributes, potentially leading to crashes.
- External PLFIT libraries and their headers are now detected at their standard installation location.
igraph_vector_init()no longer accepts negative vector sizes.igraph_assortativity_nominal()crashed on the null graph.- Label propagation now ensures that all labels are dominant.
- Fixed incorrect partition results for walktrap algorithm (issue #1927)
- Negative values returned by
igraph_rng_get_integer()andRNG_INTEGER()were incorrect, one larger than they should have been. igraph_community_walktrap()now checks itsstepsinput argument.- The first modularity value reported by
igraph_community_walktrap()was incorrect (it was always zero). This is now fixed. igraph_correlated_game()would return incorrect results, or exhaust the memory, for most input graphs that were not generated withigraph_erdos_renyi_game_gnp().
Other
- The C attribute handler now verifies attribute types when retrieving attributes.
- Documentation improvements
- C
Published by ntamas almost 4 years ago
igraph - igraph 0.9.6
Changed
- Isomorphism class functions (
igraph_isoclass(),igraph_isoclass_subgraph(),igraph_isoclass_create) and motif finder functions (igraph_motifs_randesu(),igraph_motifs_randesu_estimate(),igraph_motifs_randesu_callback()) now support undirected (sub)graphs of sizes 5 and 6. Previsouly only sizes 3 and 4 were supported.
Fixed
- igraph would not build with MinGW when using the vendored GLPK and enabling TLS.
- Removed some uses of
abort()from vendored libraries, which could unexpectedly shut down the host language of igraph's high-level interfaces. igraph_community_label_propagation()no longer leaves any vertices unlabeled when they were not reachable from any labeled ones, i.e. the returned membership vector is guaranteed not to contain negative values (#1853).- The Kamada-Kawai layout is now interruptible.
- The Fruchterman-Reingold layout is now interruptible.
- Fixed a bug in
igraph_cmp_epsilon()that resulted in incorrect results for edge betweenness calculations in certain rare cases with x87 floating point math when LTO was also enabled (#1894). - Weighted clique related functions now fall back to the unweighted variants when a null vertex weight vector is given to them.
igraph_erdos_renyi_game_(gnm|gnp)would not produce self-loops for the singleton graph.- Fixed a bug in
igraph_local_efficiency()that sometimes erroneously reported zero as the local efficiency of a vertex in directed graphs. igraph_vector_update()(and its type-specific variants) did not check for memory allocation failure.- Fixed a potential crash in the GraphML reader that would be triggered by some invalid GraphML files.
Other
igraph_is_tree()has improved performance and memory usage.igraph_is_connected()has improved performance when checking weak connectedness.- Improved error handling in
igraph_maximal_cliques()and related functions. - The build system now checks that GLPK is of a compatible version (4.57 or later).
- The vendored
plfitpackage was updated to 0.9.3. - You can now build igraph with an external
plfitinstead of the vendored one. - Documentation improvements.
- C
Published by ntamas about 4 years ago
igraph - igraph 0.9.5
Fixed
igraph_reindex_membership()does not allow negative membership indices any more.igraph_rewire_directed_edges()now generates multigraphs when edge directions are ignored, to make it consistent with the directed case.Fixed a bug in
igraph_gomory_hu_tree()that returned only the equivalent flow tree instead of the cut tree (#1810).Fixed a bug in the
IGRAPH_TO_UNDIRECTED_COLLAPSEmode ofigraph_to_undirected()that provided an incorrect merge vector to the attribute handler, leading to problems when edge attributes were merged using an attribute combination (#1814).Fixed the behaviour of the
IGRAPH_ENABLE_LTOoption when it was set toAUTO; earlier versions had a bug whereAUTOsimply checked whether LTO is supported but then did not use LTO even if it was supported.When using igraph from a CMake project, it is now checked that the project has the C++ language enabled. This is necessary for linking to igraph with CMake.
Other
Improved the root selection method for disconnected graphs in the Reingold-Tilford layout (#1836). The new root selection method provides nicer results if the graph is not a tree, although it is still recommended to use the Sugiyama layout instead, unless the input graph is almost a tree, in which case Reingold-Tilfold may still be preferred.
igraph_decompose()is now much faster for large graphs containing many isolates or small components (#960).igraph_largest_cliques()andigraph_clique_number()were re-written to useigraph_maximal_cliques_callback()so they are much faster now (#804).The vendored GLPK has been upgraded to GLPK 5.0.
Documentation improvements.
- C
Published by ntamas over 4 years ago
igraph - igraph 0.9.4
Changed
- Unweighted transitivity (i.e. clustering coefficient) calculations now ignore multi-edges and edge directions instead of rejecting multigraphs and directed graphs.
igraph_transitivity_barrat()now returns an error code if the input graph has multiple edges (which is not handled correctly by the implementation yet).
Fixed
igraph_local_scan_k_ecount()now handles loops correctly.igraph_transitivity_avglocal_undirected()is no longer slower thanigraph_transitivity_local_undirected().- Worked around an invalid warning issued by Clang 9.0 when compiling with OpenMP.
Other
- Documentation improvements.
- C
Published by ntamas over 4 years ago
igraph - igraph 0.9.3
Added
- OpenMP is now enabled and used by certain functions (notably PageRank calculation) when the compiler supports it. Set
IGRAPH_OPENMP_SUPPORT=OFFat configuration time to disable this.
Fixed
igraph_get_incidence()no longer reads and writes out of bounds when given a non-bipartite graph, but gives a warning and ignores edges within a part.igraph_dyad_census()no longer reports an overflow on singleton graphs, and handles loops and multigraphs correctly. Undirected graphs are handled consistently and will no longer give a warning.igraph_vector_lex_cmp()andigraph_vector_colex_cmp()dereferenced their arguments only once instead of twice, and therefore did not work withigraph_vector_ptr_sort().igraph_maximal_cliques_subset()andigraph_transitivity_barrat()corrupted the error handling stack ("finally stack") under some circumstances.- CMake package files did not respect
CMAKE_INSTALL_LIBDIR. This only affected Linux distributions which install intolib64or other locations instead oflib. - The parser sources could not be generated when igraph was in a location that contained spaces in its path.
- igraph no longer links to the math library (
libm) when this is not necessary. _CRT_SECURE_NO_WARNINGSis now defined during compilation to enable compatibility with UWP.- Fixed a compilation issue on MSYS / MinGW when link-time optimization was enabled and the
MSYS MakefilesCMake generator was used. Some source files in igraph were renamed as a consequence, but these should not affect users of the library.
Deprecated
igraph_rng_min()is now deprecated; assume a constant zero as its return value if you used this function in your own code.
Other
- Updated the vendored CXSparse library to version 3.2.0
- C
Published by ntamas almost 5 years ago
igraph - igraph 0.9.2
Added
- CMake package files are now installed with igraph. This allows
find_package(igraph)to find igraph and detect the appropriate compilation options for projects that link to it.
Fixed
- igraph can now be used as a CMake subproject in other CMake-based projects.
- The documentaton can now be built from the release tarball.
- Configuration will no longer fail when the release tarball is extracted into a subdirectory of an unrelated git repository.
- The generated pkg-config file was incorrect when
CMAKE_INSTALL_<dir>variables were absolute paths. - On Unix-like systems, the library name is now
libigraph.so.0.0.0, as it used to be for igraph 0.8 and earlier. - Fixed a return type mismatch in parser sources, and fixed some warnings with recent versions of gcc.
- Fixed a bug in
igraph_get_shortest_paths_dijkstra()andigraph_get_shortest_paths_bellman_ford()that returned incorrect results for unreachable vertices.
Other
- Improved installation instructions and tutorial.
- C
Published by ntamas almost 5 years ago
igraph - igraph 0.9.1
Added
igraph_vector_lex_cmp()andigrapg_vector_colex_cmp()for lexicographic and colexicographic comparison of vectors. These functions may also be used for sorting.
Changed
igraph_community_multilevel()is now randomized (PR #1696, thanks to Daniel Noom).
Fixed
- CMake settings that controlled the library installation directory name, such as
CMAKE_INSTALL_LIBDIR, were not respected. - Under some conditions, the generated pkg-config file contained an incorrect include directory path.
- The following functions were not exported from the shared library:
igraph_subcomponent(),igraph_stack_ptr_free_all(),igraph_stack_ptr_destroy_all(),igraph_status_handler_stderr(),igraph_progress_handler_stderr(). - Built-in random number generators (
igraph_rngtype_mt19937,igraph_rngtype_rand,igraph_rngtype_glibc2) were not exported from the shared library. igraph_layout_graphopt()no longer rounds thespring_lengthparameter to an integer.igraph_get_all_shortest_paths_dijkstra()no longer modifies theresvector's item destructor.igraph_get_shortest_path_bellman_ford()did not work correctly when calculating paths to all vertices.igraph_arpack_rnsolve()checks its parameters more carefully.igraph_community_to_membership()does not crash anymore whencsizeis requested butmembershipis not.igraph_citing_cited_type_game(): fixed memory leaks (PR #1700, thanks to Daniel Noom).igraph_transitivity_undirected(),igraph_transitivity_avglocal_undirected()andigraph_transitivity_barrat()no longer trigger an assertion failure when used with the null graph (PRs #1709, #1710).igraph_(personalized_)pagerank()would return incorrect results for weighted multigraphs with fewer than 128 vertices when usingIGRAPH_PAGERANK_ALGO_PRPACK.igraph_diversity()now checks its input more carefully, and throws an error when the input graph has multi-edges or is directed.igraph_shortest_paths_johnson()would return incorrect results when thetoargument differed fromfrom(thanks to Daniel Noom).igraph_is_graphical()would fail to set the result variable for certain special degree sequences in the undirected simple graph case.- Non-maximal clique finding functions would sometimes return incomplete results when finding more than 2147483647 (i.e. 2^31 - 1) cliques.
- GLPK internal errors no longer crash igraph.
- Fixed some potential memory leaks that could happen on error conditions or when certain functions were interrupted.
- When testing a DLL build on Windows, the
PATHwas sometimes not set correctly, causing the tests to fail (PR #1692). - When compiling from the git repository (as opposed to the release tarball), the build would fail with recent versions of
bisonandflex.
Other
- Documentation improvements.
- Much faster documentation builds.
- Allow using a pre-generated
arith.hheader for f2c when cross-compiling; see the Installation section of the documentation. - The
IGRAPH_ENABLE_LTObuild option now supports theAUTOvalue, which uses LTO only if the compiler supports it. Warning: CMake may not always be able to detect that LTO is not fully supported. Therefore, the default setting isOFF. - The following functions are now interruptible:
igraph_grg_game(),igraph_sbm_game(),igraph_barabasi_game(),igraph_barabasi_aging_game(). - Functions that use GLPK, such as
igraph_feedback_arc_set()andigraph_community_optimal_modularity()are now interruptible. - Add support for older versions of Clang that do not recognize the
-Wno-varargsflag.
Acknowledgments
- Big thanks to Daniel Noom for continuing to expand the test suite and discovering and fixing several bugs in the process!
- C
Published by ntamas almost 5 years ago
igraph - igraph 0.9.0
Added
- Eulerian paths/cycles (PR #1346):
igraph_is_eulerian()finds out whether an Eulerian path/cycle exists.igraph_eulerian_path()returns an Eulerian path.igraph_eulerian_cycle()returns an Eulerian cycle.
- Efficiency (PR #1344):
igraph_global_efficiency()computes the global efficiency of a network.igraph_local_efficiency()computes the local efficiency around each vertex.igraph_average_local_efficiency()computes the mean local efficiency.
- Degree sequences (PR #1445):
igraph_is_graphical()checks if a degree sequence has a realization as a simple or multigraph, with or without self-loops.igraph_is_bigraphical()checks if two degree sequences have a realization as a bipartite graph.igraph_realize_degree_sequence()now supports constructing non-simple graphs as well.
- There is a new fatal error handling mechanism (PR #1548):
igraph_set_fatal_handler()sets the fatal error handler. It is the only function in this functionality group that is relevant to end users.- The macro
IGRAPH_FATAL()and the functionsigraph_fatal()andigraph_fatalf()raise a fatal error. These are for internal use. IGRAPH_ASSERT()is a replacement for theassert()macro. It is for internal use.igraph_fatal_handler_abort()is the default fatal error handler.
- The new
IGRAPH_WARNINGF,IGRAPH_ERRORFandIGRAPH_FATALFmacros provide warning/error reporting withprintf-like syntax. (PR #1627, thanks to Daniel Noom!) igraph_average_path_length_dijkstra()computes the mean shortest path length in weighted graphs (PR #1344).igraph_get_shortest_paths_bellman_ford()computes the shortest paths (including the vertex and edge IDs along the paths) using the Bellman-Ford algorithm (PR #1642, thanks to Guy Rozenberg). This makes it possible to calculate the shortest paths on graphs with negative edge weights, which was not possible before with Dijkstra's algorithm.igraph_get_shortest_path_bellman_ford()is a wrapper forigraph_get_shortest_paths_bellman_ford()for the single path case.igraph_is_same_graph()cheks that two labelled graphs are the same (PR #1604).- Harmonic centrality (PR #1583):
igraph_harmonic_centrality()computes the harmonic centrality of vertices.igraph_harmonic_centrality_cutoff()computes the range-limited harmonic centrality.
- Range-limited centralities, currently equivalent to the old functions with names ending in
_estimate(PR #1583):igraph_closeness_cutoff().igraph_betweenness_cutoff().igraph_edge_betweenness_cutoff().
igraph_vector_is_any_nan()checks if any elements of anigraph_vector_tis NaN.igraph_inclist_size()returns the number of vertices in an incidence list.igraph_lazy_adjlist_size()returns the number of vertices in a lazy adjacency list.igraph_lazy_inclist_size()returns the number of vertices in a lazy incidence list.igraph_bfs_simple()now provides a simpler interface to the breadth-first search functionality.
Changed
- igraph now uses a CMake-based build sysyem.
- GMP support can no longer be disabled. When GMP is not present on the system, igraph will use an embedded copy of Mini-GMP (PR #1549).
- Bliss has been updated to version 0.75. Bliss functions are now interruptible. Thanks to Tommi Junttila for making this possible!
- Adjacency and incidence lists:
igraph_adjlist_init()andigraph_lazy_adjlist_init()now require the caller to specify what to do with loop and multiple edges.igraph_inclist_init()andigraph_lazy_inclist_init()now require the caller to specify what to do with loop edges.- Adjacency and incidence lists now use
igraph_vector_int_tconsistently.
- Community detection:
igraph_community_multilevel(): added resolution parameter.igraph_community_fluid_communities(): graphs with no vertices or with one vertex only are now supported; they return a trivial partition.
- Modularity:
igraph_modularity()andigraph_modularity_matrix(): added resolution parameter.igraph_modularity()andigraph_modularity_matrix()now support the directed version of modularity.igraph_modularity()returns NaN for graphs with no edges to indicate that the modularity is not well-defined for such graphs.
- Centralities:
cutoff=0is no longer interpreted as infinity (i.e. no cutoff) inbetweenness,edge_betweennessandcloseness. If no cutoff is desired, use a negative value such ascutoff=-1.- The
nobigintargument has been removed fromigraph_betweenness(),igraph_betweenness_estimate()andigraph_centralization_betweenness(), as it is not longer needed. The current implementation is more accurate than the old one using big integers. igraph_closeness()now considers only reachable vertices during the calculation (i.e. the closeness is calculated per-component in the undirected case) (PR #1630).igraph_closeness()gained two additional output parameters,reachable_countandall_reachable, returning the number of reached vertices from each vertex, as well as whether all vertices were reachable. This allows for computing various generalizations of closeness for disconnected graphs (PR #1630).igraph_pagerank(),igraph_personalized_pagerank()andigraph_personalized_pagerank_vs()no longer support theIGRAPH_PAGERANK_ALGO_POWERmethod. Theiroptionsargument now has typeigraph_arpack_options_t *instead ofvoid *.
- Shortest paths (PR #1344):
igraph_average_path_length()now returns the number of disconnected vertex pairs in the newunconn_pairsoutput argument.igraph_diameter()now return the result as anigraph_real_tinstead of anigraph_integer_t.igraph_average_path_length()andigraph_diameter()now returnIGRAPH_INFINITYwhenunconn=FALSEand the graph is not connected. Previously they returned the number of vertices.
- Trait-based random graph generators:
igraph_callaway_traits_game()andigraph_establishment_game()now have an optional output argument to retrieve the generated vertex types.igraph_callaway_traits_game()andigraph_establishment_game()now allow omitting the type distribution vector, in which case they assume a uniform distribution.igraph_asymmetric_preference_game()now accept a different number of in-types and out-types.
igraph_subisomorphic_lad()now supports graphs with self-loops.igraph_is_chordal()andigraph_maximum_cardinality_search()now support non-simple graphs and directed graphs.igraph_realize_degree_sequence()has an additional argument controlling whether multi-edges or self-loops are allowed.igraph_is_connected()now returns false for the null graph; see https://github.com/igraph/igraph/issues/1538 for the reasoning behind this decision.igraph_lapack_ddot()is renamed toigraph_blas_ddot().igraph_to_directed(): added RANDOM and ACYCLIC modes (PR #1511).igraph_topological_sorting()now issues an error if the input graph is not acyclic. Previously it issued a warning.igraph_vector_(which_)(min|max|minmax)()now handles NaN elements.igraph_i_set_attribute_table()is renamed toigraph_set_attribute_table().igraph_i_sparsemat_view()is renamed toigraph_sparsemat_view().
Deprecated
igraph_is_degree_sequence()andigraph_is_graphical_degree_sequence()are deprecated in favour of the newly addedigraph_is_graphical().igraph_closeness_estimate()is deprecated in favour of the newly addedigraph_closeness_cutoff().igraph_betweenness_estimate()andigraph_edge_betweenness_estimate()are deprecated in favour of the newly addedigraph_betweenness_cutoff()andigraph_edge_betweenness_cutoff().igraph_adjlist_remove_duplicate()andigraph_inclist_remove_duplicate()are now deprecated in favour of the new constructor arguments inigraph_adjlist_init()andigraph_inclist_init().
Removed
- The following functions, all deprecated in igraph 0.6, have been removed (PR #1562):
igraph_adjedgelist_init(),igraph_adjedgelist_destroy(),igraph_adjedgelist_get(),igraph_adjedgelist_print(),igraph_adjedgelist_remove_duplicate().igraph_lazy_adjedgelist_init(),igraph_lazy_adjedgelist_destroy(),igraph_lazy_adjedgelist_get(),igraph_lazy_adjedgelist_get_real().igraph_adjacent().igraph_es_adj().igraph_subgraph().
igraph_pagerank_old(), deprecated in 0.7, has been removed.igraph_vector_boolandigraph_matrix_boolfunctions that relied on inequality-comparingigraph_bool_tvalues are removed.
Fixed
- Betweenness calculations are no longer at risk from integer overflow.
- The actual cutoff distance used in closeness calculation was one smaller than the
cutoffparameter. This is corrected (PR #1630). igraph_layout_gem()was not interruptible; now it is.igraph_barabasi_aging_game()now checks its parameters more carefully.igraph_callaway_traits_game()andigraph_establishment_game()now check their parameters.igraph_lastcit_game()checks its parameters more carefully, and no longer crashes with zero vertices (PR #1625).igraph_cited_type_game()incorrectly rounded the attractivity vector entries to integers.igraph_residual_graph()now returns the correct residual capacities; previously it wrongly returned the original capacities (PR #1598).igraph_psumtree_update()now checks for negative values and NaN.igraph_communities_spinglass(): fixed several memory leaks in theIGRAPH_SPINCOMM_IMP_NEGimplementation.igraph_incident()now returns edges in the same order asigraph_neighbors().igraph_modularity_matrix()returned incorrect results for weighted graphs. This is now fixed. (PR #1649, thanks to Daniel Noom!)igraph_lapack_dgetrf()would crash when passingNULLfor itsipivargument (thanks for the fix to Daniel Noom).- Some
igraph_matrixfunctions would fail to report errors on out-of-memory conditions. igraph_maxdegree()now returns 0 for the null graph or empty vector set. Previously, it did not handle this case.igraph_vector_bool_all_e()now considers all nonzero (i.e. "true") values to be the same.- PageRank (PR #1640):
igraph_(personalized_)pagerank(_vs)()now check their parameters more carefully.igraph_personalized_pagerank()no longer modifies itsresetparameter.igraph_(personalized_)pagerank(_vs): theIGRAPH_PAGERANK_ALGO_ARPACKmethod now handles self-loops correctly.igraph_personalized_pagerank(_vs)(): the result retuned for edgeless or all-zero-weight graphs with theIGRAPH_PAGERANK_ALGO_ARPACKignored the personalization vector. This is now corrected.igraph_personalized_pagerank(_vs)()with a non-uniform personalization vector, a disconnected graph and theIGRAPH_PAGERANK_ALGO_PRPACKmethod would return results that were inconsistent withIGRAPH_PAGERANK_ALGO_ARPACK. This happened because PRPACK always used a uniform reset distribution when the random walk got stuck in a sink vertex. Now it uses the user-specified reset distribution for this case as well.
- Fixed crashes in several functions when passing a weighted graph with zero edges (due to
vector_minbeing called on the zero-length weight vector). - Fixed problems in several functions when passing in a graph with zero vertices.
- Weighted betweenness, closeness, PageRank, shortest path calculations and random walk functions now check if any weights are NaN.
- Many functions now reject input arguments containing NaN values.
- Compatibility with the PGI compiler.
Other
- Documentation improvements.
- Improved error and warning messages.
- More robust error handling.
- General code cleanup to reduce the number of compiler warnings.
- igraph's source files have been re-organized for better maintainability.
- Debugging aid: When igraph is build with AddressSanitizer, the default error handler prints a stack trace before exiting.
- igraph can now be built with an external CXSparse library.
- The references to igraph source files in error and warning messages are now always relative to igraph's base directory.
- When igraph is built as a shared library, only public symbols are exported even on Linux and macOS.
Acknowledgments
- Thanks to Daniel Noom for significantly expanding igraph's test coverage and exposing several issues in the process!
- C
Published by ntamas about 5 years ago
igraph - igraph 0.8.5
Changed
igraph_write_graph_pajek(): the function now always uses the platform-native line endings (CRLF on Windows, LF on Unix and macOS). Earlier versions tried to enforce Windows line endings, but this was error-prone, and since all recent versions of Pajek support both line endings, enforcing Windows line endings is not necessary any more.
Fixed
- Fixed several compilation issues with MINGW32/64 (PR #1554)
igraph_layout_davidson_harel()was not interruptible; now it is.- Added a missing memory cleanup call in
igraph_i_cattribute_combine_vertices(). - Fixed a few memory leaks in test cases.
- C
Published by ntamas about 5 years ago
igraph - igraph 0.8.4
This is the fourth bugfix release of the 0.8 series.
Fixed
igraph_i_cattribute_combine_vertices(): fixed invalid cleanup code that eventually filled up the "finally" stack when combining vertices with attributes extensively.igraph_hrg_sample(): fixed incorrect function prototypeigraph_is_posinf()andigraph_is_neginf(): fixed incorrect result on platforms where the sign of the result ofisinf()is not indicative of the sign of the input.- Fixed building with vendored LAPACK and external BLAS
- Fixed building with XCode 12.2 on macOS
Other
- Documentation improvements
- General code cleanup to reduce the number of compiler warnings
- C
Published by ntamas about 5 years ago
igraph - igraph 0.8.3
This is the third bugfix release of the 0.8 series.
Added
igraph_vector_binsearch_slice()performs binary search on a sorted slice of a vector.
Changed
igraph_eigenvector_centrality()assumes the adjacency matrix of undirected graphs to have twice the number of self-loops for each vertex on the diagonal. This makes the results consistent between an undirected graph and its directed equivalent when each edge is replaced by a mutual edge pair.
Fixed
igraph_isomorphic()now verifies that the input graphs have no multi-edges (PR #1464).igraph_difference()was creating superfluous self loops (#597).igraph_count_multiple()was giving incorrect results for self-loops in directed graph (PR #1399).igraph_betweenness_estimate(): fixed incorrect results with finite cutoff (PR #1392).igraph_eigen_matrix_symmetric(): fixed incorrect matrix multiplication (PR #1379).- Corrected several issues that could arise during an error condition (PRs #1405, #1406, #1438).
igraph_realize_degree_sequence()did not correctly detect some non-graphical inputs.igraph_is_graphical_degree_sequence(): fixed incorrect results in undirected case (PR #1441).igraph_community_leiden(): fixed incorrect result when self-loops are present (PR #1476).igraph_eigenvector_centrality(): fixed incorrect value for isolated vertices in weighted graphs.igraph_eigenvector_centrality(): corrected the handling of self-loops.igraph_layout_reingold_tilford(): fixed an issue where branches of the tree would sometimes overlap.
Other
igraph_degree_sequence_game(): improved performance withIGRAPH_DEGSEQ_SIMPLE_NO_MULTIPLE_UNIFORMmethod.- Improved the robustness of the test suite.
- Documentation improvements.
- Improved error and warning messages.
- Improved compatibility with recent versions of Microsoft Visual C.
- C
Published by ntamas over 5 years ago
igraph - igraph 0.8.2
This is the second bugfix release of the 0.8 series.
Changed
- Improved argument checking:
igraph_all_st_mincuts()andigraph_sir() - Improved interruptibility:
igraph_sir()
Fixed
igraph_community_leiden(): fixed crash when interrupting- The tests are now more robust. Some incorrect test failures were fixed when running on i386 architecture, or when using different versions of external dependencies.
Others
- Improved error messages from
igraph_sir(). - Improved compatibility with more recent versions of Microsoft Visual C.
- C
Published by ntamas almost 6 years ago
igraph - igraph 0.8.1
This is the first bugfix release of the 0.8 series.
Changed
- Improved interruptability:
igraph_degree_sequence_game() - Improved argument checking:
igraph_forest_fire_game() - Updated the plfit library to version 0.8.1
Fixed
igraph_community_edge_betweenness(): fix for graphs with no edges (PR #1312)igraph_bridges()now handles multigraphs correctly (PR #1335)igraph_avg_nearest_neighbor_degree(): fix for memory leak in weighted case (PR #1339)igraph_community_leiden(): fix crash bug (PR #1357)
Other
- Included
ACKOWLEDGEMENTS.md - Documentation improvements
- C
Published by ntamas almost 6 years ago
igraph - igraph 0.8.0
Release 0.8.0 of igraph's C core, coming almost five years after 0.7.1, is a major improvement with several new features, performance and robustness improvements, and many bug fixes. New functionality includes additional graph generators, functions for handling trees, new community detection methods, improved clique finding, spectral graph embedding, as well as several other features.
Added
Trees
igraph_to_prufer()andigraph_from_prufer()convert labelled trees to/from Prüfer sequencesigraph_tree_game()samples uniformly from the set of labelled treesigraph_is_tree()checks if a graph is a treeigraph_random_spanning_tree()picks a spanning tree of a graph uniformly at randomigraph_random_edge_walk()returns the indices of edges traversed by a random walk; useful for multigraphs
Community detection
igraph_community_fluid_communities()detects communities based on interacting fluidsigraph_community_leiden()detects communities with the Leiden method
Cliques
igraph_maximal_cliques_hist()counts maximal cliques of each sizeigraph_maximal_cliques_callback()calls a function for each maximal cliqueigraph_clique_size_hist()counts cliques of each sizeigraph_cliques_callback()calls a function for each cliqueigraph_weighted_cliques()finds weighted cliques in graphs with integer vertex weightsigraph_weighted_clique_number()computes the weighted clique numberigraph_largest_weighted_cliques()finds the largest weighted cliques
Graph generators
igraph_hsbm_game()for a hierarchical stochastic block modeligraph_hsbm_list_game()for a more general hierarchical stochastic block modeligraph_correlated_game()generates pairs of correlated random graphs by perturbing existing adjacency matrixigraph_correlated_pair_game()generates pairs of correlated random graphsigraph_tree_game()samples uniformly from the set of labelled treesigraph_dot_product_game()generates a random dot product graphigraph_realize_degree_sequence()creates a single graph with a given degree sequence (Havel-Hakimi algorithm)
Graph embeddings
igraph_adjacency_spectral_embedding()andigraph_laplacian_spectral_embedding()provide graph embedddingsigraph_dim_select()provides dimensionality selection for singular values using profile likelihood
Other
igraph_simplify_and_colorize()encodes edge and self-loop multiplicities into edge and vertex colorsigraph_bridges()finds edges whose removal would disconnect a graphigraph_vertex_coloring_greedy()computes a vertex coloring using a greedy algorithmigraph_rewire_directed_edges()randomly rewires only the starting points or only the endpoints of directed edges- Various
igraph_local_scan_*functions provide local counts and statistics of neighborhoods igraph_sample_sphere_surface()samples points uniformly from the surface of a sphereigraph_sample_sphere_volume()samples points uniformly from the volume of a sphereigraph_sample_dirichlet()samples points from a Dirichlet distributionigraph_malloc(), to be paired with the existingigraph_free()
Changed
igraph_degree_sequence_game(): new method added for uniform sampling:IGRAPH_DEGSEQ_SIMPLE_NO_MULTIPLE_UNIFORMigraph_modularity_matrix(): removedmembershipargument (PR #1194)igraph_avg_nearest_neighbor_degree(): addedmodeandneighbor_degree_modearguments (PR #1214).igraph_get_all_simple_paths(): addedcutoffargument (PR #1232).igraph_unfold_tree(): no longer preserves edge ordering of original graphigraph_decompose(): support strongly connected components
Other
- The Bliss library was updated to version 0.73
- igraph now uses the high-performance Cliquer library to find (non-maximal) cliques
- Provide proper support for Windows, using
__declspec(dllexport)and__declspec(dllimport)forDLLs and static usage by using#define IGRAPH_STATIC 1. - Provided integer versions of
dqueueandstackdata types.
- C
Published by ntamas about 6 years ago
igraph - Bug fixes
Some bug fixes, to make sure that the code included in 'Statistical Analysis of Network Data with R' works. See http://github.com/kolaczyk/sand
Detailed changes:
- Better error handling in the GraphML parser.
- GraphML reader is a bit more lenient now; makes it possible to read GraphML files saved from yWorks apps.
- Fixed a bug in igraph_constaint(), issue #580.
- Bipartite projection now detects invalid edges instead of giving a cryptic error, issue #543.
- C
Published by gaborcsardi about 9 years ago