Skip to content

Commit de14889

Browse files
committed
vendor: Update vendored sources to igraph/igraph@1d6ef7c
refactor: minor readability cleanup in igraph_decompose()
1 parent 4ae3527 commit de14889

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/vendor/cigraph/src/connectivity/components.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,13 +640,18 @@ static igraph_error_t igraph_i_decompose_strong(const igraph_t *graph,
640640
igraph_error_t igraph_decompose(const igraph_t *graph, igraph_graph_list_t *components,
641641
igraph_connectedness_t mode,
642642
igraph_integer_t maxcompno, igraph_integer_t minelements) {
643-
if (mode == IGRAPH_WEAK || !igraph_is_directed(graph)) {
643+
if (!igraph_is_directed(graph)) {
644+
mode = IGRAPH_WEAK;
645+
}
646+
647+
switch (mode) {
648+
case IGRAPH_WEAK:
644649
return igraph_i_decompose_weak(graph, components, maxcompno, minelements);
645-
} else if (mode == IGRAPH_STRONG) {
650+
case IGRAPH_STRONG:
646651
return igraph_i_decompose_strong(graph, components, maxcompno, minelements);
652+
default:
653+
IGRAPH_ERROR("Invalid connectedness mode.", IGRAPH_EINVAL);
647654
}
648-
649-
IGRAPH_ERROR("Cannot decompose graph", IGRAPH_EINVAL);
650655
}
651656

652657
static igraph_error_t igraph_i_decompose_weak(const igraph_t *graph,

src/vendor/igraph_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
__BEGIN_DECLS
3030

31-
#define IGRAPH_VERSION "0.10.13-133-g0878f577d"
31+
#define IGRAPH_VERSION "0.10.13-134-g1d6ef7c41"
3232
#define IGRAPH_VERSION_MAJOR 0
3333
#define IGRAPH_VERSION_MINOR 10
3434
#define IGRAPH_VERSION_PATCH 13
35-
#define IGRAPH_VERSION_PRERELEASE "133-g0878f577d"
35+
#define IGRAPH_VERSION_PRERELEASE "134-g1d6ef7c41"
3636

3737
IGRAPH_EXPORT void igraph_version(const char **version_string,
3838
int *major,

0 commit comments

Comments
 (0)