2
0
mirror of https://github.com/boostorg/graph.git synced 2026-02-01 08:32:11 +00:00
Commit Graph

555 Commits

Author SHA1 Message Date
康小广
5d17aeb1ae Fix the copy constructor of the subgraph.
In the previous version, the children and their properties are not copied correctly.
Please see the test case.
2018-10-18 03:06:14 -04:00
jzmaddock
fa7fe4d622 Merge pull request #115 from pavelkryukov/gcc8
Fix G++8 warnings: catch by reference and unused variables
2018-10-17 18:38:49 +01:00
jzmaddock
d51ba76e20 Include examples in tests -
Fix C++17 build errors in examples.
Disable some examples that use Unix-ism's from building on other platforms.
2018-10-14 13:40:56 +01:00
Peter Dimov
bdccbcdde2 Merge pull request #120 from boostorg/pr/move-graph_test
Move graph_test.hpp to test/ to avoid a dependency on Boost.Test
2018-10-14 08:02:28 +03:00
Pavel I. Kryukov
3d737c34af Fix G++8 warnings: catch by reference and unused variables 2018-10-12 23:11:07 +03:00
Peter Dimov
5809e70e60 Move graph_test.hpp to test/ to avoid a dependency on Boost.Test 2018-10-12 22:15:17 +03:00
Josh Marshall
d31aa184af Rebasing to new develop 2018-09-29 19:44:58 -04:00
Peter Dimov
a65f604d54 Deprecate relaxed_heap.hpp, do not test (fails on g++-8) 2018-09-29 17:20:25 +03:00
Josh Marshall
5d0f5a6b03 Clang had some helpful warnings about typename usage which were applied. 2018-09-22 22:03:15 -04:00
Josh Marshall
9cfddda9cf I don't recall messing with these to make them auto, but they were auto. I've still been unable to reproduce the TravisCI errors, but this should still bring this branch closer to merging. 2018-09-22 21:25:21 -04:00
Josh Marshall
a10f17eb99 Made typename fixes more broad and complete. 2018-09-11 17:00:05 -04:00
Josh Marshall
8551039ae3 Learned more of how typename works, changed to using that. 2018-09-08 03:02:13 -04:00
Josh Marshall
3cc890e854 Changing c++11 auto type usage to delctype() boilerplate in order to allow compatability with C++03. This has only been tested locally, and this is being uploaded to test aginst the automated test suite. 2018-09-07 00:03:57 -04:00
Josh Marshall
037af4db54 Fixing incorrect use of typedef's via macro. 2018-09-06 10:06:07 -04:00
Josh Marshall
82fa79e783 Inappropriate overuse of 'typename' removed. 2018-09-05 14:35:26 -04:00
Josh Marshall
19c23ca255 Removing references and testing to relaxed heap; relaxed heap is now marked as depreciated. This is due to some testing failures and a lack of use of relaxed_heap. 2018-09-01 14:51:42 -04:00
Josh Marshall
84122c8049 Fixed an incorrect file name in tests and added a git ignore for generated testing files. 2018-08-31 23:53:45 -04:00
jrmarsha
03b6e8acd6 Merge pull request #3 from raahlb/fix_remove_vertex
Creating first batch of merges for well formed bug fixes.
2018-08-31 21:58:28 -04:00
jrmarsha
a499be87cb Merge pull request #1 from pmateusz/develop
Creating first batch merge to bring in well formed bugfixing pull requests.
2018-08-31 21:58:08 -04:00
Rasmus Ahlberg
e8d7c9fe9b Added test case for removing edges bug from previous commit. 2018-08-23 16:22:06 +02:00
Daniel James
4c752ee2f1 Use std::mt19937 where available
In C++17 mode, libc++'s `std::shuffle` isn't compatible with Boost's random
generators because the `min` and `max` functions aren't `constexpr`, so use
`std::mt19937` instead. This might not be required if boostorg/random#24 is
accepted.
2018-04-13 15:43:38 +01:00
Daniel James
a651ecf6ab Merge pull request #85 from Flast/patch-1
Qualify calling of as_const.
2018-04-13 13:21:59 +01:00
Mateusz Polnik
faef224193 Reproduce memory issue with resource constrained shortest paths. Valgrind confirms reads/writes outside allocated memory. 2017-07-04 23:26:54 +01:00
Daniela Engert
9886e3fef2 Conditionally replace deprecated/removed C++98 std::bind1st by std::bind, std::auto_ptr by std::unique_ptr, and std::random_shuffle by std::shuffle. (#89)
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-05-26 15:04:34 -06:00
Kohei Takahashi
a45e3de9b7 Qualify calling of as_const.
It is ambiguous with upcoming standardized `std::as_const`.
2017-02-04 13:27:07 +09:00
Stefan Hammer
f07d91397c [subgraph.hpp] add_vertex(u_global, g) on a subgraph does not recursively add to parent subgraphs 2016-11-02 11:02:39 +01:00
Jakob Lykke Andersen
cf6e8efdf4 VF2, fix assumption that index maps are default constructible. (#27) 2016-10-31 20:10:23 -06:00
Matt Barr
387bcb3d72 Add degree to reverse_graph (#78)
degree is required for BidirectionalGraphConcept.
Also adds the concept check to the reverse_graph unit test.
2016-10-31 14:03:54 -06:00
K. Noel Belcourt
54589358a4 Disable csr_graph_test until can work through lack of c++11 support. 2016-07-24 13:41:26 -06:00
Murray Cumming
a9c0fa9495 Make files not executable. (#69)
See https://github.com/boostorg/admin/issues/47
2016-07-16 17:05:54 -06:00
Maël Valais
15872fe070 Fix #11374 and #12038: issues with find_flow_cost(), bundled properties and named parameters (#61)
* trac 11374: find_flow_cost() not working with bundled properties.

When using bundled for Weight and Cost properties, find_flow_cost() coudln't work because the properties had been "hard coded" instead of using generic types.

Fixes https://svn.boost.org/trac/boost/ticket/11374

* trac 12038: max-flow algorithms not working with named parameters.

The named parameter "Capacity" was not working. I just had to reverse the order of get_param_type parameters.

Here are the max-flow algorithms that are curretly not working with the named parameter "Capacity":
- edmonds_karp_max_flow,
- push_relabel_max_flow,
- boykov_kolmogorov_max_flow.

Fixes https://svn.boost.org/trac/boost/ticket/12038

* trac 11374: find_flow_cost() not working with named parameters and bundled properties at the same time.

When using bundled properties as well as named parameters, there was an error.

What happened is that the "named parameters" version of find_flow_cost() was not using a generic return value, hence the error.

Also, the return value_type was using edge_capacity_value instead of edge_weight_value (which is the type of a flow cost).

I fixed it using the trick used for edmonds_karp_max_flow(): add `edge_weight_value` to named_function_params.hpp.

* Unit test find_flow_cost() with bundled properties & named params.

-> unit tests for trac 11374

I used the existing min_cost_max_flow_utils.hpp, but I had to make the graph of getSampleGraph() more generic.

In the first place, I wanted to make a compile-only test but I also made
the test runnable so we check that
- find_flow_cost works() correctly with bundled properties
- successive_shortest_path_nonnegative_weights() also works with bundled properties

To run this test, this is a bit painful...
I had to run the entire graph-related tests.
- I commented the other tests except for graph in ./status/Jamfile.v2
- in this same dir, I ran `../b2`

One issue though: csr_graph_test seems to be broken on my boost copy, I may have an issue with updating the submodules or something...

* Unit test edmond_karp_max_flow with named params & bundled properties.

-> unit tests for trac 12038

As the previous commit, I rely on min_cost_max_flow_utils.hpp.

And I also made a runnable test instead of a simple "compile-time" test.

* Indented with 2 spaces instead of tabs

Thanks for the patch!
2016-05-02 11:11:23 -06:00
K. Noel Belcourt
ded3042cd2 Eliminate unused variable, regularize formatting. 2016-05-01 16:17:47 -06:00
K. Noel Belcourt
08453c109a Revert "removed an unused function (#39)"
This reverts commit 655ce30eb3.
2016-04-26 10:54:43 -06:00
Mads Jensen
655ce30eb3 removed an unused function (#39)
The C++ standard deprecates use of <stdio.h>, <stdlib.h> etc., and suggests using <cstdio>, <cstdlib> etc.

Some trailing whitespace removed in affected files because of a setting in my editor

dead code surrounded by #if 0 ... #endif removed
2016-04-24 10:26:25 -06:00
K. Noel Belcourt
6fc1f4a924 Quiet an unused variable warning. 2016-04-23 22:17:49 -06:00
Jakob Lykke Andersen
50bfd8dad0 Add missing check for 'degree' in BidirectionalGraphConcept. Fix the concept checking class in the documentation for BidirectionalGraphConcept. Implementation of missing 'degree' function for filtered_graph. (#29)
Thanks for the patch.
2016-04-23 12:27:51 -06:00
K. Noel Belcourt
9d35801154 Add new strong components test to Jamfile from Alex Lauser.
Remove long unused file.
2014-11-11 21:02:19 -07:00
Noel Belcourt
efa9fbd904 Merge pull request #15 from gatlex/bugfix/ticket-10222-root-map-broken
Fixed bug 10222.

I'll go ahead and add the test to the Jamfile, thanks for the test.
2014-11-11 20:57:50 -07:00
K. Noel Belcourt
713ee03efc Add finish_edge test case from Alex Lauser.
This test demonstrates incorrect output in
the order edges are finished.  We're using
this test to both ensure finish_edge is
called, and that the output is incorrect.
Once we fix where the visitor is called,
this test will be changed to check for the
correct output.
2014-11-11 12:37:56 -07:00
Alexander Lauser
9cd237093c Cleaned up the strong-components test. 2014-11-11 11:09:39 +01:00
Alexander Lauser
221ac5d6f0 Added test for Boost.Graph's strong_components.
Associated with Bug #10231 which causes the test to fail.
2014-11-11 10:49:47 +01:00
Josef Cibulka
bc60e27f75 Comparison of doubles in graphml_test.cpp in now done with some tolerance to rounding errors. 2014-09-29 11:08:23 +02:00
Josef Cibulka
3afa03dcd0 Changed asserts to BOOST_CHECK in graphml_test.cpp 2014-09-29 10:27:19 +02:00
Josef Cibulka
3a663cddc3 Merge remote-tracking branch 'myremote/master' into HEAD 2014-09-27 21:11:10 +02:00
Josef Cibulka
02fbda4272 Added reading of graph properties from graphml. 2014-09-26 16:28:22 +02:00
Eric Niebler
290e9fc3d1 Merge branch 'master' into develop 2014-08-03 13:06:46 -07:00
Noel Belcourt
7d7eca4a38 Cleanup unused typedefs (gcc-4.8.2 c++0x). 2014-07-31 12:46:39 -06:00
Noel Belcourt
235064c63c Merge branch 'develop' 2014-05-16 15:15:30 -06:00
BenPope
e2da814588 Add tests for member swap and fix undirected_graph<>::swap 2014-05-14 23:46:25 +08:00
BenPope
9b7fbc1a76 Add tests for member swap and fix undirected_graph<>::swap 2014-05-14 23:43:53 +08:00