Giter Site home page Giter Site logo

Comments (4)

anadon avatar anadon commented on July 21, 2024

Hello,

I'm getting back to this repo after a month and a half. While it is possible to make a loop in user code, that might not be the right option. Though it may also be correct since a forward iterator may not make sense in a graph since it isn't convertible in a reliable way to a 1D directional structure. I am working on Travis CI stuff right now and have a backlog, but I'll address this when I can. If you would like a faster resolution and feel comfortable doing so, I will welcome you to create a test case and a code fix in a PR.

from graph.

morinmorin avatar morinmorin commented on July 21, 2024

C++20's new overloads of std::max_element would work. But, no need to wait for C++20! We already have boost::range::max_element (or boost::first_max_element in Boost.Algorithm) that works with ForwardTraversal ranges (iterators).

from graph.

bkpoon avatar bkpoon commented on July 21, 2024

I ran into this issue while trying to compile our code using Boost.Graph on macOS with Xcode 11. It looks like Boost.Range did what @morinmorin suggested by replacing std::max_element with boost::first_max_element (boostorg/range@adcb071).

For testing our code, I modified include/boost/graph/bc_clustering.hpp to add the <boost/algorithm/minmax_element.hpp> header, removed the <algorithm> header, and replaced line 136

        = *max_element(edges_iters.first, edges_iters.second, cmp);

with

        = *boost::first_max_element(edges_iters.first, edges_iters.second, cmp);

I'm still testing this on the other platforms and compilers that we support, though. I can submit a pull request if that helps.

from graph.

bkpoon avatar bkpoon commented on July 21, 2024

I made a pull request (#190). There was another file, include/boost/graph/howard_cycle_ratio.hpp, that has the same issue, so I patched that as well.

from graph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.