Skip to content

Commit

Permalink
vendor: Update vendored sources to igraph/igraph@5cd6552
Browse files Browse the repository at this point in the history
fix: add some missing IGRAPH_CHECKs
  • Loading branch information
krlmlr committed Jan 2, 2025
1 parent fb2fed3 commit b38fa9a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/vendor/cigraph/src/games/citations.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ igraph_error_t igraph_cited_type_game(igraph_t *graph, igraph_integer_t nodes,
}

if (nodes == 0) {
igraph_empty(graph, 0, directed);
IGRAPH_CHECK(igraph_empty(graph, 0, directed));
return IGRAPH_SUCCESS;
}

Expand Down
13 changes: 7 additions & 6 deletions src/vendor/cigraph/src/games/recent_degree.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ igraph_error_t igraph_recent_degree_game(igraph_t *graph, igraph_integer_t nodes
IGRAPH_ERRORF("The zero appeal cannot be negative, got %g.", IGRAPH_EINVAL, zero_appeal);
}

if (nodes == 0) {
igraph_empty(graph, 0, directed);
if (no_of_nodes == 0) {
IGRAPH_CHECK(igraph_empty(graph, 0, directed));
return IGRAPH_SUCCESS;
}

Expand Down Expand Up @@ -254,10 +254,6 @@ igraph_error_t igraph_recent_degree_aging_game(igraph_t *graph,
igraph_dqueue_int_t history;
igraph_bool_t have_outseq = outseq && igraph_vector_int_size(outseq) > 0;

if (no_of_nodes == 0) {
igraph_empty(graph, 0, directed);
return IGRAPH_SUCCESS;
}
if (no_of_nodes < 0) {
IGRAPH_ERRORF("Number of nodes should not be negative, got %" IGRAPH_PRId ".", IGRAPH_EINVAL, no_of_nodes);
}
Expand All @@ -278,6 +274,11 @@ igraph_error_t igraph_recent_degree_aging_game(igraph_t *graph,
IGRAPH_ERRORF("The zero appeal cannot be negative, got %g.", IGRAPH_EINVAL, zero_appeal);
}

if (no_of_nodes == 0) {
IGRAPH_CHECK(igraph_empty(graph, 0, directed));
return IGRAPH_SUCCESS;
}

if (!have_outseq) {
no_of_neighbors = m;
IGRAPH_SAFE_MULT(no_of_nodes - 1, no_of_neighbors, &no_of_edges);
Expand Down
4 changes: 2 additions & 2 deletions src/vendor/igraph_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

__BEGIN_DECLS

#define IGRAPH_VERSION "0.10.13-137-g82d35eebd"
#define IGRAPH_VERSION "0.10.13-138-g5cd6552bf"
#define IGRAPH_VERSION_MAJOR 0
#define IGRAPH_VERSION_MINOR 10
#define IGRAPH_VERSION_PATCH 13
#define IGRAPH_VERSION_PRERELEASE "137-g82d35eebd"
#define IGRAPH_VERSION_PRERELEASE "138-g5cd6552bf"

IGRAPH_EXPORT void igraph_version(const char **version_string,
int *major,
Expand Down

0 comments on commit b38fa9a

Please sign in to comment.