Comments (4)
Quite possibly. I'll ask about it. Thank you for bringing this to attention.
from graph.
Looks like the general advice is to avoid using aborts, with Peter Dimov pointing me towards https://github.com/boostorg/graph/blob/develop/include/boost/graph/isomorphism.hpp#L316 . This seems like an easy PR, so would you like the credit? If not, I should be able to get to it this weekend.
from graph.
I am not concerned with getting credit. There are a few other instances in graph:
%vjcair> # #define BOOST_LIB_VERSION "1_69"
%vjcair> pwd
/Library/Frameworks/R.framework/Resources/library/BH/include/boost/graph
%vjcair> grep abort *
grep: detail: Is a directory
grep: distributed: Is a directory
isomorphism.hpp: abort();
grep: parallel: Is a directory
grep: planar_detail: Is a directory
grep: property_maps: Is a directory
%vjcair> grep abort */*
distributed/adjacency_list.hpp: abort();
grep: distributed/adjlist: Is a directory
grep: distributed/detail: Is a directory
grep: parallel/detail: Is a directory
%vjcair> grep abort */*/*
distributed/detail/mpi_process_group.ipp: abort();
distributed/detail/mpi_process_group.ipp: abort();
from graph.
I just happened to notice this issue and yeah, wow, library code should never call abort()
or exit()
, except in the guise of an assert, which the code in graph/include/boost/graph/isomorphism.hpp
does as well. Weird.
The abort()
was introduced in 2012 as part of a fix to the algorithm and I guess it escaped review, as the same change also introduces considerable use of goto
. :\ Now I'm not saying that goto
is universally bad, but these dubious changes together are... suspicious.
I wouldn't recommend replacing it with throwing an exception; the abort()
is really just an over-eager debugging tool.
from graph.
Related Issues (20)
- unable to compile lengauer_tarjan_dominator_tree with compressed_sparse_row_graph/bidirectionalS HOT 6
- boost/progress.hpp is deprecated
- Maximum Adjacency Search: should unit tests be relaxed to allow multiple correct orderings in the result?
- Is EdgeIndexMap needed in r_c_shortest_paths ? HOT 3
- What are faces of two triangles by planar_face_traversal? HOT 1
- A mistake in r_c_shortest_paths_example.cpp HOT 1
- `depth_first_visit_impl`: `finish_edge` not invoked when it should on MSVC HOT 2
- Algorithm for generating a random Flow Network/Graph HOT 1
- [Feature request] Implementation of Held-Karp lower bound for the TSP HOT 1
- Improve docs for ResourceExtensionFunction in r_c_shortest_paths
- Boost.Graph no longer builds with C++03 HOT 6
- astar_search does unnecessary initialization of vertices
- broken link to example for reverse graph adaptor HOT 6
- adjacency_matrix::add_vertex always aborts in Debug mode ? HOT 2
- Single-path RCSP does not return always the shortest path HOT 7
- Stack-overflow in boost::read_graphviz_detail::parser::parse_subgraph HOT 23
- Option to allow `breadth_first_search` to use `in_edges`
- Question on negative flow on arcs in Boykin-Kolmogorov algorithm -- meaning and interpretation
- Modular Boost C++ Libraries Request HOT 1
- read_graphml function rejecting well formed Graphml files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graph.