🎉 Nearly twenty years after the first igraph release, igraph 1.0 has finally arrived. 🎉
This release focuses on providing a stable and more consistent interface that users and downstream maintainers can rely on with confidence, as well as adding new features that required API-breaking changes. There is now an official versioning policy, see VERSIONING.md
.
Highlights
- A more consistent and more predictable API.
- Explicit versioning policy.
- Several random graph generators, including the Erdős-Rényi generators, can now produce graphs with multi-edges.
- Several functions that can generate a large number of results (cliques, cycles, etc.) now have a feature to limit the number of returned results, or to return a single result only.
- Functionality for generating several kinds of spatial networks.
Breaking changes
This section lists API-breaking changes in this version, and provides guidance on adapting 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 the "Added" section below for details.igraph_integer_t
was renamed toigraph_int_t
, butigraph_integer_t
is kept as an alias and it will remain available for at least the next major version. Library headers and source code usesigraph_int_t
from now on.igraph_rng_set_default()
now returns a pointer to the previous default RNG. Furthermore, this function now only stores a pointer to theigraph_rng_t
struct passed to it, instead of copying the struct. Thus theigraph_rng_t
object must continue to exist for as long as it is used as the default RNG.- Interruption handlers do not take a
void *
argument anymore; this is relevant to maintainers of higher-level interfaces only. - Interruption handlers now return an
igraph_bool_t
instead 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_INTERRUPTED
any 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_INTERRUPTED
explicitly. 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. - Projects that depend on igraph must only include the
<igraph.h>
header. While an igraph installation includes several sub-headers, these are for organizational purposes only, and their contents may change without notice. Only#include <igraph.h>
is supported.
Error codes
- The
IGRAPH_EINVEVECTOR
error code was removed;igraph_create()
andigraph_add_edges()
that used to return this error code for invalid edge vectors will now returnIGRAPH_EINVAL
instead. - The
IGRAPH_NONSQUARE
error code was removed; functions that used this error code now returnIGRAPH_EINVAL
instead when encountering a non-square matrix. - The
IGRAPH_EGLP
error code and all other GLP-specific error codes (starting withIGRAPH_GLP_
) were removed; functions that used this error code now returnIGRAPH_FAILURE
instead, providing more details in the message associated to the error code. - The
IGRAPH_ELAPACK
error code was removed; functions that used this error code now returnIGRAPH_FAILURE
instead, providing more details in the message associated to the error code. - The
IGRAPH_CPUTIME
error code was removed in favour of the interruption mechanism built into igraph. - The unused
IGRAPH_EDIVZERO
andIGRAPH_EATTRIBUTES
error codes were removed with no replacement. - The deprecated error code
IGRAPH_ENEGLOOP
was removed. UseIGRAPH_ENEGCYCLE
instead. 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_EARPACK
error code. Details about the underlying ARPACK failure are provided in the error message. - A new error code called
IGRAPH_EINVEID
was 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_t
instead ofigraph_int_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 storage
parameter that specifies whether the data should be written in column-major or row-major format.igraph_vector_view()
,igraph_matrix_view()
,igraph_matrix_view_from_vector()
, andigraph_vector_ptr_view()
now return their result as a return value instead of an output parameter. This allows assigning the value to aconst
variable without triggering warnings with modern compilers.
Attribute handling
igraph_attribute_handler_t
members that formerly took an untypedigraph_vector_ptr_t
argument are now taking a typedigraph_attribute_record_list_t
argument instead.- The deprecated
IGRAPH_ATTRIBUTE_DEFAULT
value of theigraph_attribute_type_t
enum was removed. - The
gettype
member ofigraph_attribute_table_t
was renamed toget_type
for 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
value
member ofigraph_attribute_record_t
is 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-1
to 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 newigraph_bool_t bycol
argument that determines the order in which the edges are returned.bycol = false
reproduces the existing behaviour, whilebycol = true
returns the edges suitable for a matrix stored in column-wise order.igraph_neighbors()
andigraph_vs_adj()
gained two extra arguments,igraph_loops_t loops
andigraph_bool_t multiple
to specify what to do with loop and multiple edges. This makes their interfaces consistent withigraph_adjlist_init()
. Useloops = IGRAPH_LOOPS_TWICE
andmultiple = true
to reproduce the previous behavior.igraph_incident()
andigraph_es_incident()
gained an extraigraph_loops_t loops
argument to specify what to do with loop edges. This makes their interfaces consistent withigraph_inclist_init()
. Useloops = IGRAPH_LOOPS_TWICE
to reproduce the previous behavior.- The
igraph_multiple_t
enum type was removed from the public API as it was essentially a Boolean. The symbolic constantsIGRAPH_MULTIPLE
(same astrue
) andIGRAPH_NO_MULTIPLE
(same asfalse
) were kept to improve readability of code written directly in C.
Basic graph properties
igraph_density()
now takes an optionalweights
parameter.igraph_is_simple()
gained an extraigraph_bool_t
argument 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
loops
argument 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_t
fromigraph_bool_t
, allowing finer-grained control about how loop edges are treated. PassIGRAPH_LOOPS_TWICE
andIGRAPH_NO_LOOPS
to reproduce the previous behaviour oftrue
andfalse
. igraph_get_biadjacency()
now takes aweights
parameter, and can optionally create weighted biadjacency matrices.igraph_adjacency()
now treatsIGRAPH_LOOPS_TWICE
asIGRAPH_LOOPS_ONCE
when the mode isIGRAPH_ADJ_DIRECTED
,IGRAPH_ADJ_UPPER
orIGRAPH_ADJ_LOWER
. For directed graphs, this is for the sake of consistency with the rest of the library whereIGRAPH_LOOPS_TWICE
is 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 emptyoutseq
vector as a missing out-degree sequence. PassNULL
if 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, passNULL
for in-degrees.igraph_erdos_renyi_game_gnm()
uses aigraph_edge_type_sw_t allowed_edge_types
parameter instead ofigraph_bool_t loops
, and can now uniformly sample not only simple graphs but also multigraphs. It also gained anedge_labeled
Boolean parameter which controls whether to sample from the set of ordered edge lists (equivalent toigraph_iea_game()
for multigraphs).igraph_erdos_renyi_game_gnp()
uses aigraph_edge_type_sw_t allowed_edge_types
parameter instead ofigraph_bool_t loops
, and can now sample multigraphs from a maximum entropy model with a prescribed expected edge multiplicity. It also gained anedge_labeled
Boolean parameter which controls whether to sample from the set of ordered edge lists.igraph_bipartite_game_gnm()
gained anigraph_edge_type_sw_t allowed_edge_types
parameter, and can now uniformly sample not only simple graphs but also multigraphs. It also gained anedge_labeled
Boolean parameter which controls whether to sample from the set of ordered edge lists (equivalent toigraph_bipartite_iea_game()
for multigraphs).igraph_bipartite_game_gnp()
gained anigraph_edge_type_sw_t allowed_edge_types
parameter, and can now sample multigraphs from a maximum entropy model with a prescribed expected edge multiplicity. It also gained anedge_labeled
Boolean parameter which controls whether to sample from the set of ordered edge lists.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_types
parameter instead ofigraph_bool_t loops
and now supports generating graphs with multi-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_types
parameter instead ofloops
andmultiple
.igraph_rewire()
now takes anigraph_edge_type_sw_t allowed_edge_types
parameter to specify whether to create self-loops. Theigraph_rewiring_t
enum type was removed. Instead of the oldIGRAPH_REWIRING_SIMPLE
, useIGRAPH_SIMPLE_SW
. Instead of the oldIGRAPH_REWIRING_SIMPLE_LOOPS
, useIGRAPH_LOOPS_SW
.igraph_rewire()
now takes an optionaligraph_rewiring_stats_t *
output argument. You can pass the appropriate struct there to find out the number of successful swaps during the rewiring operation.igraph_watts_strogatz_game()
uses anigraph_edge_type_sw_t allowed_edge_types
parameter instead ofloops
andmultiple
.igraph_static_fitness_game()
uses anigraph_edge_type_sw_t allowed_edge_types
parameter instead ofloops
andmultiple
.igraph_static_power_law_game()
uses anigraph_edge_type_sw_t allowed_edge_types
parameter instead ofloops
andmultiple
.igraph_correlated_game()
now takes the graph being constructed as the first argument to remain consistent with other graph constructors. Earlier versions used to take the original graph as the first argument.- The semantics of the
permutation
argument ofigraph_correlated_game()
andigraph_correlated_pair_game()
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 consistent with howigraph_permute_vertices()
operates (which has also changed in igraph 1.0).
Paths and cycles
igraph_distances()
,igraph_distances_cutoff()
,igraph_get_shortest_path()
,igraph_get_shortest_paths()
andigraph_get_all_shortest_paths()
gained aweights
argument. 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 anigraph_neimode_t 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 namedweights
in the second position. - The
weights
parameter ofigraph_average_path_length()
,igraph_global_efficiency()
,igraph_local_efficiency()
andigraph_average_local_efficiency()
were moved to the second position, after thegraph
itself, for 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, and itsmode
parameter was moved to before the path length limit parameters.igraph_get_all_simple_paths()
gained amax_results
parameter to limit the number of returned results. Pass1
to return a single result, orIGRAPH_UNLIMITED
to return all results.igraph_simple_cycles()
gained amax_results
parameter to limit the number of returned results. Pass1
to return a single result, orIGRAPH_UNLIMITED
to return all results.
Community detection
igraph_community_edge_betweenness()
now takes both aweights
and alengths
parameter. Edge 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_regularized
andregularization_strength
parameters.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_weights
andvertex_in_weights
parameters in order to support directed graphs, instead of the previous singlenode_weights
parameter. To obtain the old behavior for undirected graphs, pass the vertex weights asvertex_out_weights
and setvertex_in_weights
toNULL
.- The
history
parameter ofigraph_community_leading_eigenvector()
is now a pointer to anigraph_vector_int_t
instead of anigraph_vector_t
. igraph_community_optimal_modularity()
now takes aresolution
parameter and itsweight
parameter was moved to the second place.igraph_community_spinglass_single()
now usesigraph_real_t
for itsinner_links
andouter_links
output 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. igraph_isoclass_subgraph()
now takes a parameter of typeigraph_vs_t vids
instead ofigraph_vector_int_t vids
. Applyigraph_vss_vector()
to the vector of vertex IDs to convert it to anigraph_vs_t
.
Centralities
- All betweenness functions got a
normalized
parameter to support normalizing the result by the number of vertex pairs in the graph. At the same time, their 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 aneids
parameter 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 amode
parameter with possible valuesIGRAPH_OUT
,IGRAPH_IN
orIGRAPH_ALL
to control how edge directions are considered. Previously they used a booleandirected
parameter.igraph_eigenvector_centrality()
,igraph_centralization_eigenvector_centrality()
andigraph_centralization_eigenvector_centrality_tmax()
no longer have ascale
parameter. The result is now always scaled so that the largest centrality value is 1.igraph_hub_and_authority_scores()
no longer has ascale
parameter. 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.
Cliques and independent sets
igraph_cliques()
,igraph_weighed_cliques()
,igraph_maximal_cliques()
,igraph_maximal_cliques_file()
,igraph_maximal_cliques_subset()
,igraph_independent_sets()
andigraph_maximal_independent_sets()
received amax_results
parameter to limit the number of returned results. Pass1
to return a single result, orIGRAPH_UNLIMITED
to return all results.igraph_maximal_independent_sets()
receivedmin_size
andmax_size
parameters that control the range of independent set sizes that are returned.igraph_weighted_cliques()
had its parameter ordering standardized: theigraph_bool_t maximal
parameter now comes before themin_weight
/max_weight
parameters.igraph_maximal_cliques_callback()
had its parameter ordering standardized: theigraph_clique_handler_t *cliquehandler_fn, void *arg
parameter pair now comes at the end, making this function consistent withigraph_cliques_callback()
.
Layouts
igraph_layout_sugiyama()
does not return an "extended graph" anymore. 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 newmethod
parameter 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_t
as theirresult
argument to prevent overflows when igraph is compiled with 32-bit integers.- The
igraph_motifs_handler_t
callback type now takes aconst igraph_vector_int_t *vids
parameter. Previously this was not formallyconst
, even though it was not allowed to modifyvids
. This affects uses ofigraph_motifs_randesu_callback()
. - The experimental functions
igraph_fundamental_cycles()
andigraph_minimum_cycle_basis()
now use the typeigraph_real_t
for theirbfs_cutoff
parameter, and had theirweights
parameter moved to the 2nd position.
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_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_gabriel_graph()
computes the Gabriel graph of a spatial point set (experimental function). Thanks to Arnór Friðriksson @Zepeacedust for implementing this in #2827!igraph_relative_neighborhood_graph()
computes the relative neighborhood graph of a spatial point set (experimental function). Thanks to Arnór Friðriksson @Zepeacedust for implementing this in #2827!igraph_lune_beta_skeleton()
andigraph_circle_beta_skeleton()
compute the lune and circle based β-skeletons of a spatial point set (experimental function). Thanks to Arnór Friðriksson @Zepeacedust for implementing this in #2827!igraph_beta_weighted_gabriel_graph()
computes a Gabriel graph of a spatial point set, along with a threshold β value for each edge, at which the edge ceases to be part of the lune-based β-skeleton (experimental function). Thanks to Arnór Friðriksson @Zepeacedust for implementing this in #2827!igraph_spatial_edge_lengths()
computes edge 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_UNLIMITED
, defined to-1
, is a convenience constant for use with various "size limit" parameters, such as number of cliques returned, maximum path length, number of results returned, etc. It indicates that no limit should be used.
Changed
- The Pajek format reader and writer now map vertex labels to the
name
vertex attribute in igraph. Theid
attribute 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 - 1
size vertex subsets wheren
is 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 theto
vector has insufficient capacity, they double its capacity. Previously they reserved precisely as much capacity as needed for appending thefrom
vector.- 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).
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_t
for itsinner_links
andouter_links
output 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.igraph_correlated_game()
andigraph_correlated_pair_game()
validate theirpermutation
argument.
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 therange
alternatives instead of the oldseq
ones. - 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_t
was removed. - The macros
IGRAPH_POSINFINITY
andIGRAPH_NEGINFINITY
were removed. UseIGRAPH_INFINITY
and-IGRAPH_INFINITY
instead. - Removed
igraph_sparsemat_view()
as its design was broken and required the user to reach into the internals ofigraph_sparmsemat_t
to destroy it properly.
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
- The documentation was reorganized.
- Various documentation improvements.
- Improved performance when creating graphs from dense adjacency matrices (
igraph_adjacency()
andigraph_weighted_adjacency()
).