Library for the analysis of networks
igraph_is_complete()
checks whether there is a connection between all pairs of vertices (experimental function, contributed by Aymeric Agon-Rambosson @aagon in #2510).igraph_write_graph_gml()
for certain invalid GML files.igraph_write_graph_lgl()
when vertex names were present but edge weights were not.igraph_subgraph_from_edges()
.igraph_sparsemat_as_matrix()
when sparse matrix object did not make use of its full allocated capacity.igraph_write_graph_ncol()
and igraph_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 called edge
or node
with a warning. Writing these would create an invalid GML file that igraph couldn't read back.igraph_disjoint_union()
and igraph_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 of attr.type
are not accepted anymore.<key>
tags of GraphML files as this is a violation of the GraphML specification.igraph_is_separator()
and igraph_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 with igraph_minimum_size_separators()
.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.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.igraph_is_simple()
now makes more granular use of the cache.igraph_degree()
now makes use of the cache when checking for self-loops.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).igraph_is_forest()
determined that a graph is not a directed forest, and the roots
output parameter was set to NULL
, 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.igraph_are_connected()
is renamed to igraph_are_adjacent()
; the old name is kept available until at least igraph 1.0.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).igraph_hrg_sample_many()
.igraph_community_fastgreedy()
no longer crashes when providing a modularity vector only, but not a merges matrix of membership vector.bool
was not 1 byte (#2477).STR()
is deprecated; use the function igraph_strvector_get()
instead.igraph_strvector_t
.igraph_is_bipartite()
.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.size
is now dropped, and support for the font
edge 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.\n
and "
, respectively).igraph_avg_nearest_neighbor_degree()
now supports non-simple graphs.igraph_induced_subgraph()
.igraph_vector_which_min()
and igraph_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()
and igraph_erdos_renyi_game_gnp()
are now interruptible.igraph_de_bruijn()
and igraph_kautz()
are now interruptible.igraph_full()
, igraph_full_citation()
, igraph_full_multipartite()
and igraph_turan()
are now interruptible.igraph_avg_nearest_neighbor_degree()
did not compute knnk
correctly in the weighted case.igraph_matrix_print()
, as well as test suite failures, on some platforms. 32-bit x86 was affected when setting IGRAPH_INTEGER_SIZE
to 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()
and igraph_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 the flow
argument was non-NULL.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).igraph_full_bipartite()
now checks for overflow.igraph_bipartite_game_gnm()
and igraph_bipartite_game_gnp()
are now more robust to overflow.igraph_write_graph_dot()
now quotes real numbers written in exponential notation as necessary.igraph_bipartite_game()
is now deprecated; use igraph_bipartite_game_gnm()
and igraph_bipartite_game_gnp()
instead.igraph_community_voronoi()
.IGRAPH_CALLOC()
and IGRAPH_REALLOC()
now check for overflow.install
target of the CMake build system are now relocatable, i.e. the generated igraph-targets.cmake
file does not contain absolute paths any more.igraph_graph_power()
computes the kth power of a graph (experimental function).igraph_community_voronoi()
for detecting communities using Voronoi partitioning (experimental function).igraph_community_walktrap()
no longer requires modularity
and merges
to be non-NULL when membership
is non-NULL.igraph_isomorphic()
now supports multigraphs.igraph_hub_and_authority_scores()
, igraph_hub_score()
and igraph_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 by igraph_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()
and igraph_minimum_spanning_tree_prim()
now check that edge weights are not NaN.igraph_arpack_rssolve()
and igraph_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()
and igraph_get_shortest_paths_bellman_ford()
now validate the from
vertex.igraph_local_scan_1_ecount()
for weighted undirected graphs which would miscount loops and multi-edges.igraph_automorphisms()
is now deprecated; its new name is igraph_count_automorphisms()
. The old name is kept available until at least igraph 0.11.igraph_hub_score()
and igraph_authority_score()
are now deprecated. Use igraph_hub_and_authority_scores()
instead.igraph_get_incidence()
is now deprecated; its new name is igraph_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. Use igraph_from_hrg_dendrogram()
instead, which constructs the dendrogram as an igraph graph and returns the associated probabilities in a vector.igraph_vertex_connectivity()
.igraph_simplify()
makes use of the cache, and avoids simplification when the graph is already known to be simple.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).test
build target now only runs the unit tests, but it does not build them. In order to both build and run tests, use the check
target, which continues to behave as before (PR #2291).igraph_distances_floyd_warshall()
now has from
and to
parameters for choosing source and target vertices.igraph_distances_floyd_warshall()
now has an additional method
parameter to select a specific algorithm. A faster "Tree" variant of the Floyd-Warshall algorithm is now available (#2267, thanks to @rfulekjames).ctest
executable after configuring a project in order to determine test executables. Use the build_tests
target to build the tests first, or use the check
target to both build and run all unit tests (PR #2291).igraph_widest_path_widths_floyd_warshall()
.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 of igraph_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.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.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.igraph_2dgrid_move()
that sometimes crashed the Large Graph Layout function when a grid cell became empty.igraph_pagerank()
and igraph_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()
and igraph_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()
and igraph_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 macro IGRAPH_CALLOC()
was not affected.igraph_subgraph_edges()
is now deprecated to avoid confusion with igraph_induced_subgraph_edges()
; its new name is igraph_subgraph_from_edges()
. The old name is kept available until at least igraph 0.11.igraph_matrix_transpose()
.igraph_distances_cutoff()
and igraph_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()
and igraph_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.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()
and igraph_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.igraph_get_k_shortest_paths()
that sometimes yielded incorrect results on undirected graphs when the mode
argument was set to IGRAPH_OUT
or IGRAPH_IN
.igraph_trussness()
is now interruptible.igraph_spanner()
is now interruptible.igraph_layout_umap()
and igraph_layout_umap3d()
are now interruptible.igraph_distance_johnson()
to fail on graphs with negative weights.igraph_eulerian_cycle()
and igraph_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()
and igraph_layout_umap_3d()
are now interruptible.igraph_vit_create()
and igraph_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.Requires.private
section instead of the Libs.private
one.igraph_bfgs()
function.igraph_complex_mod()
. Use igraph_complex_abs()
instead, as it has identical functionality.IGRAPH_EDRL
error code was deprecated; the DrL algorithm now returns IGRAPH_FAILURE
when it used to return IGRAPH_EDRL
(not likely to happen in practice).igraph_dqueue_e()
is now deprecated and replaced by igraph_dqueue_get()
.igraph_finite()
, igraph_is_nan()
, igraph_is_inf()
, igraph_is_posinf()
and igraph_is_neginf()
are now deprecated. They were relics from a time when no standard alternatives existed. Use the C99 standard isfinite()
, isnan()
and isinf()
instead.