Menu

#2 Support igraph >= 0.10.0

1.0
open
nobody
None
2025-12-16
2022-09-07
Gwyn Ciesla
No

See attached build log

1 Attachments

Discussion

  • Mamoru TASAKA

    Mamoru TASAKA - 2022-09-11

    So looking at the relevant changes on igraph:

    I think the following change should do the same behavior as before:

    --- rw-0.9/simplerw.c.newigraph 2017-02-14 00:20:35.000000000 +0900
    +++ rw-0.9/simplerw.c   2022-09-11 19:39:47.033917305 +0900
    @@ -134,7 +134,11 @@ int read_graph(const char *format, const
            igraph_destroy(&igraph);
            return(-1);
        }
    +#if (IGRAPH_VERSION_MAJOR >= 1) || ((IGRAPH_VERSION_MAJOR == 0) && (IGRAPH_VERSION_MINOR >= 10))
    
    +   igraph_get_adjacency(&igraph, &imatrix, IGRAPH_GET_ADJACENCY_BOTH, NULL, IGRAPH_LOOPS_ONCE);
    +#else
        igraph_get_adjacency(&igraph, &imatrix, IGRAPH_GET_ADJACENCY_BOTH, 0);
    +#endif
        igraph_destroy(&igraph);
        if(igraph_matrix_nrow(&imatrix) > MAX_VERTICES)
        {
    
     
    • Philipp Klaus Krause

      This should be fixed today.

       
      👍
      1
  • szhorvat

    szhorvat - 2022-09-16

    igraph maintainer here.

    Yes, this patch will fix compilation and will restore the old behaviour. The value chosen for the loops parameter will only make a difference if the graph has self-loops (i.e. it is non-simple), so any choice is fine here.

    To find out how to update code for igraph 0.10, your first stop should be the changelog, which should list all breaking changes. If anything is missing, let us know and we'll add it. https://github.com/igraph/igraph/blob/master/CHANGELOG.md

    I noticed that this program attempts to check error codes returned by igraph functions. However, the default behaviour on error is to abort(), so there is no point in doing this unless the error handler is changed to something else.

    Should the maintainer want to convert this code into an igraph function and include it in igraph itself, the contribution would be welcome. Just let us know.

     
    👍
    1

Log in to post a comment.

MongoDB Logo MongoDB