Compare commits

...

728 Commits

Author SHA1 Message Date
E Kawashima 7913228c9d Fix dead links (#79) 2016-11-03 11:29:42 -06:00
Jakob Lykke Andersen 45b600b665 VF2, fix assumption that index maps are default constructible. (#27) 2016-11-03 11:29:32 -06:00
K. Noel Belcourt 41dc6bc8ec Update meta data. 2016-11-03 11:29:17 -06:00
Murray Cumming 09914913d8 Remove any support for slist, which is a deprecated gcc extension. (#73)
We might want to add support for std::forward_list as a replacement
for slist.
2016-11-03 11:29:05 -06:00
K. Noel Belcourt 38c0346d50 Fix uninitialized variable. 2016-11-03 11:28:48 -06:00
K. Noel Belcourt d59e865d77 Remove unused typedef. 2016-11-03 11:28:38 -06:00
K. Noel Belcourt 06184c0bfe Fix a tautological compare warning with clang on mbp. 2016-11-03 11:28:28 -06:00
K. Noel Belcourt 15d1ce3c5b Add dependency on missing deprecated header <boost/detail/iterator.hpp>
This so all examples build correctly.  Will need to migrate the rest
of the code to use <boost/iterator/...>  instead.
2016-11-03 11:28:16 -06:00
K. Noel Belcourt 96e152f8e5 Remove unwanted side effect from add_edge call. 2016-11-03 11:28:03 -06:00
K. Noel Belcourt 10035bd207 Silence uninitialized variable warning. 2016-11-03 11:27:53 -06:00
K. Noel Belcourt d311ba1ccf Fix unused variable warning. 2016-11-03 11:27:41 -06:00
K. Noel Belcourt 3977e06d83 Fix duplicate quick_tour build target. 2016-11-03 11:27:31 -06:00
E Kawashima e758310566 Enable printing functions to use arbitary std::ostream and avoid flush (#71)
* print_in_edges
* print_graph_dispatch
* print_graph
* print_edges
* print_edges2
* print_vertices
2016-11-03 11:27:20 -06:00
E Kawashima 3b503707ad doc/subgraph.html: fix typo (#76) 2016-11-03 11:27:07 -06:00
akumta 03b9b5bdfd update for ticket #12526 (#77)
Thanks for the patch.
2016-11-03 11:26:55 -06:00
Matt Barr da0610c99b Add degree to reverse_graph (#78)
degree is required for BidirectionalGraphConcept.
Also adds the concept check to the reverse_graph unit test.
2016-11-03 11:26:41 -06:00
Maël Valais db5c1b317c Add Travis-ci as the continuous integration service for Boost.Graph (#63)
* Add travis-ci as CI for boostorg/graph repo.

I thought it would be a great idea to have the test running from a
"neutral entity" instead of having to checkout the pull request and
cd libs/graph/test && ../../../b2

I saw that many other boostorg submodules had their own CI system:
- compute relies on travis-ci
- geometry uses circleci

The major difference between circleci and travis-ci is the multi-threading supported by circleci. Both are free for open-source project (as of 2016/04/26). I chose travis-ci because I know how to configure it.

As for geometry, we could also use coveralls.io to display the test covering reports and improve the quality/coverage of tests on boostorg/graph.

IMPORTANT: a member of boostorg will have to add the repo boostorg/graph into travis-ci for it to work.

* csr_graph_test won't pass unless -std=c++11 is enabled

* Fixed gcc too old (4.6.3) using instead gcc-4.8 for -std=c++11
2016-11-03 11:26:29 -06:00
Murray Cumming 05a9ed31da Add a .clang-format file. (#68)
So we can at least make the examples use a more consistent code style.

Run clang-format like so:
$ clang-format -i *.cpp
and use git diff to see what has changed.

This will strip trailing whitespace too. You can ignore that by
using git diff -w
2016-11-03 11:26:19 -06:00
Murray Cumming c1ccf73891 example: Build all the examples (#64)
* examples: Sort the examples in the Jamfile.

This makes it easier to see which example files are even
mentioned in the build.

* examples: Build all examples.

To at least test that they build with the current API.

The newly-mentioned files here seem to be mostly (maybe all) the
BGL book examples that were added in 2001:
https://github.com/boostorg/graph/commit/5215e9b4f201bf4509a78abe89d16cb8f4199bbd
I would prefer to put these all in an examples/bgl_book subdirectory.

* Examples build: Comment out examples that cannot be expected to build.

For instance, because they depend on SBG or Stanford Graph.

* Examples: Add missing <iostream> includes.

* Examples: Comment out unused typedefs and variables.

* Examples: king_ordering: Adapt to newer API.

Specify the extra parameter for king_ordering().
The API was changed in 2005:
https://github.com/boostorg/graph/commit/4bc19a162166c025ba878cf77e959deab8cf1983
The test code was already correct:
https://github.com/imvu/boost/blob/master/libs/graph/test/king_ordering.cpp

* Examples: Some graphviz examples: Link to the library.

read_graphviz() is not header only.

* csr-example: Pass edge_are_sorted to constructor.

To use the new (well, in 2009) API:
https://github.com/boostorg/graph/commit/809904f268eb719e400fb20a4b62e17c45247066

* iteration_macros: Use BGL_FORALL_ADJ.

Not BGL_FORALL_ADJACENT(), which doesn't exist, because this was
changed in 2001:
https://github.com/boostorg/graph/commit/a0061ba07e8662561b362461c2d4347a5eb5f236

* examples: kevin-bacon2: Fix the build.

Include boost/serialization/string.hpp to fix this error:
kevin-bacon2.cpp:68:9:   required from here
../../../boost/serialization/access.hpp:116:9: error: ‘class std::__cxx11::basic_string<char>’ has no member named ‘serialize’

and link to the boost serialization library.

* examples: loop_dfs: Add a missing typename keyword.

* examples: accum-compile-times: Remove unused variables.

* Examples: Remove unused typedefs.

* examples: avoid warning about parentheses aronud &&.

* example: read_graphviz: Actually use status.

* Example: adj_list_ra_edgelist: Fix the build.

The [] syntax must have worked once but doesn't anymore.
This fixes the build but it is even more clearl now a stupid way to use
the edge iterator.

* Examples: Remove unused typedefs.

* Examples: Remove an unused variable.

* Example: iohb: A const correction.

Otherwise newer compilers complain about converting string literals
to char* when callig this function.

* Exmaples: iohb: Avoid security warning with fprintf().

* Examples: Actually use a variable.

* Examples: Comment out all Graphviz examples.

These use the now-non-existant GraphizGraph and GraphvizDigraph
types. Presumably these could be updated but it's not obvious how
to do that:
https://svn.boost.org/trac/boost/ticket/4762
2016-11-03 11:26:06 -06:00
Murray Cumming 281bb94e51 random.hpp: weighted_random_out_edge(): Add missing return. (#74)
This should avoid a compiler warning. For instance:
http://beta.boost.org/development/tests/develop/output/GLIS-homo-impi-graph-intel-linux-warnings.html#cycle_ratio_tests

Looks good, thanks.
2016-11-03 11:25:49 -06:00
K. Noel Belcourt 7cb9113a61 Disable csr_graph_test until can work through lack of c++11 support. 2016-10-31 11:02:17 -06:00
Murray Cumming 56d3e72155 bc_clustering: Remove an unused typedef. (#66)
Thanks.
2016-07-16 17:19:23 -06:00
Murray Cumming 7e54f9997d Make files not executable. (#69)
See https://github.com/boostorg/admin/issues/47
2016-07-16 17:19:11 -06:00
Nicholas Matteo 2796c0a147 Fix typos (#70)
Thanks!
2016-07-16 17:18:57 -06:00
K. Noel Belcourt b50fe850a2 Apologies to whomever committed this patch, I was unable to locate
the original commit to cherry-pick so have picked this source up
from develop and committed to master.
2016-07-16 16:43:20 -06:00
K. Noel Belcourt 529934f827 Apologies to whomever contributed this patch, I lost the original
commit.  Pick this from develop as work towards moving master
towards develop for the next release.
2016-07-16 16:41:07 -06:00
K. Noel Belcourt caa8fd4568 Minor wordsmiting and formatting picked from develop. 2016-07-16 16:39:16 -06:00
K. Noel Belcourt c7a6fdc418 Fixes unused variable warnings, picked from develop. 2016-07-16 16:35:16 -06:00
Murray Cumming 0ce03767a8 Add a README.md file.
So people can see what the project even is when they reach the GitHub repository.
Also, even the documentation doesn't have an actual short description of what
BGL is.
And, without a direct link, it is very hard to find the list of open issues
on Boost's trac system.

With many improvements from Maël Valais:
https://github.com/murraycu/graph/pull/1
2016-07-16 16:19:11 -06:00
Murray Cumming 8321c79d20 tree_traits: Add include for boost::tie().
This lets examples/graph_as_tree compile.
2016-07-16 16:18:52 -06:00
Maël Valais 589584b4e4 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-07-16 16:18:35 -06:00
Justin Viiret f0faaabca1 Make lengauer_tarjan_dominator_tree use indexMap (#49)
Pass the indexMap parameter through to the dominator_visitor and use it
instead of get(vertex_index, g). This allows this algorithm to be used
for graphs without a vertex_index property.

Addresses bug #11742.
2016-07-16 16:18:22 -06:00
K. Noel Belcourt 4b07d0b469 Eliminate unused variable, regularize formatting. 2016-07-16 16:17:54 -06:00
K. Noel Belcourt cdc7f4f75b Remove unused member variable. 2016-07-16 16:17:44 -06:00
K. Noel Belcourt 9249b640e4 Fix a stack variable bound to member reference, a concept
checking variable that was unused triggering a warning,
and a documentation typo.
2016-07-16 16:17:33 -06:00
coderakki c0756b5ebf Update kamada_kawai_spring_layout.hpp (#53) 2016-07-16 16:17:21 -06:00
Alexander Lauser a14f8df86c Fixed bug 10231 partly: If finish_edge was called, then now correctly. (#16)
This appears to be fixed, we may have to patch this to ensure there's no backward compatibility issues with older compilers.  Thanks for the bug report and patch.

The bug that it never gets called with the current construction remains.
2016-07-16 16:17:09 -06:00
K. Noel Belcourt 7f94230dca Revert "removed an unused function (#39)"
This reverts commit 655ce30eb3.
2016-07-16 16:16:59 -06:00
Mads Jensen ecf83843e7 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-07-16 16:16:42 -06:00
K. Noel Belcourt 13cea9c32b Fix unused variable warning. 2016-07-16 16:16:33 -06:00
K. Noel Belcourt 50cb642e94 Quiet an unused variable warning. 2016-07-16 16:16:23 -06:00
sehe c112afbbad Fix labeled_graph constructors (#58)
* Fix labeled_graph constructors

* Wraparound bug leads to out-of-bounds addressing. 

    Seems obvious that `> 0` was meant (seeing the comments). 
    Also, if `vertices_size_type` is unsigned - which it usually (always?) is - the loop condition was never false.

 * Finally, one constructor didn't properly initialize the graph property

* Copy vertex property on add_vertex

Tested with clang on El Capitan, thanks!
2016-07-16 16:16:09 -06:00
felix b1a4f32b1f use graph_traits to access *_category types of a Graph (#54)
Tested with El Capitan and clang-darwin, thanks!
2016-07-16 16:15:54 -06:00
Arne B f9e930f006 Fixes bug 10449 (#57)
Without this patch it is not possible to call the copy constructor of directed_graph
2016-07-16 16:15:36 -06:00
E Kawashima a4e6f4dd78 fix typo in document of subgraph (#62)
Thanks!
2016-07-16 16:15:20 -06:00
Jakob Lykke Andersen 753c88c484 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-07-16 16:15:09 -06:00
Jared Grubb fa7ef591c2 Fix Ticket #11133: Graph: using 'nil' as a local variable (#34)
Looks good, thanks.
2016-07-16 16:14:55 -06:00
Louis Dionne eec98072db [Doc] Fix broken link to article for hawick_circuits, and remove useless .md file (#50)
Also update copyright and add license information.

Thanks for the patch.
2016-07-16 16:14:38 -06:00
Jakob Lykke Andersen 48b63adf44 Doc: remove IncidenceGraph requirement from AdjacencyGraph. (#28)
Thanks for the fix, it's good to have to documentation reflect the actual code.
2016-07-16 16:14:16 -06:00
Daniel J. H b0214ec131 Fix some minor documentation annoyances (#51)
* Fix documentation about type alias edge_size_type -> edges_size_type

This replaces occurences of `edge_size_type` (sg.) in the documentation
with the actual `edges_size_type` (pl.) as it is named in the
implementation.

There is a graph implementation (Stanford graph) that has a type alias
of `edge_size_type` (sg.) --- I did not change that implementation, as
it would break backwards compatibility, and therefore I also did not
change its documentation.

* Fix documentation on push_relabel algorithm, defined in header: preflow_push -> push_relabel
2016-07-16 16:14:01 -06:00
Vladimir Prus ba0cf281c9 Add missing include of <list>.
Thanks to Amit Prakash Ambasta for the report.
2016-07-16 16:13:34 -06:00
Ola Nilsson b5171962bf Fix doc spelling 2016-07-16 16:12:09 -06:00
Ahmed Charles 5d8c6fd1d3 Match concept_def.hpp and concept_undef.hpp. 2016-07-16 16:11:55 -06:00
Mads Jensen 59aba774bc Typo in Misra name 2016-07-16 16:11:12 -06:00
Mads Jensen 0eabc7ceb5 documentation fix for "allow_parallel_edge-_tag" 2016-07-16 16:10:59 -06:00
Mads Jensen 8729cc8a7c no need for executable flag on source files 2016-07-16 16:10:30 -06:00
Akira Takahashi 5bfc793f06 breadth_first_search doc : fix figure number
BFS Figure number is 6.
2016-07-16 16:10:11 -06:00
Akira Takahashi b357a88ecd add_edge doc : fix minor mistake
s/member function/non-member function/
2016-07-16 16:09:53 -06:00
K. Noel Belcourt a089d3bc35 Fix uninitialized variable by setting to null_vertex.
Thanks to Lu Wang for reporting this.
2016-07-16 16:08:58 -06:00
K. Noel Belcourt 04c1c99051 Add new strong components test to Jamfile from Alex Lauser.
Remove long unused file.
2016-07-16 16:04:39 -06:00
K. Noel Belcourt d6b7a717db 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.
2016-07-16 16:03:30 -06:00
K. Noel Belcourt b6d9a72999 Fix macro logic for gcc 5, thanks to Alex Lauser
for pointing this out.
2016-07-16 16:03:18 -06:00
Alexander Lauser 6f5964a6bd Cleaned up the strong-components test. 2016-07-16 16:02:59 -06:00
Alexander Lauser d155583ac2 Added test for Boost.Graph's strong_components.
Associated with Bug #10231 which causes the test to fail.
2016-07-16 16:02:31 -06:00
K. Noel Belcourt 6a2d45ae20 Condition TTI finish_edge on supported compilers.
If compiler doesn't support has_member_function for member
templates, use old TTI syntax to avoid compiler error.
Supported compilers are gcc 4.9 and newer, clang any platform,
and intel 12 and newer.
2016-07-16 16:02:12 -06:00
K. Noel Belcourt 0e1414f46e Fix type traits so finish_edge is called when defined.
Changed the usage of TTI so that finish_edge is actually
called when defined.  Also regularized the finish_edge
signature so E is passed by value and G by const ref.
2016-07-16 16:01:53 -06:00
K. Noel Belcourt 189c113f04 Add missing iostream header. 2016-07-16 16:01:30 -06:00
Jakob Lykke Andersen add3546f94 Update attribute delimiter for read_graphviz
Support semicolon and nothing as ending of attributes, in addition to comma. See http://graphviz.org/content/dot-language.
2016-07-16 16:01:11 -06:00
mikael 6416fecc90 Simplified the move and copy constructor and assignment to avoid the maintenance nightmare of trying to rely on default functions. 2016-07-16 16:00:51 -06:00
Lorenz Breidenbach 8ca2084c9d Add missing #include of boost/functional/hash.hpp 2016-07-16 16:00:20 -06:00
Josef Cibulka 5b84005bac Comparison of doubles in graphml_test.cpp in now done with some tolerance to rounding errors. 2016-07-16 15:59:44 -06:00
Josef Cibulka 6a33285342 Changed asserts to BOOST_CHECK in graphml_test.cpp 2016-07-16 15:59:19 -06:00
Josef Cibulka 379383b62a Added reading of graph properties from graphml. 2016-07-16 15:57:52 -06:00
Daniel James a5b6a097e6 Add metadata file. 2016-07-16 15:56:22 -06:00
Marcel Raad 316445d7c9 Fix MSVC14 compile break
array_binary_tree_node::children_type::iterator pretends to be a bidirectional iterator but does not define operator--, which results in compile breaks with Visual C++ 2015.
2016-05-08 17:47:46 -06:00
K. Noel Belcourt ed98931118 Fixes to clear graph and graph_parallel for 1.61 release. 2016-04-27 05:42:03 -06:00
marcinz daa2e69db1 Merge pull request #46 from aschnell/patch-1
fixed typo
2015-10-23 08:50:19 -04:00
Arvin Schnell 6a559d3b73 coding style 2015-10-23 14:25:08 +02:00
Arvin Schnell b31f6de077 fixed typo 2015-10-23 14:15:57 +02:00
Eric Niebler 70a2630932 Merge pull request #14 from Lastique/patch-1
Fix compilation with gcc 4.4 in C++11 mode
2014-08-03 12:46:30 -07:00
Noel Belcourt 235064c63c Merge branch 'develop' 2014-05-16 15:15:30 -06:00
Noel Belcourt 1b88c5bc8b Merge branch 'master' into develop
Conflicts:
	include/boost/graph/adjacency_matrix.hpp
	include/boost/graph/detail/adjacency_list.hpp
	include/boost/graph/named_graph.hpp
	include/boost/graph/r_c_shortest_paths.hpp
	include/boost/graph/vf2_sub_graph_iso.hpp
	test/Jamfile.v2
	test/make_connected_test.cpp
2014-05-16 15:14:57 -06:00
Noel Belcourt 887de5e2e3 Merge pull request #10 from jhunold/vc12
Vc12 does not support default move constructors

Looks okay, assume you'll followup with any remaining failing vc12 tests.
2014-05-14 17:07:40 -06:00
Noel Belcourt 12d334fff6 Merge pull request #5 from BenPope/develop
Fix [un]directed_graph::swap and add tests

Nice job, thanks!  I'll have to look at your other points a bit more carefully before responding.
2014-05-14 10:41:25 -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
BenPope 1f2dc47fdd Merge branch 'develop' of github.com:boostorg/graph into develop 2014-05-14 21:51:59 +08:00
Jürgen Hunold fcaef7c4e3 Fix: vc12 doe not support defaulted move constructors, so provide an implementation. 2014-05-13 15:52:46 +02:00
Noel Belcourt 07c47bca51 Merge pull request #8 from cirosantilli/doc-quicktour-vertex-type
Explicitly use vertex type on quick tour example.
2014-04-28 13:42:15 -06:00
Ciro Santilli b77deb851a Explicitly use vertex type on quick tour example. 2014-04-28 09:28:13 +02:00
BenPope 86bbbf563d Fix directed_graph::swap 2014-04-21 22:15:48 +08:00
K. Noel Belcourt f1fe4a9132 Fix a use of typename outside of template. Looks like a merge
from develop omitted this as it's fixed in develop, not in
master.

This should clear master graph tests on Darwin and Linux.
2014-01-29 13:01:02 -07:00
Jeremiah Willcock cb26ccf2ba Changed to use unique_ptr when C++11 is enabled; made other fixes to enable move semantics
[SVN r86733]
2013-11-17 02:18:42 +00:00
Jeremiah Willcock cec654dedb Changed some names to fix shadowing warnings; refs #9371
[SVN r86680]
2013-11-13 17:36:02 +00:00
Jeremiah Willcock 983be4b9e7 Added graph property support to write_graphviz_dp
[SVN r86604]
2013-11-09 19:06:06 +00:00
Jeremiah Willcock 332b49261c Fixed invalid uses of "typename"
[SVN r86577]
2013-11-06 21:16:55 +00:00
Jeremiah Willcock a9b0657fd3 Fixed figure caption; fixes #9312
[SVN r86502]
2013-10-28 16:40:16 +00:00
Jeremiah Willcock 4af610830b Fixed edge_range bug from http://stackoverflow.com/questions/19223692/boost-graph-library-directed-multigraph-edge-range-bug?rq=1
[SVN r86469]
2013-10-26 22:57:10 +00:00
Jeremiah Willcock 031ce8084b Changed random_access_iterator_property_map to iterator_property_map in documentation; fixes #9300
[SVN r86456]
2013-10-26 15:30:09 +00:00
Jeremiah Willcock db6e8b7981 Moved parts of PBGL used by parallel property maps over to property map directories and namespaces; this fixes circular dependencies between these two libraries (assuming boost/property_map/parallel is treated as a separate library)
[SVN r86381]
2013-10-21 18:29:04 +00:00
Jeremiah Willcock 74564d5a1c Made some of changes from #9246: added new test case (modifying tests on callback usage to match current documentation); removed special-casing of empty graphs; added patch from #9246 for correct return values; did not make change to documentation suggested there since I chose to have the callback called even for empty graphs; fixes #9246
[SVN r86336]
2013-10-17 02:51:14 +00:00
Stephen Kelly 91a21a559c Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifndef...#else...#endif blocks.

[SVN r86245]
2013-10-11 23:17:48 +00:00
Stephen Kelly 73b68e32ba Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifndef...#endif conditions.

[SVN r86244]
2013-10-11 23:15:00 +00:00
Stephen Kelly 0464915a7f Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifdef...#endif blocks.

[SVN r86243]
2013-10-11 23:13:10 +00:00
Jeremiah Willcock 4ebf7f60fc Applied patch from #9229 to allow common subgraphs of size 1; fixes #9229
[SVN r86236]
2013-10-11 14:32:02 +00:00
Jeremiah Willcock 4fc3cbfaae Made boost::unordered inclusion unconditional; removed support for non-partial-specialization compilers; enabled C++11 unordered containers when they are present; refs #8962
[SVN r86137]
2013-10-02 19:15:21 +00:00
Jeremiah Willcock da59145176 Fixed documentation about hash_setS; fixes #6990
[SVN r86136]
2013-10-02 19:10:30 +00:00
Jeremiah Willcock bed19d5c25 Qualified calls to tie in documentation; fixes #9184
[SVN r86126]
2013-10-01 18:12:50 +00:00
Stephen Kelly f0f1251da7 Graph: Remove obsolete GCC version check.
[SVN r86059]
2013-09-30 15:55:18 +00:00
Stephen Kelly 4f8a34090e Pending: Remove obsolete MSVC version checks.
[SVN r86028]
2013-09-30 00:19:09 +00:00
Stephen Kelly e096e7e5cc Graph: Remove obsolete MSVC version checks.
[SVN r85934]
2013-09-26 09:41:38 +00:00
Jeremiah Willcock 51d3fe8aed Cleaned up property maps and added a bunch of error checking asserts
[SVN r85853]
2013-09-23 15:30:22 +00:00
Jeremiah Willcock 5922324c2b Merged Boost.Graph, Boost.Graph.Parallel, and Boost.PropertyMap changes from Boost trunk
[SVN r85813]
2013-09-21 20:17:00 +00:00
Jeremiah Willcock f97c2ee746 Attached patch from Piotr Wygocki for min-cost max-flow
[SVN r85661]
2013-09-13 14:48:17 +00:00
Jeremiah Willcock c40148ee94 Removed uses of pointers as property maps from tests and examples
[SVN r85655]
2013-09-12 15:14:36 +00:00
Jeremiah Willcock fdd8e41b47 Fixing tests (hopefully) for VC++
[SVN r85654]
2013-09-12 14:01:50 +00:00
Jeremiah Willcock 93f232252e Fixed VC++ warning
[SVN r85594]
2013-09-07 16:36:45 +00:00
Jeremiah Willcock 93f4a862c3 Changed from iterator to const_iterator to fix VC++ issue
[SVN r85593]
2013-09-07 16:34:49 +00:00
Jeremiah Willcock e1bcb667b6 Fixed ambiguous call
[SVN r85583]
2013-09-06 03:54:57 +00:00
Jeremiah Willcock 405e21d011 Applied patch from potato_research to add copyright notice
[SVN r85580]
2013-09-05 19:48:31 +00:00
Jeremiah Willcock a3efa1c030 Added new test from potato_research of custom vertex index map in r_c_shortest_paths
[SVN r85571]
2013-09-05 12:57:15 +00:00
Jeremiah Willcock bd107e4ab5 Applied patch and file renames from Piotr Wygocki
[SVN r85568]
2013-09-04 21:39:21 +00:00
Jeremiah Willcock 85b45da7c8 Fixed various data type bugs, and cleaned up signed vs. unsigned and int vs. size_t issues
[SVN r85567]
2013-09-04 20:47:36 +00:00
Jeremiah Willcock 8aa602b40d Fixed pseudocode in documentation; fixes #9080
[SVN r85551]
2013-09-03 18:12:59 +00:00
Jeremiah Willcock 915b70ec05 Added min_cost_max_flow code from Piotr Wygocki
[SVN r85536]
2013-08-31 20:09:11 +00:00
Jeremiah Willcock 5297423229 Added edge coloring code from Maciej Piechotka; fixes #8317
[SVN r85534]
2013-08-31 19:44:08 +00:00
Jeremiah Willcock 01a683d8ce Added Hawick circuits code from Louis Dionne; fixes #8433
[SVN r85533]
2013-08-31 19:29:22 +00:00
Jeremiah Willcock 5ba855f46e Removed use of "void" as property type to avoid errors in Clang; added static assertion to prevent this use in the future (it is broken anyway)
[SVN r85472]
2013-08-26 04:11:49 +00:00
Jeremiah Willcock d983ea89a5 Simplified negative-edge test; refs #9012
[SVN r85387]
2013-08-17 22:21:16 +00:00
Jeremiah Willcock cd267de654 Fixed test for negative-weight edges when combine operator is project2nd (as in prim_minimum_spanning_tree); fixes #9012; refs #8398
[SVN r85386]
2013-08-17 22:12:20 +00:00
Jeremiah Willcock 130f7129c3 Added MSSP support for non-named parameter versions
[SVN r85348]
2013-08-14 15:34:02 +00:00
Jeremiah Willcock be2fc043d1 Fixed unused typedef warnings from GCC 4.9; fixes #8877; fixes #8986
[SVN r85323]
2013-08-12 18:14:58 +00:00
Jeremiah Willcock a5a29bd065 Changed to use adjacency_list for temporary graph, avoiding ADL issues with vector_as_graph; fixes #8791
[SVN r84976]
2013-07-07 16:50:24 +00:00
Jeremiah Willcock 73d2d7500e Added #define to detect recent modification
[SVN r84915]
2013-06-29 19:12:52 +00:00
Jeremiah Willcock d53729083f Changed dispatching strategy for bfs_helper
[SVN r84913]
2013-06-28 18:47:30 +00:00
Jeremiah Willcock 37bd777094 Moved distributed graph tags into graph_traits.hpp
[SVN r84912]
2013-06-28 18:47:10 +00:00
Jeremiah Willcock ca70cdaa2c Removed assertion to enable removal of non-existent edges, as suggested by comment to #4622; refs #4622
[SVN r84869]
2013-06-21 20:06:45 +00:00
Jeremiah Willcock 5e88d92265 Merged another bug fix from trunk
[SVN r84728]
2013-06-10 15:23:08 +00:00
Jeremiah Willcock 61296c352a Changed // comments to be non-greedy; fixes #8681
[SVN r84725]
2013-06-10 14:29:39 +00:00
Jeremiah Willcock 2cd57a4180 Merged more Boost.Graph bug fixes from trunk
[SVN r84641]
2013-06-04 20:53:19 +00:00
Jeremiah Willcock df1a183214 Added reference in parameter type
[SVN r84633]
2013-06-04 16:07:45 +00:00
Jeremiah Willcock bf00bbe4f0 Fixed dangling reference bug reported by Marshall Clow; other small cleanups
[SVN r84632]
2013-06-04 16:07:20 +00:00
Jeremiah Willcock b98f225d0d Removed unused typedefs
[SVN r84471]
2013-05-25 02:20:09 +00:00
Jeremiah Willcock 1311d1b035 Chaned project1st and project2nd function objects to return copies rather than references to arguments, preventing a dangling reference when the type of the argument passed in is not exactly the same as the template argument of the projection function object
[SVN r84466]
2013-05-24 21:19:21 +00:00
Jeremiah Willcock 966aa0cf48 Fixed to work with self-loops
[SVN r84396]
2013-05-20 21:33:31 +00:00
Jeremiah Willcock 67f7bcfa96 Merged Boost.Graph, Boost.Graph.Parallel, and Boost.PropertyMap changes from trunk
[SVN r84299]
2013-05-16 15:38:05 +00:00
Jeremiah Willcock 2c62f35e46 Added timeout support code from Brammert Ottens
[SVN r84102]
2013-05-01 17:42:44 +00:00
Jeremiah Willcock 67aacbe6ef Added support for distance types without numeric_limits specializations; changed test to use that functionality to ensure that it keeps working; fixes #8490
[SVN r84028]
2013-04-24 02:19:13 +00:00
Jeremiah Willcock 53bdf1db9c Applied patch from #7155 to add "graphml" as a value for "for"; fixes #7155; fixes #7016
[SVN r83961]
2013-04-18 20:21:39 +00:00
Jeremiah Willcock 7e9b77f5fb Fixed VC++ error
[SVN r83893]
2013-04-14 03:49:56 +00:00
Jeremiah Willcock 535e593810 Added sloan_ordering example to build list
[SVN r83878]
2013-04-13 18:20:45 +00:00
Jeremiah Willcock c40a522362 Fixed 32/64-bit size issues; fixes #8434
[SVN r83877]
2013-04-13 18:20:16 +00:00
Jeremiah Willcock 32fa162931 Fixed documentation to be correct; fixes #8428
[SVN r83857]
2013-04-12 19:54:31 +00:00
Jeremiah Willcock 65c9ef22c6 Flipped arguments to combine calls to match documentation; refs #8428
[SVN r83845]
2013-04-11 17:19:38 +00:00
Jeremiah Willcock 44912cc2be Fixed some typos; not a fix to #8428 yet
[SVN r83844]
2013-04-11 17:14:28 +00:00
Jeremiah Willcock f9dbc3ffb3 Removed unnecessary requirement; fixes #8427
[SVN r83837]
2013-04-10 20:42:27 +00:00
Jeremiah Willcock 3e770e171e Added patches from Flavio De Lorenzi; fixed HTML typo in VF2 documentation
[SVN r83832]
2013-04-10 17:03:21 +00:00
Jeremiah Willcock 4f3e758c9c Fixed example for C++11 mode
[SVN r83798]
2013-04-07 19:37:29 +00:00
Jeremiah Willcock 0e4f022d9d Changed test for negative edges per #8398; fixes #8398
[SVN r83772]
2013-04-05 18:25:33 +00:00
Jeremiah Willcock 393c072c18 Added maximum adjacency search from Fernando Vilas; fixes #6780
[SVN r83410]
2013-03-12 00:35:48 +00:00
Jeremiah Willcock 2539ea8bca Changed .size() comparison against 0 to .empty()
[SVN r83409]
2013-03-12 00:34:38 +00:00
Jeremiah Willcock 02aaeccae5 Changed difference_types to not be void
[SVN r83366]
2013-03-08 17:31:15 +00:00
Jeremiah Willcock 3ebad4bc01 Added patch to example from Takatoshi Kondo
[SVN r83234]
2013-03-01 18:41:32 +00:00
Jeremiah Willcock 057a718a39 Added new versions of VF2 from Jakob Lykke Andersen; fixes #8166; some test cases for the new functionality would be appreciated as a separate patch.
[SVN r83233]
2013-03-01 18:17:34 +00:00
Jeremiah Willcock 51a28ac04b Fixed handling of const graphs and property maps; fixes #8192
[SVN r83191]
2013-02-27 22:04:17 +00:00
Jeremiah Willcock e8eba95d4a Fixed typo in tag
[SVN r83067]
2013-02-21 19:51:54 +00:00
Jeremiah Willcock afd2ee41bd Removed uses of check_is_close which seems to be broken now
[SVN r82779]
2013-02-07 21:13:56 +00:00
Jeremiah Willcock e41d96177f Added check to prevent use of remove_vertex on named adjacency list graphs with vecS vertex container (since it does not work and could not be made to work efficiently); refs #7863
[SVN r82498]
2013-01-14 21:03:48 +00:00
Jeremiah Willcock 1c54f431ca Changed loop header to avoid GCC warning from -Wunsafe-loop-optimizations
[SVN r82445]
2013-01-11 03:05:08 +00:00
Jeremiah Willcock 7ea6373369 Removed obsolete workarounds and changed to iterator_property_map; refs #7877
[SVN r82441]
2013-01-10 22:51:53 +00:00
Jeremiah Willcock 8caf6fc368 Removed obsolete workaround
[SVN r82440]
2013-01-10 22:50:14 +00:00
Jeremiah Willcock f10ad0650a Changed to iterator_property_map; fixes #7877
[SVN r82439]
2013-01-10 22:49:10 +00:00
Jeremiah Willcock 2f12c59529 Added more examples to Jamfile
[SVN r82438]
2013-01-10 22:14:46 +00:00
Jeremiah Willcock 086cd12a7e Applied variant of patch from #7845; fixes #7845
[SVN r82358]
2013-01-04 19:29:27 +00:00
Jeremiah Willcock 22b521ecf4 Merged Boost.Graph changes from trunk for 1.53
[SVN r82061]
2012-12-17 23:59:46 +00:00
Jeremiah Willcock 31cf899da9 Trying to fix defaults for StoredEdge; refs #7801
[SVN r82052]
2012-12-17 17:37:39 +00:00
Jeremiah Willcock ebd636bfc0 Added VF2 updates from Flavio De Lorenzi
[SVN r82050]
2012-12-17 17:11:02 +00:00
Jeremiah Willcock 8a1913f804 Trying to fix property map ambiguities with distributed graphs on Intel compiler
[SVN r82010]
2012-12-16 05:16:47 +00:00
Jeremiah Willcock f53d02e0eb Added updates from Flavio De Lorenzi to vf2_sub_graph_iso code
[SVN r82007]
2012-12-16 01:51:51 +00:00
Jeremiah Willcock 233cc514c5 Re-added incident edges example from documentation; fixed undirected_adjacency_list.expected to match current code; fixed link to undirected.cpp example in documentation; fixes #7787
[SVN r81869]
2012-12-12 03:38:48 +00:00
Jeremiah Willcock 5f6963e0f0 Fixed typo; fixes #7780
[SVN r81822]
2012-12-10 15:26:59 +00:00
Jeremiah Willcock 25852f92af Applied patch from #7766; fixes #7766
[SVN r81772]
2012-12-07 19:41:01 +00:00
Jeremiah Willcock 36d3d83375 Fixed adding properties in labeled_graph; fixes #7773
[SVN r81771]
2012-12-07 19:30:28 +00:00
Jeremiah Willcock 867f8cf495 Fixed directed_graph and undirected_graph handling of vertex_all and edge_all properties
[SVN r81770]
2012-12-07 19:29:12 +00:00
Jeremiah Willcock add307aafc Added info on default argument; fixes #7771
[SVN r81747]
2012-12-07 01:33:49 +00:00
Jeremiah Willcock 0c2db206d3 Added VF2 subgraph isomorphism algorithm from Flavio De Lorenzi and Vomel Christof
[SVN r81725]
2012-12-05 19:28:12 +00:00
Jeremiah Willcock fd7f84560b Changed to BOOST_ASSERT
[SVN r81724]
2012-12-05 19:26:38 +00:00
Jeremiah Willcock 6aed0a5a45 Removed unused code
[SVN r81603]
2012-11-27 22:25:50 +00:00
Jeremiah Willcock 1a9533422d Fixed template parameter names; fixes #4386
[SVN r81602]
2012-11-27 22:17:25 +00:00
Jeremiah Willcock 56223ce7b0 Added name A* for astar_search
[SVN r81601]
2012-11-27 22:14:29 +00:00
Jeremiah Willcock e39be516c2 Added tree version of astar_search functions
[SVN r81600]
2012-11-27 22:13:46 +00:00
Jeremiah Willcock 55047c74c1 Added new property map that returns a constant and eats writes
[SVN r81599]
2012-11-27 22:12:39 +00:00
Jeremiah Willcock d1bd08f2a3 Added astar-cities example to build list
[SVN r81598]
2012-11-27 22:12:17 +00:00
Jeremiah Willcock 74dc17ee94 Added assertions and cast on property map value
[SVN r81597]
2012-11-27 22:11:57 +00:00
Jeremiah Willcock 942d3430f1 Removed references to member types not required by documentation; fixed concept definitions; fixes #7741
[SVN r81589]
2012-11-27 15:14:36 +00:00
Jeremiah Willcock eefb7a3d47 Applied patch from #7728 to fix B-K max-flow bug; fixes #7728; fixes #3468
[SVN r81536]
2012-11-25 20:13:25 +00:00
Jeremiah Willcock 923877b3c5 Applied patch from #7684; fixes #7684
[SVN r81369]
2012-11-16 15:30:42 +00:00
Jeremiah Willcock 4495a409e5 Added support for reading reliably from files with more than one GraphML graph
[SVN r81313]
2012-11-12 22:30:19 +00:00
Jeremiah Willcock 1bb17dab63 Applied patch from #7648; fixes #7648
[SVN r81218]
2012-11-06 13:23:03 +00:00
Jeremiah Willcock f95e102060 Applied patch from #7600; fixes #7600
[SVN r81099]
2012-10-29 18:16:22 +00:00
Jeremiah Willcock 0df5824004 Trying to fix issue reported by Jan Hudec
[SVN r81049]
2012-10-22 20:12:34 +00:00
Jürgen Hunold 3419d42acc Merge 80908,80939,80957 from ^/trunk
------------------------------------------------------------------------
  r80908 | jewillco | 2012-10-08 22:04:48 +0200 (Mo, 08 Okt 2012) | 1 line
  
  Added attempt at workaround for VC++ const graph type bug
  ------------------------------------------------------------------------
  r80939 | jewillco | 2012-10-10 19:27:44 +0200 (Mi, 10 Okt 2012) | 1 line
  
  Added another remove_const to work around VC++ 9 issues
  ------------------------------------------------------------------------
  r80957 | jewillco | 2012-10-11 18:45:33 +0200 (Do, 11 Okt 2012) | 1 line
  
  Added test from Juergen Hunold
  ------------------------------------------------------------------------


[SVN r81042]
2012-10-21 18:06:15 +00:00
Marshall Clow b5b07e13a8 Merge comment typo to release; Fixes #7511
[SVN r80998]
2012-10-16 03:44:59 +00:00
Marshall Clow 2275b3019b Fix typo; Refs #7511
[SVN r80997]
2012-10-16 03:35:39 +00:00
Jeremiah Willcock 0a990db1c5 Fixed for starting vertices other than 0; thanks to Morten Strandberg for the bug report
[SVN r80961]
2012-10-11 20:09:23 +00:00
Jeremiah Willcock b4e1fe7a66 Added test from Juergen Hunold
[SVN r80957]
2012-10-11 16:45:33 +00:00
Jeremiah Willcock 8c4d0b33cd Added another remove_const to work around VC++ 9 issues
[SVN r80939]
2012-10-10 17:27:44 +00:00
Jeremiah Willcock 0d1769a27c Added attempt at workaround for VC++ const graph type bug
[SVN r80908]
2012-10-08 20:04:48 +00:00
Jeremiah Willcock 8f37c21e99 Fixed return type of vertex_by_label
[SVN r80879]
2012-10-05 22:40:22 +00:00
Jeremiah Willcock 34ddb83a49 Removed extra semicolon; fixes #7467
[SVN r80842]
2012-10-04 14:49:26 +00:00
Jeremiah Willcock c964747407 Applied patch from #7457; fixes #7457
[SVN r80814]
2012-10-02 03:05:22 +00:00
Jeremiah Willcock b214ef2f4d Changed classes to structs to get public inheritance; thanks to Shaun Jackman for the bug report
[SVN r80811]
2012-10-01 18:31:15 +00:00
Jeremiah Willcock 607d866854 Merged Boost.Graph changes from trunk
[SVN r80740]
2012-09-28 18:34:12 +00:00
Jeremiah Willcock f95abaa83c Applied patch from #7428; fixes #7428
[SVN r80725]
2012-09-27 17:43:07 +00:00
Jeremiah Willcock ddf8a5e07e Removed incorrect note about restrictions on graph dimensionality and fixed other typos; fixes #6950
[SVN r80642]
2012-09-22 20:09:44 +00:00
Jeremiah Willcock 3009b2303c Checking multiple dimensionalities of graphs
[SVN r80641]
2012-09-22 20:09:08 +00:00
Jeremiah Willcock b9e9ed2067 Removed invalid templated friend definitions and fixed other bugs
[SVN r80640]
2012-09-22 20:08:44 +00:00
Jeremiah Willcock f16a1b114d Fixed relax logic to not write predecessor map unless distance was actually changed in memory (although this case will never be hit unless registers have extra precision compared to memory); fixes #7226
[SVN r80639]
2012-09-22 19:32:32 +00:00
Jeremiah Willcock 8afe81608c Reversed incorrect order of arguments to non-named-parameter call; fixes #7380
[SVN r80638]
2012-09-22 19:26:30 +00:00
Jeremiah Willcock 3be269ba35 Added wording that infinite-weight edges are not guaranteed to work correctly; fixes #7398
[SVN r80637]
2012-09-22 19:21:39 +00:00
Jeremiah Willcock 58829e019b Added more enable_ifs to try to get code working on VC++
[SVN r80582]
2012-09-18 18:20:15 +00:00
Jeremiah Willcock 663127c3b7 Trying to remove unnecessary member accesses (that might not exist) for unused traits
[SVN r80569]
2012-09-18 03:27:42 +00:00
Jeremiah Willcock 9002628f15 Further fixed #7378 issue; refs #7378
[SVN r80532]
2012-09-15 13:49:04 +00:00
Jeremiah Willcock 076085fd29 Using lazy_enable_if to avoid "reference to void" errors for properties that are not found; fixes #7378
[SVN r80528]
2012-09-14 21:41:06 +00:00
Jeremiah Willcock adaa84d861 Added void as default value of lookup_one_property_internal::type for "not found"; refs #7378
[SVN r80524]
2012-09-14 18:04:00 +00:00
Jeremiah Willcock 8c83132ef7 Applied patch from #7327; fixes #7327
[SVN r80511]
2012-09-13 13:18:36 +00:00
Jeremiah Willcock 60b5e07027 Allowed pointers-to-base-members to be used to access properties of derived bundled property classes; fixes #7308
[SVN r80505]
2012-09-12 12:24:04 +00:00
Jeremiah Willcock 58ff2364ba Fixed typos
[SVN r80490]
2012-09-11 07:04:18 +00:00
Jeremiah Willcock fecccdd81c Changed core_numbers to use d_ary_heap and only update queue elements that are in the queue; fixes #7341
[SVN r80421]
2012-09-06 15:31:41 +00:00
Jeremiah Willcock b52e49730b Fixed issues with indirect_cmp; fixes #7338
[SVN r80420]
2012-09-06 13:44:21 +00:00
Jeremiah Willcock 9dcbb861d6 Added warning about copying
[SVN r80407]
2012-09-05 15:19:59 +00:00
Jeremiah Willcock d2d880b4e0 Made edge weight a reference based on a suggestion by Tristram Gräbener; made vertex distance variables const values
[SVN r80264]
2012-08-27 19:05:25 +00:00
Jeremiah Willcock 88101e0ab0 Fixed default template arguments
[SVN r80216]
2012-08-25 20:45:29 +00:00
Jeremiah Willcock 4672f4d430 Fixed typo
[SVN r80189]
2012-08-25 03:10:40 +00:00
Jeremiah Willcock 6dc5eb1d6a Fixed typo
[SVN r80188]
2012-08-25 03:09:27 +00:00
Jeremiah Willcock 48f4d92a38 Removed retag_property_list and all uses of it
[SVN r79855]
2012-08-02 18:05:11 +00:00
Jeremiah Willcock ff872bad11 Fixed subgraph_properties example and added more examples to Jamfile.v2
[SVN r79833]
2012-08-01 15:31:23 +00:00
Jeremiah Willcock 245e36feba Fixed order of arguments to get_param_type
[SVN r79772]
2012-07-27 18:23:02 +00:00
Jeremiah Willcock 1cdce524a2 Merged r79227 from trunk, hopefully fixing all VC++ Boost.Graph Graphviz test issues
[SVN r79771]
2012-07-27 18:15:55 +00:00
Jeremiah Willcock ba9155f89c Merged bug fix from trunk
[SVN r79393]
2012-07-09 20:15:04 +00:00
Jeremiah Willcock df80876475 Fixed uninitialized variable problem
[SVN r79391]
2012-07-09 20:10:02 +00:00
Jeremiah Willcock 6604e3a013 Merged more changes (bug fixes, especially hopefully fixing the VC++ test failure) from trunk
[SVN r79390]
2012-07-09 20:07:47 +00:00
Jeremiah Willcock 408469afcf Refactored handling of properties (especially bogus property tags) to work around VC++ <=10 issues in graphviz_test; changed graph_all_t to return ref_property_map like is needed for dynamic_properties in I/O functions
[SVN r79388]
2012-07-09 19:49:55 +00:00
Jeremiah Willcock 20ab0ffec3 Fixed VC++ issues in examples
[SVN r79387]
2012-07-09 19:48:12 +00:00
Jeremiah Willcock 71f0ab997d Added default for property_kind to try to work around VC++ issues
[SVN r79227]
2012-07-02 12:53:15 +00:00
Jeremiah Willcock 708d8b62a5 Second batch of Boost.Graph and Boost.PropertyMap changes for 1.51
[SVN r79191]
2012-06-30 20:22:16 +00:00
Jeremiah Willcock 616b9e7134 Merged first batch of 1.51 changes for Boost.Graph and Boost.PropertyMap
[SVN r79189]
2012-06-30 20:00:41 +00:00
Jeremiah Willcock 849d1538ed Fixed construction and assignment of bidirectional CSR graphs from other graphs; removed add_edges* functions (which were broken and not documented) from bidirectional CSR; fixes #7002
[SVN r79179]
2012-06-29 20:26:26 +00:00
Jeremiah Willcock 215359117a Applied patch from #7023; fixes #7023
[SVN r79177]
2012-06-29 19:40:29 +00:00
Jeremiah Willcock 5cab2dcf61 Changed grid_graph_index_map to use raw pointer to graph based on suggestion by Sergey Mitsyn
[SVN r79017]
2012-06-20 16:37:50 +00:00
Jeremiah Willcock 30dd4d8f69 Fixed property name as per #6993; fixes #6993
[SVN r79010]
2012-06-19 19:14:46 +00:00
Jeremiah Willcock 0cbdd0a40f Merged warning fixes from trunk
[SVN r78652]
2012-05-26 19:33:09 +00:00
Jeremiah Willcock 38ad939f37 Fixed warnings
[SVN r78651]
2012-05-26 19:30:47 +00:00
Jeremiah Willcock cbe70511cd Merged in more trunk bug fixes for Boost.Graph and Boost.PropertyMap
[SVN r78641]
2012-05-26 18:56:37 +00:00
Jeremiah Willcock 0b30767da0 Merged bug fixes for Boost.Graph and Boost.PropertyMap from trunk
[SVN r78639]
2012-05-26 18:23:01 +00:00
Dave Abrahams 8ff9b6c510 Replace all uses of boost/utility.hpp with more-granular includes. Solves modularization dependency nightmare.
[SVN r78502]
2012-05-18 04:44:04 +00:00
Jeremiah Willcock b37570381b Fixed inspect warnings and typos
[SVN r78442]
2012-05-12 20:46:47 +00:00
Jeremiah Willcock 34ba5d36d7 Fixed uses of std::min
[SVN r78441]
2012-05-12 20:36:02 +00:00
Jeremiah Willcock 856e0fb3ab Fixed bugs in remove_edge and clear_vertex for undirected graphs; refs #4622
[SVN r78439]
2012-05-12 20:10:11 +00:00
Jeremiah Willcock 48860d938c Removed unnecessary concept requirement; fixes #6892
[SVN r78438]
2012-05-12 18:46:34 +00:00
Jeremiah Willcock 4e5382d828 Trying to fix undirected clear_vertex() again; refs #4622
[SVN r78428]
2012-05-11 21:03:19 +00:00
Jeremiah Willcock 2d70ac7254 Fixed handling of self-loops; fixes #4622
[SVN r78425]
2012-05-11 19:37:54 +00:00
Jeremiah Willcock 1eb950d630 Removed use of Boost.Typeof to enhance portability; using Boost.ResultOf instead
[SVN r78330]
2012-05-05 03:08:49 +00:00
Jeremiah Willcock 1441c15255 Removed use of Boost.Typeof to enhance portability; using Boost.ResultOf instead
[SVN r78329]
2012-05-05 03:07:40 +00:00
Jeremiah Willcock 8e40b350e3 Qualified calls to tie
[SVN r78328]
2012-05-05 02:52:41 +00:00
Jeremiah Willcock 429112df7c Fixed ambiguous call
[SVN r78327]
2012-05-05 02:50:55 +00:00
Jeremiah Willcock 0586ac290f Edited reverse_graph to fix test case; fixes #6858
[SVN r78315]
2012-05-03 16:20:58 +00:00
Jeremiah Willcock d42d54b54e Removed #error for lack of bundled properties
[SVN r78076]
2012-04-19 03:30:59 +00:00
Jeremiah Willcock bec6cb4dda Disabled build on Sun; waiting to disable in regression test output until results show that library is not built
[SVN r78053]
2012-04-17 19:53:26 +00:00
Jeremiah Willcock 117689a3f9 Fixed argument order to get_param_type
[SVN r78031]
2012-04-16 23:17:12 +00:00
Jeremiah Willcock 6ea899f7ed Added code and docs from #5269 (some code heavily rewritten) and removed old workarounds; fixes #5269
[SVN r78030]
2012-04-16 23:12:50 +00:00
Jeremiah Willcock a64981a983 Changed to old-style named parameter wrapper generator
[SVN r78027]
2012-04-16 19:17:04 +00:00
Jeremiah Willcock 2a4350905b Added generator to make old-style named parameter wrappers
[SVN r78026]
2012-04-16 19:07:20 +00:00
Jeremiah Willcock ebdec45c4b Added test for Boost.Parameter version of isomorphism; fixed bugs that found
[SVN r78024]
2012-04-16 18:44:36 +00:00
Jeremiah Willcock 97bea429fc Added new code from #6242; fixes #6242
[SVN r78023]
2012-04-16 17:55:07 +00:00
Jeremiah Willcock 01832f76c2 Fixed SCC example and added it to Jamfile; fixes #6647
[SVN r78022]
2012-04-16 17:46:15 +00:00
Jeremiah Willcock 0aaf3858a0 Reverted r77731 because it complicated the code and did not fix BGL compilation on any compilers
[SVN r78020]
2012-04-16 17:35:15 +00:00
Jeremiah Willcock efd4b992cc Clarified and corrected documentation
[SVN r77924]
2012-04-11 20:52:32 +00:00
Jeremiah Willcock 706859b595 Removed uses of Boost.Typeof to hopefully help on XLC
[SVN r77916]
2012-04-11 16:26:51 +00:00
Jeremiah Willcock 3d43c1a8ec Added algorithm from Michele Caini for common spanning trees of two graphs; fixes #6401
[SVN r77893]
2012-04-10 19:51:59 +00:00
Jeremiah Willcock eeaee30dd3 Converted to Boost.Parameter
[SVN r77739]
2012-04-03 05:50:40 +00:00
Jeremiah Willcock a4806bed3b Fixed off-by-one bug
[SVN r77738]
2012-04-03 05:50:29 +00:00
Jeremiah Willcock 8400e599ca Starting on converting to Boost.Parameter; not finished yet because of interaction with PBGL
[SVN r77737]
2012-04-03 05:50:09 +00:00
Jeremiah Willcock 28cf285c4d Added no-named-parameter version and simplified code
[SVN r77736]
2012-04-03 05:49:36 +00:00
Jeremiah Willcock 7d3b9f0b4b Qualified call to isomorphism
[SVN r77735]
2012-04-03 05:49:07 +00:00
Jeremiah Willcock aaedb9bac7 Added user-visible Boost.Parameter version; changed to use new wrapper functions, and to allow old named-parameter version to call it, changed detection of starting vertex
[SVN r77734]
2012-04-03 04:45:47 +00:00
Jeremiah Willcock ce845156b8 Added null_vertex()
[SVN r77733]
2012-04-03 04:44:40 +00:00
Jeremiah Willcock 755c77e7c1 Added functions to get null_vertex and default starting vertex, added code to generate wrappers to allow user-visible Boost.Parameter-enabled versions of BGL functions
[SVN r77732]
2012-04-03 04:44:08 +00:00
Jeremiah Willcock 30026490ee Changed to manual token-testing code to avoid use of Boost.Xpressive (allowing use on more compilers)
[SVN r77731]
2012-04-03 04:42:25 +00:00
Jeremiah Willcock 63200dc0ea Added null_vertex() required by Graph concept
[SVN r77730]
2012-04-03 04:39:03 +00:00
Jeremiah Willcock 8ecd3a986c Disabling abort for Windows CE
[SVN r77693]
2012-04-01 19:23:18 +00:00
Jeremiah Willcock d70d07b0ba Trying to fix choose_pmap on more compilers
[SVN r77650]
2012-03-30 17:50:17 +00:00
Jeremiah Willcock eaebaf87a6 Fixing things so bundled graph properties will not crash
[SVN r77634]
2012-03-29 18:43:26 +00:00
Jeremiah Willcock 428762da2b Keeping tag values around to allow bundled properties
[SVN r77633]
2012-03-29 18:42:53 +00:00
Jeremiah Willcock 5d1e1ce628 Changed more things to inheritance to allow more SFINAE and fixed accessibility problem
[SVN r77632]
2012-03-29 18:42:04 +00:00
Jeremiah Willcock 771d9307cc Added forwarding of values of property tags to fix bundled properties
[SVN r77616]
2012-03-28 20:57:02 +00:00
Jeremiah Willcock 7fccfd1f42 Added graph property to serialization, and made default graph property no_property to allow serialization; fixes #5310
[SVN r77615]
2012-03-28 20:56:44 +00:00
Jeremiah Willcock 9092da0b8f Changed default version of property_map to use inheritance to try to get SFINAE in more cases
[SVN r77611]
2012-03-28 20:40:15 +00:00
Jeremiah Willcock 118a055bc4 Fixed narrowing conversion
[SVN r77610]
2012-03-28 20:27:30 +00:00
Jeremiah Willcock 068b2916b3 Fixed categories of property maps for subgraph based on constness of graph; fixes #6739
[SVN r77609]
2012-03-28 20:20:45 +00:00
Jeremiah Willcock e77cd87de1 Changed property lookup code to simplify graph implementations (remove most special-casing of bundled properties), made CSR graph work with non-bundled properties (probably), split named parameter algorithms to not use property map code
[SVN r77549]
2012-03-25 21:03:59 +00:00
Jeremiah Willcock e0c11b3116 Fixed HTML
[SVN r77536]
2012-03-25 05:22:49 +00:00
Jeremiah Willcock 8f8cd154e6 Fixed warning
[SVN r77534]
2012-03-25 05:01:58 +00:00
Jeremiah Willcock 5aa2be67b0 Changed to use documented interface
[SVN r77533]
2012-03-25 05:01:15 +00:00
Jeremiah Willcock 7a2ec7c4dc Removed unused type and variable
[SVN r77532]
2012-03-25 05:00:52 +00:00
Jeremiah Willcock 035fac705c Fixed warnings
[SVN r77531]
2012-03-25 05:00:36 +00:00
Jeremiah Willcock 6f4b8bf204 Removed unused variable
[SVN r77530]
2012-03-25 05:00:21 +00:00
Jeremiah Willcock 57121513a7 Fixed property map access
[SVN r77529]
2012-03-25 05:00:05 +00:00
Jeremiah Willcock 7e59864546 Fixed warnings
[SVN r77528]
2012-03-25 04:59:23 +00:00
Jeremiah Willcock bbab01b9c3 Removed incorrect tests
[SVN r77527]
2012-03-25 04:58:58 +00:00
Jeremiah Willcock 3b7250f736 Disambiguated tuple operations
[SVN r77526]
2012-03-25 04:57:48 +00:00
Jeremiah Willcock e315856b1b Fixed warnings
[SVN r77525]
2012-03-25 01:38:29 +00:00
Jeremiah Willcock b838adfa32 Fixed warnings
[SVN r77523]
2012-03-24 23:35:23 +00:00
Jeremiah Willcock cae4628d7e Added "inline" to avoid multiple definition errors; fixes #6708
[SVN r77415]
2012-03-19 20:48:42 +00:00
Jeremiah Willcock a3d25c5521 Added missing #include; fixes #6707
[SVN r77414]
2012-03-19 20:38:20 +00:00
Jeremiah Willcock 7cddb8febf Changed type of graph property keys to Graph* to match Graphviz reader code and test
[SVN r77341]
2012-03-15 17:39:14 +00:00
Jeremiah Willcock 908ebf506f Added range checking in asserts
[SVN r77279]
2012-03-09 02:19:01 +00:00
Jeremiah Willcock fee51b8cdc Added typename; fixes #6656
[SVN r77248]
2012-03-06 16:23:53 +00:00
Jeremiah Willcock 00ae7b7e72 Applied patch from #6564; fixes #6564
[SVN r77223]
2012-03-04 20:24:30 +00:00
Jeremiah Willcock 5476d8d70a Made Graphviz reading into CSR graphs work for external properties only; refs #5442
[SVN r77222]
2012-03-04 20:21:22 +00:00
Jeremiah Willcock c49c05f502 Tried to do read_graphviz for CSR; does not work but some infrastructure changed so it is being committed
[SVN r77189]
2012-03-03 21:19:38 +00:00
Jeremiah Willcock e7d2639f6e Added finish call to mutate_graph
[SVN r77188]
2012-03-03 21:19:03 +00:00
Jeremiah Willcock fdc5f76aca Fixed use of non-existent member
[SVN r77187]
2012-03-03 21:18:22 +00:00
Jeremiah Willcock 761f792ed4 Applied new patch from #6033 from Jan Hazla; fixes #6033
[SVN r77186]
2012-03-03 20:06:15 +00:00
Jeremiah Willcock c1b4a409a5 Changed to trampolined implementation of match() to avoid stack overflows, now passes test case in #6573 with 10000 sides; fixes #6573
[SVN r77185]
2012-03-03 20:02:27 +00:00
Jeremiah Willcock 2d41bea1c8 Fixed typo in documentation; fixes #6583
[SVN r77182]
2012-03-03 18:56:40 +00:00
Jeremiah Willcock ce88df48fd Changed property map uses to not use operator[]
[SVN r77074]
2012-02-19 20:06:15 +00:00
Aaron Windsor 0a31d3c76b Correcting a doc bug: order of vertices on the outer face of a graph should have been reversed in planar_face_traversal example
[SVN r77013]
2012-02-14 02:43:44 +00:00
Jeremiah Willcock cdef2804ea Fixed incorrect iterator type
[SVN r76868]
2012-02-04 05:12:58 +00:00
Jeremiah Willcock b42b71824b Removed unused parameter names
[SVN r76867]
2012-02-04 05:12:04 +00:00
Jeremiah Willcock cd1186205d Added links sent by David Doria to his new documentation files
[SVN r76783]
2012-01-29 21:36:23 +00:00
Jeremiah Willcock 9d353c53e2 Added documentation and examples from David Doria
[SVN r76779]
2012-01-29 21:08:40 +00:00
Jeremiah Willcock a1fc58cc93 Added directed_graph stub documentation from David Doria
[SVN r76778]
2012-01-29 19:04:46 +00:00
Jeremiah Willcock f63ebe9a8b Added example from David Doria
[SVN r76726]
2012-01-27 22:06:21 +00:00
Jeremiah Willcock 1c7c456e18 Changed another property map type to const_type
[SVN r76654]
2012-01-23 19:57:42 +00:00
Jeremiah Willcock e761a6b4d0 Fixed typo from #6435 plus others; fixes #6435
[SVN r76651]
2012-01-23 16:07:05 +00:00
K. Noel Belcourt cddab52a7b Fix astar_search graph test.
[SVN r76648]
2012-01-23 02:52:23 +00:00
Jeremiah Willcock 3af4b053be Fixed issue with printing const graphs
[SVN r76588]
2012-01-19 16:35:28 +00:00
Jeremiah Willcock 210e7857b2 Removed redundant function_requires in test case
[SVN r76537]
2012-01-15 23:59:39 +00:00
Jeremiah Willcock a4dc3d7b23 Merged r75066, r75067, r75124, r75140, r75165, r75861, r75862, r75863, r75878, r75906, r75970, r75973, r75974, and r76394 from trunk
[SVN r76536]
2012-01-15 23:52:45 +00:00
Jeremiah Willcock 4b95dcfbe9 Merged r76050, r75547, r75891, r76049, r76083, and r76439 from trunk (reverse_graph bug fixes and fix for #6293); refs #6293
[SVN r76535]
2012-01-15 23:32:09 +00:00
Jeremiah Willcock f761059ecd Applied some fixes from #6313; fixes #6313
[SVN r76439]
2012-01-12 20:27:31 +00:00
Jeremiah Willcock a439c48425 Applied patch from #6371; fixes #6371
[SVN r76394]
2012-01-10 01:29:38 +00:00
Jeremiah Willcock 99f7ed91af Applied patch from bug #6306; fixes #6306
[SVN r76083]
2011-12-20 18:49:09 +00:00
Jeremiah Willcock cd1fee5f7d Applied fixed version of patch from #6293; fixes #6293
[SVN r76050]
2011-12-18 21:09:34 +00:00
Jeremiah Willcock 231bb5dbfb Added documented way to get underlying edge descriptor from a reverse_graph; changed name of member to prevent future use
[SVN r76049]
2011-12-18 20:53:26 +00:00
Steven Watanabe 456f4006cb Remove unused library.
[SVN r75974]
2011-12-15 22:59:03 +00:00
Jeremiah Willcock 52d7bc8d5e Applied patch from Jens Muller
[SVN r75973]
2011-12-15 22:36:20 +00:00
Steven Watanabe 8f3dd3a4f9 Fix search for SDB and LEDA.
[SVN r75970]
2011-12-15 22:07:53 +00:00
Jeremiah Willcock 79573b5dbd Added another copy_graph hack for transpose_graph
[SVN r75906]
2011-12-11 21:09:33 +00:00
Jeremiah Willcock fc1619d91e Fixed copying of reverse_graphs to compensate for new reverse_edge_descriptor class
[SVN r75891]
2011-12-11 07:19:19 +00:00
Jeremiah Willcock 17f92dd61e Added include of <stack>; fixes #6246
[SVN r75878]
2011-12-09 17:53:43 +00:00
Jeremiah Willcock 2a5874c7b9 Fixed typo
[SVN r75863]
2011-12-08 02:00:04 +00:00
Jeremiah Willcock 03193c2fb4 Added documentation for edge_predecessor_recorder and fixed several typos in other doc pages
[SVN r75862]
2011-12-08 01:59:21 +00:00
Jeremiah Willcock 345a6b964b Removed debugging output; fixes #6239
[SVN r75861]
2011-12-08 01:43:39 +00:00
Jeremiah Willcock 366cd32060 Added comparison operators; fixes #6137
[SVN r75547]
2011-11-18 20:06:07 +00:00
Jeremiah Willcock a88250f76f Merged change r75431 from trunk; refs #6112
[SVN r75471]
2011-11-13 06:10:55 +00:00
Jeremiah Willcock 2b2f2d464e Qualified more calls to tie; fixes #6112
[SVN r75431]
2011-11-10 15:04:27 +00:00
Jeremiah Willcock 3619e54948 Fixed degree_vertex_invariant::max; fixes #5881
[SVN r75165]
2011-10-29 06:11:02 +00:00
Jeremiah Willcock d6643f50f3 Added missing "end for"; fixes #6061
[SVN r75140]
2011-10-27 19:51:37 +00:00
Jeremiah Willcock 63249fa231 Removed hash<void*> specialization
[SVN r75124]
2011-10-27 01:17:35 +00:00
Jeremiah Willcock 6f91f83d2e Removed incorrect != 0 test on boost::optional; fixes #6044
[SVN r75074]
2011-10-20 21:32:45 +00:00
Jeremiah Willcock 2edbcb500f Fixed strange use of pred map, and changed algorithm to be more similar to Tarjan paper cited in bibliography; fixes #6033
[SVN r75067]
2011-10-19 20:03:54 +00:00
Jeremiah Willcock ffff89b1a2 Refactored and added test graph from Andre Dau
[SVN r75066]
2011-10-19 20:03:00 +00:00
Jeremiah Willcock 3a546c9418 Merged r72747, r74075, r74094, r74232, r74357, r74602, and r74783 from trunk
[SVN r74862]
2011-10-09 20:33:56 +00:00
Jeremiah Willcock 27e5672047 Fixed typo
[SVN r74783]
2011-10-07 21:28:22 +00:00
Jeremiah Willcock 4a19d6d288 Applied patch from #5919; fixes #5919
[SVN r74602]
2011-09-28 19:04:30 +00:00
Jeremiah Willcock 4778a4b359 Fixed link
[SVN r74357]
2011-09-12 15:01:25 +00:00
Jeremiah Willcock fd37deb67b Added requirement to link to Boost.Regex
[SVN r74232]
2011-09-04 18:47:27 +00:00
Jeremiah Willcock 90678ab0fa Fixed inspection report issues
[SVN r74094]
2011-08-27 19:35:05 +00:00
Jeremiah Willcock 48b3020f7d Added parentheses around call to numeric_limits::max; fixes #5813
[SVN r74075]
2011-08-26 17:33:02 +00:00
Jeremiah Willcock 9f29ef1a83 Merged in BGL, enable_if, and related changes from trunk: r67035, r57559, r72837, r73010, r73026, r72960, r73425, r73424, r73009, r73998, r73997, r73006, r73630, r73631, r73999, r73422, r73423, r73996, r71221
[SVN r74023]
2011-08-23 18:26:46 +00:00
Jeremiah Willcock b156db0c9e Fixed traits class name
[SVN r73999]
2011-08-22 01:44:08 +00:00
Jeremiah Willcock 9c7f42c58a Changed to custom edge_descriptor type in reverse_graph to avoid ambiguities when using a std::pair edge_descriptor from an underlying graph
[SVN r73997]
2011-08-22 01:43:07 +00:00
Jeremiah Willcock c0bc3e3aea Fixed documentation based on issues found by Ragavendran Gopalakrishnan
[SVN r73996]
2011-08-22 01:42:12 +00:00
Jeremiah Willcock fee2e45a8c Fixed vertex count computation for case where number of vertices does not fit into an int
[SVN r73631]
2011-08-09 19:32:20 +00:00
Jeremiah Willcock f0343d2264 Fixed grid graph for case where VertexIndex is smaller than int
[SVN r73630]
2011-08-09 19:23:16 +00:00
Jeremiah Willcock fcf6446201 Removed calls to exit(); fixes #5185
[SVN r73425]
2011-07-29 01:44:48 +00:00
Jeremiah Willcock 1180386ac1 Applied patch from #5506; fixes #5506
[SVN r73424]
2011-07-29 01:30:53 +00:00
Jeremiah Willcock b021084901 Added caveat about PDF file; refs #5633
[SVN r73423]
2011-07-29 01:16:43 +00:00
Jeremiah Willcock c416132bfe Fixed HTML documentation for isomorphism algorithm; refs #5633
[SVN r73422]
2011-07-29 01:12:57 +00:00
Jürgen Hunold fec3bd2314 Merge 73299,73301,73308 from ^/trunk
------------------------------------------------------------------------
r73299 | jhunold | 2011-07-22 14:08:03 +0200 (Fr, 22 Jul 2011) | 2 lines

Enable visibility support. Refs #2114.

------------------------------------------------------------------------
r73301 | jhunold | 2011-07-22 16:15:45 +0200 (Fr, 22 Jul 2011) | 2 lines

Enable visibility support. Refs #2114.

------------------------------------------------------------------------
r73308 | jhunold | 2011-07-23 11:24:35 +0200 (Sa, 23 Jul 2011) | 2 lines

Enable visibility support. Refs #2114.

------------------------------------------------------------------------


[SVN r73381]
2011-07-26 17:40:21 +00:00
Jürgen Hunold 8b4ac5cc39 Enable visibility support. Refs #2114.
[SVN r73308]
2011-07-23 09:24:35 +00:00
Jeremiah Willcock b6c54fa390 Weakened property map requirements further, removing uses of [] on property maps
[SVN r73026]
2011-07-13 01:04:47 +00:00
Jeremiah Willcock 6edd466d86 Weakened concept requirements
[SVN r73010]
2011-07-12 02:47:34 +00:00
Jeremiah Willcock f98a8afdd6 Fixed to work with graphs whose vertex_index maps are not the identity
[SVN r73009]
2011-07-12 01:26:09 +00:00
Jeremiah Willcock 9cf1345871 Added built-in reverse edge map for max-flow
[SVN r73006]
2011-07-11 19:54:19 +00:00
Jeremiah Willcock 55b82bd1f2 Applied patch from #5659, plus made similar changes to other algorithms that have inf parameters; did not add inf parameters to algorithms that did not already have them; fixes #5659
[SVN r72960]
2011-07-07 21:07:41 +00:00
Jeremiah Willcock 2c3505aec9 Fixed ith_bandwidth for directed graphs; changed bandwidth to use the graph edges rather than scanning the out edges of every vertex; other small fixes
[SVN r72837]
2011-07-01 19:36:08 +00:00
Jeremiah Willcock c5780610c6 Changed grid_graph to directed to match differing edge indices in documentation
[SVN r72747]
2011-06-24 22:49:29 +00:00
Jeremiah Willcock 081b1f90bf Merged r71166, r71238, r71300, r71489, r71704, and r71929 from trunk
[SVN r72334]
2011-06-01 16:58:36 +00:00
Jeremiah Willcock a4af894285 Changed to explicit stack as suggested by Aaron Windsor
[SVN r71929]
2011-05-13 23:50:01 +00:00
Jeremiah Willcock b407ea9309 Fixes
[SVN r71489]
2011-04-25 21:10:58 +00:00
Jeremiah Willcock 19b05b0cae Fixed typo
[SVN r71300]
2011-04-15 22:11:40 +00:00
Jeremiah Willcock 3131ffa454 Added note about broken example
[SVN r71238]
2011-04-14 02:30:56 +00:00
Jeremiah Willcock 1fa0cd9a26 Fixed C++0x array ambiguity
[SVN r71166]
2011-04-10 20:01:06 +00:00
Jeremiah Willcock 5a5b35b154 Merged r70875 from trunk
[SVN r70995]
2011-04-05 02:31:38 +00:00
Jeremiah Willcock 4b1c5fe438 Fixed types in bundled property docs; fixes #5410
[SVN r70875]
2011-04-02 18:43:03 +00:00
Jeremiah Willcock 03510b4a6e Merged more fixes from trunk; added is_sorted.hpp because that is needed for BGL fixes
[SVN r70704]
2011-03-29 19:07:16 +00:00
Jeremiah Willcock 30e9f22af4 Merged r67703-67704,68155,69263,69629,69726 from trunk
[SVN r70703]
2011-03-29 18:56:56 +00:00
Jeremiah Willcock 06bdbbcbba Changed concepts to use proper names for property types
[SVN r69726]
2011-03-08 20:53:50 +00:00
Jeremiah Willcock f52b7df417 Added includes of <utility> for Clang/libc++
[SVN r69629]
2011-03-07 19:28:34 +00:00
Jeremiah Willcock 2e4073a8b7 Merged bug fixes from trunk (r68781,r68949,r68972,r68979,r69021,r69404,r69430) for 1.46.1
[SVN r69502]
2011-03-03 00:29:41 +00:00
Jeremiah Willcock 516c833574 Removed superseded workaround from reverse_graph
[SVN r69430]
2011-03-01 03:20:29 +00:00
Jeremiah Willcock fd549fe0fa Made filtered_graph work with bundled graph properties by fixing bundle_type template; probably fixed other adapters as well
[SVN r69404]
2011-02-28 22:41:34 +00:00
Jeremiah Willcock b52d4724c2 Removed obsolete (and unused) file
[SVN r69263]
2011-02-25 06:37:46 +00:00
Jeremiah Willcock 66cd415568 Fixed typo as suggested by Shaun Jackman
[SVN r69021]
2011-02-19 04:17:48 +00:00
Jeremiah Willcock d44293d8a8 Fixed buffer overflow from parallel edges in isomorphism(); fixes #5175
[SVN r68979]
2011-02-17 23:00:20 +00:00
Jeremiah Willcock a0c90983ab Fixed escaping using patch from #5199; fixes #5199
[SVN r68972]
2011-02-17 20:02:58 +00:00
Jeremiah Willcock bb1ce866f8 Applied second patch from #5180; fixes #5180
[SVN r68949]
2011-02-16 16:35:42 +00:00
Jeremiah Willcock ac4b12107f Changed "continue" to "break" in remove_edge_if; fixes #5181
[SVN r68781]
2011-02-11 18:39:11 +00:00
Steven Watanabe a4452c3539 Revert [67111] (addition of boost/detail/iomanip.hpp) and all the commits that depend on it. ([68137], [68140], [68141], [68154], and [68165]).
[SVN r68168]
2011-01-15 08:11:51 +00:00
Bryce Adelstein-Lelbach 074277924a Replacing the use of <iomanip> with <boost/detail/iomanip.hpp> across Boost.
On Linux, GNU's libstdc++, which is the default stdlib for icc and clang,
cannot parse the <iomanip> header in version 4.5+ (which thankfully neither
compiler advises the use of yet), as it's original C++98-friendly
implementation has been replaced with a gnu++0x implementation.
<boost/detail/iomanip.hpp> is a portable implementation of <iomanip>, providing
boost::detail::setfill, boost::detail::setbase, boost::detail::setw,
boost::detail::setprecision, boost::detail::setiosflags and
boost::detail::resetiosflags. 



[SVN r68140]
2011-01-14 02:35:58 +00:00
Jeremiah Willcock 6e73c470a4 Removed BOOST_FILESYSTEM_VERSION setting from test cases and removed Filesystem v2 workaround
[SVN r68001]
2011-01-11 22:19:57 +00:00
Jeremiah Willcock 1963179514 Removed Boost.Test #defines from test case
[SVN r67971]
2011-01-11 19:00:35 +00:00
Jeremiah Willcock bd69c0c5cf Merged r66528,66559,66960,67010,67012,67033,67035,67038,67040,67069,67086,67723,67914 from trunk
[SVN r67970]
2011-01-11 18:52:51 +00:00
Jeremiah Willcock dcd9920780 Updated removal version
[SVN r67968]
2011-01-11 18:19:59 +00:00
Jeremiah Willcock 8b4eb672e0 Merged r67041,67084,67110,67705-67706,67722,67724,67764 (bug fixes) from trunk, plus allowed Boost.Filesystem v2 to be used in boost/distributed/adjlist/serialization.hpp
[SVN r67967]
2011-01-11 18:17:40 +00:00
Jeremiah Willcock ec5f6a655c Fixed URL
[SVN r67914]
2011-01-10 15:20:55 +00:00
Jeremiah Willcock e5341acc43 Changed to StringAlgo for replace operation rather than Xpressive
[SVN r67764]
2011-01-07 21:36:01 +00:00
Jeremiah Willcock 19679d3851 Simplifying code for VC++ 7.1
[SVN r67724]
2011-01-06 16:30:58 +00:00
Jeremiah Willcock 3624e74d13 Fixed typo
[SVN r67723]
2011-01-06 16:24:56 +00:00
Jeremiah Willcock ae33127eed Added disambiguation of regex_replace() overloads for VC++ 7.1
[SVN r67722]
2011-01-06 16:08:05 +00:00
Jeremiah Willcock 43386bca5c Fixed assert inspection issues in sequential BGL
[SVN r67705]
2011-01-06 02:08:41 +00:00
Jeremiah Willcock 287529480f Removed deprecated code and docs
[SVN r67704]
2011-01-06 02:00:35 +00:00
Jeremiah Willcock 6fb2f7edec Removed deprecated file
[SVN r67703]
2011-01-06 01:51:16 +00:00
Jeremiah Willcock 4a5c105654 Applied patch from #4966 to fix self-loop insertion; fixes #4966
[SVN r67110]
2010-12-08 18:11:52 +00:00
Jeremiah Willcock f132fd060f Using incantation from Boost.Math (test_laplace.cpp) to try to get Boost.Test linking to work
[SVN r67086]
2010-12-07 17:35:24 +00:00
Jeremiah Willcock 595b9abbdc Simplified code for VC++ 7.1
[SVN r67084]
2010-12-07 17:20:55 +00:00
Jeremiah Willcock 0415ceffe0 Removed dynamic linking to Boost.Test
[SVN r67069]
2010-12-06 18:20:16 +00:00
Jeremiah Willcock 4000bccb3d Fixed typo
[SVN r67040]
2010-12-05 20:43:45 +00:00
Jeremiah Willcock 2e5db3d026 Testing more example codes
[SVN r67038]
2010-12-05 20:39:59 +00:00
Jeremiah Willcock ff1775df18 Removed <boost/pending/integer_range.hpp> and a few more uses of it; fixes #4642
[SVN r67035]
2010-12-05 20:38:44 +00:00
Jeremiah Willcock b76015210d Turned off VC++ auto-linking
[SVN r67033]
2010-12-05 20:24:28 +00:00
Jeremiah Willcock cf1943fb84 Merged r67031 from trunk
[SVN r67032]
2010-12-05 20:21:37 +00:00
Jeremiah Willcock 086a94c8a5 Applied patch from Matthias Walter
[SVN r67031]
2010-12-05 20:17:48 +00:00
Jeremiah Willcock 0ec513eab1 Merged r67014 from trunk
[SVN r67015]
2010-12-04 20:51:15 +00:00
Jeremiah Willcock 10b41afc0f Fixed uninitialized variables
[SVN r67014]
2010-12-04 20:49:49 +00:00
Jeremiah Willcock c3aad6b27e Merged r67011 from trunk
[SVN r67013]
2010-12-04 20:46:50 +00:00
Jeremiah Willcock cc07f4c201 Moved #define up
[SVN r67012]
2010-12-04 20:45:42 +00:00
Jeremiah Willcock 904b4cc924 Forcing filesystem version 3
[SVN r67011]
2010-12-04 20:45:09 +00:00
Jeremiah Willcock e864071546 Put in more checks to avoid seg faults
[SVN r67010]
2010-12-04 20:39:00 +00:00
Jeremiah Willcock 979e02a617 Merged r67008 from trunk
[SVN r67009]
2010-12-04 20:33:36 +00:00
Jeremiah Willcock 9bcc1b9a69 Changed to Boost.Filesystem v3
[SVN r67008]
2010-12-04 20:31:33 +00:00
Jeremiah Willcock 11d2d38a51 Merged r66286, r66707, r66900, and r66907 from trunk
[SVN r67007]
2010-12-04 20:21:20 +00:00
Jeremiah Willcock db812aa773 Fixed complexity of Dijkstra's algorithm; fixes #4852
[SVN r66960]
2010-12-01 20:15:41 +00:00
Jeremiah Willcock 6c48845da8 Fixed up computation of property types; fixes #1021
[SVN r66907]
2010-11-30 18:16:29 +00:00
Jeremiah Willcock fb567057df Fixed bundled graph properties in filtered_graph; fixes #4914
[SVN r66900]
2010-11-30 17:48:33 +00:00
Jeremiah Willcock 8e365de488 Applied patch from #4887 -- thank you for the bug report and patch; fixes #4887
[SVN r66707]
2010-11-24 01:23:42 +00:00
Jeremiah Willcock a934539462 Fixed typo; fixes #4851
[SVN r66559]
2010-11-13 15:04:24 +00:00
Jeremiah Willcock f5b408ef7f Removed access to (unused) edge id attribute, also making that attribute optional; fixes #4843
[SVN r66528]
2010-11-12 15:34:20 +00:00
Jeremiah Willcock 7d02f7dd6b Applied patch from Daniel Trebbien
[SVN r66286]
2010-10-30 20:16:17 +00:00
Daniel James dbd5774482 Merge documentation fixes to release.
[SVN r66285]
2010-10-30 17:34:45 +00:00
Daniel James 11187e5a25 Link fixes.
[SVN r66273]
2010-10-30 14:32:50 +00:00
Jeremiah Willcock aef49c1b8b Merged r66203 and r66204 from trunk; refs #4793
[SVN r66206]
2010-10-26 20:37:31 +00:00
Jeremiah Willcock 55dec7c079 Fixed signature of copy_one_vertex(); refs #4793
[SVN r66204]
2010-10-26 18:37:29 +00:00
Jeremiah Willcock a3786d7f7e Repaired copy_component() using suggestion from Christopher Alfeld; fixes #4793
[SVN r66203]
2010-10-26 18:24:01 +00:00
Jeremiah Willcock 94b48cea30 Merged r66097, r66098, and r66099 from trunk; refs #4758, #4752, #4753, #4631
[SVN r66100]
2010-10-19 16:13:47 +00:00
Jeremiah Willcock 822fc80494 Merged patch from #4631 and made appropriate doc changes; fixes #4631
[SVN r66099]
2010-10-19 16:00:15 +00:00
Jeremiah Willcock 24a2de892f Fixed remove_edge_if and clear_vertex for subgraphs; commented out remove_vertex; refs #4752; fixes #4753
[SVN r66098]
2010-10-19 15:55:27 +00:00
Jeremiah Willcock 61d37fe743 Repeating edge insertions (up to a limit) when they fail in generate_random_graph; fixes #4758
[SVN r66097]
2010-10-19 15:46:00 +00:00
Jeremiah Willcock 43ff6aef6d Merged changes r65193, r65939, r65963, and r65964 from trunk; refs #4731, #4737
[SVN r66093]
2010-10-19 15:28:37 +00:00
Jeremiah Willcock 7ba05ec487 Clarified docs further; fixes #4731
[SVN r65964]
2010-10-14 19:02:03 +00:00
Jeremiah Willcock f66d119969 Fixed documentation of distance map; fixes #4737
[SVN r65963]
2010-10-14 18:58:00 +00:00
Andrew Sutton adc6eb0f0d Clarifying references to MST in Dijkstra's SP algorithm.
[SVN r65939]
2010-10-13 13:47:23 +00:00
Jeremiah Willcock 4673c796aa Merged r65836 (fix for #4715) from trunk; refs #4715
[SVN r65839]
2010-10-08 18:06:41 +00:00
Jeremiah Willcock 7b97cbf393 Fixed const issue on VC++ 8; fixes #4715
[SVN r65836]
2010-10-08 17:32:57 +00:00
Jeremiah Willcock e13fcab1e8 Merged r64064 (quote fix in example) from trunk
[SVN r65769]
2010-10-05 18:08:27 +00:00
Jeremiah Willcock f095156c22 Merged r64065 (fixes to implicit_graph example), r65199 and r65386 (documentation fixes), plus copied test_graphs.cpp from trunk
[SVN r65768]
2010-10-05 18:06:09 +00:00
Jeremiah Willcock 2aeecada2a Merged r64209 (addition to users list), r64223 (fix to users list), r64763 (improved interfaces to smallest_last_ordering), r65593 (patches to stoer_wagner_min_cut) from trunk
[SVN r65767]
2010-10-05 17:53:09 +00:00
Jeremiah Willcock 00d076b2f8 Merged r64074, r64645, r64935, r65198, r65385, r65764 (all related to bundled graph properties as far as I remember)
[SVN r65766]
2010-10-05 17:42:47 +00:00
Jeremiah Willcock b71896f622 Merged changes r64063 (W. P. McNeill examples), r65590 (stoer_wagner_min_cut from Daniel Trebbien), 64187 (DIMACS reader updates), and 64762 (DIMACS reader updates)
[SVN r65751]
2010-10-04 18:50:40 +00:00
Jeremiah Willcock 89cd3d8a8a Added patch from Daniel Trebbien
[SVN r65593]
2010-09-26 02:29:42 +00:00
Jeremiah Willcock bada2e9b7a Added Stoer-Wagner min-cut algorithm submitted by Daniel Trebbien
[SVN r65590]
2010-09-25 18:52:41 +00:00
Andrew Sutton 7e2b915b14 Adding documentation for bundled graph properties.
[SVN r65386]
2010-09-11 14:33:38 +00:00
Andrew Sutton ff2980b121 Fixing #4642.
Added a deprecation warning to to pending/integer_range.hpp. Replaced all
BGL inclusions with range/irange, which defines the same type.


[SVN r65385]
2010-09-11 14:05:41 +00:00
Jeremiah Willcock 3a01fc7f4e Added new info about needing to build a library to get GraphML reading; fixes #4556
[SVN r65199]
2010-09-02 20:05:58 +00:00
Jeremiah Willcock 17af2e739a Fixed clearing of vertices with self-loop edges; fixes #4622
[SVN r65198]
2010-09-02 18:24:17 +00:00
Andrew Sutton 4963f676dc Adding graph properties to CSR graph. Updating tests.
[SVN r64935]
2010-08-20 12:35:20 +00:00
Jeremiah Willcock 2ba8f21b13 Added simplified interfaces
[SVN r64763]
2010-08-12 17:36:40 +00:00
Jeremiah Willcock c6399e2baf Added problem type support to DIMACS reader
[SVN r64762]
2010-08-12 17:35:06 +00:00
Andrew Sutton c07518f7d1 Implementing bundled properties for graph properties.
The initial checkin supports bundled properties for adjacency list,
matrix, undirected and directed graphs, the labeled graph adaptor
and the reverse graph adaptor. All tests updated, passed.

Documentation should be updated, but isn't yet.


[SVN r64645]
2010-08-06 18:13:16 +00:00
Jeremiah Willcock 80378ca2dc Fixed link
[SVN r64223]
2010-07-21 16:03:11 +00:00
Jeremiah Willcock 0f78fd6710 Added OpenCog
[SVN r64209]
2010-07-20 19:28:19 +00:00
Jeremiah Willcock b3809b0910 Added min-cut support to dimacs reader
[SVN r64187]
2010-07-20 03:52:58 +00:00
Jeremiah Willcock 398ea401df Disabled edge_range() for adjacency list graphs that do not guarantee equal_range() to work on their out edge lists; cleaned up edge() for all adjacency lists
[SVN r64074]
2010-07-16 18:12:29 +00:00
Jeremiah Willcock 3edc92eebc Copied over new version of implicit_graph.cpp from Github
[SVN r64065]
2010-07-16 04:27:33 +00:00
Jeremiah Willcock 286c831903 Fixed non-ASCII quote issue
[SVN r64064]
2010-07-16 01:50:03 +00:00
Jeremiah Willcock 590f8fca52 Added implicit_graph and astar_maze examples from W. P. McNeill
[SVN r64063]
2010-07-16 01:43:08 +00:00
Jeremiah Willcock 53edba6e31 Simplified property map handling
[SVN r64035]
2010-07-15 02:12:18 +00:00
Jeremiah Willcock 892677e57e Fixed more detail::override_const_property calls
[SVN r64030]
2010-07-14 23:56:49 +00:00
Jeremiah Willcock 8d013dc58a Added unordered_set to set_contains
[SVN r64026]
2010-07-14 22:59:20 +00:00
Jeremiah Willcock c573261f24 Qualified calls properly
[SVN r64025]
2010-07-14 22:45:39 +00:00
Jeremiah Willcock c44888396b Changed to new-style named parameters for A* code; added named parameters for astar_search_no_init()
[SVN r64024]
2010-07-14 22:15:48 +00:00
Jeremiah Willcock 724773b517 Fixed various bugs in docs
[SVN r64023]
2010-07-14 20:34:02 +00:00
Jeremiah Willcock 7c0a0f2da7 Added warnings about subclassing BGL graph types and fixed a typo
[SVN r64017]
2010-07-14 18:57:45 +00:00
Jeremiah Willcock 954b8066bc Fixed spelling
[SVN r64016]
2010-07-14 18:47:16 +00:00
Jeremiah Willcock 57cb8046b1 Removed using namespace that may be triggering ambiguity errors
[SVN r63657]
2010-07-05 15:37:30 +00:00
Jeremiah Willcock 0d4b7e6b7b Fixed warning syntax
[SVN r63655]
2010-07-05 15:20:19 +00:00
Jeremiah Willcock 367e31c08b Fixed random spanning tree issues from regression tests
[SVN r63654]
2010-07-05 15:08:08 +00:00
Jeremiah Willcock 4d852e33af Refactored color map generation code to make it more broadly usable
[SVN r63630]
2010-07-04 20:14:41 +00:00
Jeremiah Willcock e6576abc28 Changed random_spanning_tree to use named parameters; removed separate function name for weighted version; allowed user to specify spanning tree root; added exception for some cases of stuck loop-erased random walks; added documentation for random_spanning_tree()
[SVN r63557]
2010-07-03 19:50:49 +00:00
Jeremiah Willcock 326b4ab542 Fixed typo
[SVN r63556]
2010-07-03 19:11:13 +00:00
Jeremiah Willcock 51d0b63c54 Added commented out new exe line
[SVN r63536]
2010-07-03 01:22:22 +00:00
Jeremiah Willcock 783d79bba3 Changed BGL Graphviz writer to use Xpressive to avoid need to link to libboost_regex
[SVN r63535]
2010-07-03 01:14:58 +00:00
Jeremiah Willcock f86b056a60 Changed to using const reference for input graphs; added Incidence Graph requirements to documentation; fixes #4386
[SVN r63530]
2010-07-02 19:30:52 +00:00
Jeremiah Willcock b383f407a6 Fixed broken link
[SVN r63511]
2010-07-02 01:07:19 +00:00
Jeremiah Willcock 1f2789531e Removed unnecessary declarations
[SVN r63472]
2010-07-01 14:04:29 +00:00
Jeremiah Willcock 9ff5074af0 Fixed various BGL documentation bugs; fixes #4386
[SVN r63466]
2010-07-01 04:46:09 +00:00
Jeremiah Willcock fab9ffcb37 Applied patch from #4384; fixes #4384
[SVN r63405]
2010-06-28 13:21:08 +00:00
Jeremiah Willcock 6e96d8e2f4 Made identity_property_maps typed
[SVN r63335]
2010-06-26 02:18:06 +00:00
Jeremiah Willcock e896bf8a41 Added (undocumented) functions for loop-erased random walk and random generation of spanning trees
[SVN r63334]
2010-06-26 00:43:33 +00:00
Jeremiah Willcock 033b0735eb Added default constructors to some function objects
[SVN r63333]
2010-06-26 00:42:34 +00:00
Jeremiah Willcock 4e1009cac7 Fixed header inclusion order
[SVN r63332]
2010-06-26 00:42:15 +00:00
Jeremiah Willcock 78c4cc350b Fixed typo
[SVN r63329]
2010-06-25 23:44:26 +00:00
Jeremiah Willcock 97f72f10fe Added more quoting
[SVN r63269]
2010-06-23 20:51:30 +00:00
Jeremiah Willcock 0b69e667f0 Made Graphviz writer quote and escape output strings properly; added linkage to boost_graph in test program; added note about needing -lboost_regex in documentation
[SVN r63268]
2010-06-23 20:46:22 +00:00
Jeremiah Willcock 753900a4a0 Added boost:: to all uses of tie() to disambiguate from std version
[SVN r63244]
2010-06-22 18:02:43 +00:00
Jeremiah Willcock 6e72c1f445 Boykov-Kolmogorov max-flow updates and some small typo fixes
[SVN r63241]
2010-06-22 15:38:02 +00:00
Jeremiah Willcock b474768cd0 Disambiguated boost::tie
[SVN r63234]
2010-06-22 14:38:45 +00:00
Andrew Sutton b6161b1cb2 Fixed some missing name changes in the documentation.
[SVN r63227]
2010-06-22 13:11:03 +00:00
Andrew Sutton ac874068dd Adding new bk_maxflow reference to the ToC.
[SVN r63190]
2010-06-21 15:43:42 +00:00
Andrew Sutton 26f16eb0e2 Renaming kolmogorov_max_flow to boykov_kolmogorov_max_flow.
At the request of the authors of the published algorithm, the header
and all associated functions, data types, tests, examples, and docs
should be renamed to boykov_kolmogorov. Branched all of the necessary
documents and renamed all such functions and data types.

Added deprecation warnings to the kolmogorov_max_flow.hpp and to the
kolmogorov_max_flow.html.


[SVN r63189]
2010-06-21 15:35:42 +00:00
Daniel James b90204bf75 Update various libraries' documentation build.
Mostly to use the images and css files under doc/src instead of
doc/html, usually be deleting the settings in order to use the defaults.
Also add 'boost.root' to some builds in order to fix links which rely on
it.

[SVN r63146]
2010-06-20 18:00:48 +00:00
Jeremiah Willcock 6d7c351c5b Qualified calls to boost::tie to disambiguate from std::tr1 version
[SVN r63084]
2010-06-18 20:30:30 +00:00
Jeremiah Willcock f562f8061f Made OSPF example run correctly
[SVN r63049]
2010-06-17 17:46:46 +00:00
Jeremiah Willcock 4078644f3a Updated OSPF example to use now GraphViz interfaces
[SVN r63002]
2010-06-15 21:08:36 +00:00
Jeremiah Willcock 6e86b10353 Changed write_graphviz dynamic_properties overloads to write_graphviz_dp to disambiguate them, plus removed more obsolete GraphViz reader stuff
[SVN r63000]
2010-06-15 21:07:22 +00:00
Jeremiah Willcock 9196ee6cfd Added OSPF to example list to compile automatically
[SVN r62999]
2010-06-15 21:01:37 +00:00
Jeremiah Willcock 75a0bd67a0 Reverted r62693 (order of discover_vertex and examine_edge); refs #3137
[SVN r62998]
2010-06-15 20:59:42 +00:00
Jeremiah Willcock 917fb11348 Fixed graph construction; fixes #4342
[SVN r62933]
2010-06-14 15:37:53 +00:00
Jeremiah Willcock 90a71f990e Fixed missing variables; fixes #4343
[SVN r62932]
2010-06-14 15:36:12 +00:00
Jeremiah Willcock 7330452212 Swapped order of visitor calls; fixes #3137
[SVN r62693]
2010-06-09 21:11:43 +00:00
Jeremiah Willcock 706f23a02d Added fixes and tests for CSR in_edge_iterator; fixes #4310, #4311
[SVN r62592]
2010-06-08 19:07:52 +00:00
Jeremiah Willcock d6eb198e36 Fixed comment; fixes #4285
[SVN r62406]
2010-06-03 15:46:58 +00:00
Jeremiah Willcock cb2d8619c5 Added include guard; fixes #4284
[SVN r62405]
2010-06-03 15:46:26 +00:00
Jeremiah Willcock a0d982cdb4 Fixed spelling typo
[SVN r62099]
2010-05-19 23:07:11 +00:00
Jeremiah Willcock c048688bfa Removed third condition from list of preconditions; fixes #3807 again
[SVN r62098]
2010-05-19 16:57:47 +00:00
Jeremiah Willcock 87b7eb047d Removed use of fraction_tolerance to match new Boost.Test interfaces
[SVN r62046]
2010-05-16 21:22:27 +00:00
Jeremiah Willcock 3db3c55bf4 Added proper size for disjoint_sets structure
[SVN r61841]
2010-05-07 17:18:44 +00:00
Jeremiah Willcock e98b1efd21 Applied patch from #4197 to fix copy constructor; fixes #4197
[SVN r61824]
2010-05-06 16:58:19 +00:00
Jeremiah Willcock 1a51b383ff Fixed various bugs in incremental_components and its example, plus made that example build by default
[SVN r61796]
2010-05-05 18:49:40 +00:00
Jeremiah Willcock b1e8eeacd7 Fixed documentation of edge()
[SVN r61795]
2010-05-05 18:40:47 +00:00
Jeremiah Willcock 61109b6b34 Added canonical_ordering to list of built examples
[SVN r61794]
2010-05-05 18:37:37 +00:00
Jeremiah Willcock b99db562e3 Patched unqualified calls to tie() using patch in #4190; fixes #4190
[SVN r61793]
2010-05-05 18:28:39 +00:00
Jeremiah Willcock 725a5910d7 Fixed warnings from Clang
[SVN r61769]
2010-05-04 17:34:00 +00:00
Jeremiah Willcock 6af93735fd Disambiguated RNG
[SVN r61748]
2010-05-03 20:40:48 +00:00
Douglas Gregor 21c9b6e553 Various standards-conformation fixes for Boost.Graph. Fixes #4157
[SVN r61666]
2010-04-29 00:42:35 +00:00
Jeremiah Willcock 00dcf87246 Fixed ambiguity errors from regression tests
[SVN r61543]
2010-04-24 16:49:39 +00:00
Jeremiah Willcock 71ecfa425e Switched to property maps and get/put for most internal data structures
[SVN r61367]
2010-04-18 17:50:20 +00:00
Jeremiah Willcock e9fcb04d9f Fixed wrong number of arguments in call to target() in edge()
[SVN r61326]
2010-04-16 19:49:48 +00:00
Jeremiah Willcock e66d822b25 Added test case names to try to get better output on failures
[SVN r61275]
2010-04-14 14:19:38 +00:00
Jeremiah Willcock a74dac8d15 Fixed error from regression tests
[SVN r61274]
2010-04-14 14:18:44 +00:00
Jeremiah Willcock 0dd699a355 Disambiguated begin and end; fixes #4099
[SVN r61263]
2010-04-14 00:16:21 +00:00
Jeremiah Willcock c19fbafcf6 Fixed VC10 errors and warnings in subgraph tests; fixes #4093
[SVN r61245]
2010-04-13 13:55:20 +00:00
Jeremiah Willcock 904819f886 Cleaned up BGL layout docs, split topology docs into separate file
[SVN r61232]
2010-04-12 21:00:24 +00:00
Jeremiah Willcock a3fa432c9f Fixed fr_layout example and added it to Jamfile
[SVN r61231]
2010-04-12 20:07:26 +00:00
Jeremiah Willcock 0c75ddee03 Added more diagnostics
[SVN r61085]
2010-04-05 21:23:35 +00:00
Neil Groves b13d8ec429 Fix duplication of algorithms by delegating to the specific Boost.Range algorithm header files.
This avoids pulling in any more names than necessary for maximum backward compatibility.
Also the old algorithms that are not duplicated have been reinstated again to maximize backward compatibility.

[SVN r61049]
2010-04-04 19:19:58 +00:00
Jeremiah Willcock 14a8a21105 Applied another patch (unordered_equal_range_dispatch.2.patch) from #3972; fixes #3972
[SVN r60999]
2010-04-02 15:06:13 +00:00
Jeremiah Willcock 109cdf39be Fixed VC++ warning
[SVN r60998]
2010-04-02 15:05:44 +00:00
Jeremiah Willcock 1a52f5132f Added vertex_bundle and edge_bundle property maps, plus fixed some property map allocation bugs
[SVN r60958]
2010-03-30 17:50:27 +00:00
Jeremiah Willcock a9e93bfe92 Removed unused iota function, changed the two uses of any_if to use find_if instead, using Boost.Range for the other algorithms to avoid redundancies
[SVN r60919]
2010-03-29 17:30:52 +00:00
Jeremiah Willcock 373aabbf5b Added printout of successful tests to try to debug mingw problem
[SVN r60916]
2010-03-29 16:40:56 +00:00
Jeremiah Willcock 1d882adf30 Added missing include
[SVN r60900]
2010-03-28 18:32:05 +00:00
Jeremiah Willcock 3ca99558ff Added preconditions on graph listed in #3807; fixes #3807
[SVN r60899]
2010-03-28 18:16:51 +00:00
Jeremiah Willcock 1ba64f82ec Re-enabled Spirit-based parser (but not by default) and cleaned up Graphviz reader implementation
[SVN r60770]
2010-03-22 19:16:38 +00:00
Jeremiah Willcock 0f4d9c80a1 Fixed warning (and probable bug) in test case
[SVN r60769]
2010-03-22 18:33:00 +00:00
Jeremiah Willcock b76090ad8d Fixed typo
[SVN r60651]
2010-03-16 18:00:27 +00:00
Andrew Sutton fad45bcb1b Addressing #3816. Moved array_binary tree to top-level boost namespace,
which seems to be where most basic data structures. The change introduces
no name collisions, since its only user is mutable_queue. This change
deprecates the use of adstl::array_binary_tree for all users.


[SVN r60611]
2010-03-15 11:22:16 +00:00
Andrew Sutton dababea605 Reviewed and applied patch from #4004. Removed one ", which" change since
the resulting change made the trailing clause read as if it applied to
the wrong type.



[SVN r60610]
2010-03-15 11:00:35 +00:00
Jeremiah Willcock c03ffc7c3e Added bipartite graph algorithms from Matthias Walter
[SVN r60485]
2010-03-11 16:56:01 +00:00
Jeremiah Willcock 8dc3d67377 Updated broken link
[SVN r60385]
2010-03-09 18:11:08 +00:00
Jeremiah Willcock 319cbc4947 Fixed tabs
[SVN r60384]
2010-03-09 18:11:00 +00:00
Jeremiah Willcock 205d3176a7 Changed to use property_traits in preparation for SFINAE-enabled property_traits
[SVN r60365]
2010-03-08 19:43:09 +00:00
Jeremiah Willcock 32d2dd1124 Added in container_traits and adjacency_list patches to fix unordered container issues (patch from #3972); fixes #3972
[SVN r60198]
2010-03-05 18:27:43 +00:00
Jeremiah Willcock 63bca89427 Fixed typo
[SVN r60197]
2010-03-05 18:13:48 +00:00
Jeremiah Willcock 5e3a6a954a Added property_put class from Matthias Walter
[SVN r60196]
2010-03-05 17:44:16 +00:00
Jeremiah Willcock 19a0adaf64 Removed unnecessary BOOST_STATIC_ASSERTs
[SVN r60127]
2010-03-03 18:50:48 +00:00
Jeremiah Willcock c1164d8bb9 Workaround for GCC 3.4 and 4.0 bug
[SVN r60126]
2010-03-03 18:44:42 +00:00
Jeremiah Willcock c793b7a9ec Changed to allow characters that are not 8-bit; added one-bit-per-color color map
[SVN r60079]
2010-03-02 19:53:47 +00:00
Jeremiah Willcock 6810d4167d Applied patch from Andy Tompkins in #3917; fixes #3917
[SVN r59628]
2010-02-10 22:10:10 +00:00
Jeremiah Willcock 5e9cac2ed6 Fixed bookmark errors
[SVN r59133]
2010-01-18 18:31:13 +00:00
Jeremiah Willcock c170e069ae Commented out debugging code
[SVN r59005]
2010-01-14 17:06:30 +00:00
Jeremiah Willcock 6d19c10ed6 Changed to BOOST_THROW_EXCEPTION (except in one test case)
[SVN r58876]
2010-01-10 18:54:01 +00:00
Jeremiah Willcock b5138b89ac Fixed typo
[SVN r58783]
2010-01-07 00:15:38 +00:00
Jeremiah Willcock 1917131f0f Split enum definition and object definition to work around issue in GCC 3.2; fixes #3795
[SVN r58531]
2009-12-26 20:30:58 +00:00
Jeremiah Willcock 93b0fbf23e Added link to Parallel BGL docs
[SVN r58427]
2009-12-17 13:44:08 +00:00
Jeremiah Willcock c0b6e0933d Added note about swapped parameters
[SVN r58400]
2009-12-15 18:38:22 +00:00
Jeremiah Willcock 8cccc3c027 Removed obsolete settings, added regex to requirements for users
[SVN r58219]
2009-12-07 14:11:42 +00:00
Jeremiah Willcock 2eca482bec Changed to property_tree copy of encode_char_entities
[SVN r58180]
2009-12-06 03:53:14 +00:00
Jeremiah Willcock f3af4d1a4e Factored out declspec code; added BOOST_GRAPH_SOURCE where necessary
[SVN r58179]
2009-12-06 03:51:08 +00:00
Jeremiah Willcock 4a3a1b5b70 Fixed Template Parameters section to mention bidirectionalS
[SVN r58124]
2009-12-03 18:16:39 +00:00
Jeremiah Willcock 77be6de60e Made traits classes into structs to fix access control errors
[SVN r58114]
2009-12-03 15:40:50 +00:00
Jeremiah Willcock 744a588308 Made vertex_property_type and edge_property_type traits lazier in filtered_graph
[SVN r58090]
2009-12-01 20:25:18 +00:00
Jeremiah Willcock 0737b42364 Changed to Boost.Unordered to fix deprecation warnings
[SVN r58089]
2009-12-01 19:57:23 +00:00
Jeremiah Willcock 0ccfbb5754 Fixed another linkage issue
[SVN r58087]
2009-12-01 19:42:56 +00:00
Jeremiah Willcock 97e1916248 Removed uses of abort() and fixed DLL linkage issues for Windows Mobile
[SVN r58086]
2009-12-01 19:38:49 +00:00
Jeremiah Willcock ba2d8eeffc Added missing #include
[SVN r58061]
2009-11-30 17:17:45 +00:00
Jeremiah Willcock a4af699063 Removed Expat condition since it is no longer required
[SVN r58039]
2009-11-29 21:03:01 +00:00
Jeremiah Willcock 10135eeab5 Removed Expat stuff since it is no longer needed
[SVN r58038]
2009-11-29 20:51:20 +00:00
Jeremiah Willcock dd07cb4c5a Added fix from bug 3695; fixes #3695
[SVN r58037]
2009-11-29 20:43:51 +00:00
Jeremiah Willcock e5aebbcc97 Rewrote GraphML parser to use Boost.PropertyTree; fixes #3300
[SVN r58035]
2009-11-29 20:35:25 +00:00
Jeremiah Willcock d00948cef3 Fixed missing #endif
[SVN r58005]
2009-11-28 15:22:48 +00:00
Jeremiah Willcock 8431fde428 Added lookup_edge() function as wrapper for graphs that do not model AdjacencyMatrix; changed functions to use it instead of edge(); added is_adjacency_matrix traits class; updated docs to reflect Adjacency Matrix requirements and suggestions; fixes #3266
[SVN r57928]
2009-11-25 21:56:36 +00:00
Jeremiah Willcock e47d3c4c5a Added note about parallel edges to docs
[SVN r57914]
2009-11-24 22:34:25 +00:00
Jeremiah Willcock fa50529664 Loosened up what can be passed as an edge property to add_edge(); fixes #3521
[SVN r57913]
2009-11-24 22:11:27 +00:00
Jeremiah Willcock 4124f2c7ff Changed several functions to work on root subgraphs; fixes #575
[SVN r57911]
2009-11-24 21:43:43 +00:00
Jeremiah Willcock 1d018bbeab Fixed graph property constness issues
[SVN r57910]
2009-11-24 21:35:30 +00:00
Jeremiah Willcock 08d4597f35 Fixed issues with property map types in reverse_graph; fixes #447
[SVN r57909]
2009-11-24 21:26:06 +00:00
Jeremiah Willcock 616543e629 Removed code left in by mistake
[SVN r57907]
2009-11-24 21:00:16 +00:00
Jeremiah Willcock ab3e981794 Added vertex() function
[SVN r57903]
2009-11-24 20:31:40 +00:00
Jeremiah Willcock 2d7c00159e Fixed uses of undocumented members of graph types; fixes #1021; fixes #2072
[SVN r57902]
2009-11-24 20:17:54 +00:00
Jeremiah Willcock 09496c3696 Removed obsolete file
[SVN r57901]
2009-11-24 19:43:16 +00:00
Jeremiah Willcock b2636ec3ea Removed old CSR interface; fixes #3135
[SVN r57898]
2009-11-24 18:38:28 +00:00
Jeremiah Willcock 5478788f98 Added extra casts to fix VC++ warnings; fixes #3562
[SVN r57895]
2009-11-24 17:08:17 +00:00
Jeremiah Willcock dfb0e1ab90 Changed vertex_iterator to have vertex_descriptor rather than vertices_size_type as its value type
[SVN r57894]
2009-11-24 17:07:49 +00:00
Jeremiah Willcock 88cc021588 Changed warning syntax for VC++; fixes #3629
[SVN r57892]
2009-11-24 16:33:49 +00:00
Jeremiah Willcock 770ce8cf86 More rearrangement
[SVN r57613]
2009-11-12 19:36:27 +00:00
Jeremiah Willcock f9cc40283c Fixed issues in docs, especially ToC; refs #3615
[SVN r57601]
2009-11-12 19:11:58 +00:00
Jeremiah Willcock 42cf78c555 Changed to boost::unordered_* containers instead of compiler-specific ones; made hashed containers enabled always
[SVN r57560]
2009-11-11 02:59:25 +00:00
Jeremiah Willcock bf679e7e19 Fixed warnings
[SVN r57559]
2009-11-11 02:57:44 +00:00
Jeremiah Willcock 9355c68e52 Fixed warnings
[SVN r57544]
2009-11-10 16:54:01 +00:00
Jeremiah Willcock c1f12a21b0 Removed /GR- option for VC++ 8.0
[SVN r57433]
2009-11-06 08:07:28 +00:00
Jeremiah Willcock 4279beb707 Removed obsolete LICENSE file (no longer used by any source files)
[SVN r57412]
2009-11-05 17:38:01 +00:00
Jeremiah Willcock 76083c7e67 Fixed bind ambiguity; fixes #3569
[SVN r57177]
2009-10-27 18:05:50 +00:00
Troy D. Straszheim b237a6ee82 rm cmake from trunk. I'm not entirely sure this is necessary to satisfy the inspect script, but I'm not taking any chances, and it is easy to put back
[SVN r56942]
2009-10-17 02:07:38 +00:00
Andrew Sutton dced37cf67 Removed assertions that may depend on FP precision.
[SVN r56922]
2009-10-16 14:57:15 +00:00
Jeremiah Willcock e5936c730d Removed unnecessary include of Phoenix 2; fixes #3524
[SVN r56868]
2009-10-15 15:21:21 +00:00
Jeremiah Willcock f41358a7ee Fixed numlocalverts bug
[SVN r56856]
2009-10-14 23:41:53 +00:00
Jeremiah Willcock 93fae3dece Flipped order in convertibility test, fixes #3523 accidentally introduced in r52110
[SVN r56855]
2009-10-14 23:27:51 +00:00
Jeremiah Willcock a880fcbde7 Small wording changes
[SVN r56797]
2009-10-13 19:28:05 +00:00
Jeremiah Willcock f2d850e4f9 Fixed bugs in F-R layout
[SVN r56732]
2009-10-12 15:01:29 +00:00
Jeremiah Willcock 53221f13ab Removed old parameters from test code
[SVN r56682]
2009-10-09 20:15:09 +00:00
Jeremiah Willcock 1d66d04fc1 Fixed duplicate base class problem
[SVN r56658]
2009-10-08 19:42:53 +00:00
Jeremiah Willcock ab16f809a0 Fixed up origin and extent computations in Fruchterman-Reingold layout
[SVN r56654]
2009-10-08 17:57:19 +00:00
Jeremiah Willcock 51182ecec6 Changed to use pointer to underlying RNG
[SVN r56651]
2009-10-08 16:19:23 +00:00
Jeremiah Willcock 0899a49611 Changed from Vertex() to null_vertex() in examples; refs #3506
[SVN r56563]
2009-10-04 01:48:16 +00:00
Jeremiah Willcock d2d80c64da Another attempt at a CSR edges() fix
[SVN r56473]
2009-09-29 16:33:35 +00:00
Jeremiah Willcock 5c1a27890c Fixed bug in CSR edges() function
[SVN r56454]
2009-09-28 15:40:24 +00:00
Jeremiah Willcock 5810b885a7 Made some members public to appease various gcc versions
[SVN r56339]
2009-09-21 16:15:21 +00:00
Jeremiah Willcock 35a3b60e5d Fixed name qualification problem
[SVN r56300]
2009-09-18 20:11:50 +00:00
Jeremiah Willcock fe10254f0c Added fixes to grid graph from Michael Hansen
[SVN r56147]
2009-09-11 17:52:43 +00:00
Jeremiah Willcock 1768443b87 Added information about bidirectional support to CSR documentation
[SVN r56140]
2009-09-10 17:36:35 +00:00
Jeremiah Willcock 454cc349a1 Refactored and added bidirectional CSR support; fixes #3386
[SVN r56128]
2009-09-09 21:29:17 +00:00
Jeremiah Willcock f0d4890326 Fixed deprecated header file
[SVN r56127]
2009-09-09 21:28:25 +00:00
Jeremiah Willcock 818124bc40 Fixed tab
[SVN r56126]
2009-09-09 21:13:29 +00:00
Jeremiah Willcock c12358b15b Changed directedS case to a specialization
[SVN r56117]
2009-09-08 23:36:49 +00:00
Jeremiah Willcock 50bc92b159 Refactored CSR graph code to get ready for bidirectional support
[SVN r56116]
2009-09-08 22:55:05 +00:00
Jeremiah Willcock 722e0c6cc6 Applied unapplied parts of bug 3426; fixes #3426
[SVN r56109]
2009-09-08 17:13:10 +00:00
Jeremiah Willcock b1231d3469 Removed unused variable due to comment from Gordon Smith
[SVN r56097]
2009-09-07 22:27:06 +00:00
Jeremiah Willcock a7a18787e9 Applied fixes for bugs; fixes #3409, #3414, #3415, #3416
[SVN r56089]
2009-09-07 14:55:38 +00:00
Jeremiah Willcock f9341ebe86 Added edge() function for new interface of CSR graph, enabling it to work with the Kolmogorov max-flow algorithm
[SVN r56017]
2009-09-04 15:08:02 +00:00
Jeremiah Willcock 8258ae5b51 Added qualification to has_no_vertices in cuthill_mckee_ordering; fixes #3376
[SVN r56016]
2009-09-04 14:54:24 +00:00
Jeremiah Willcock 4e015739c4 Added fixes to and a test for incremental_components from Michael Hansen; fixes #3250
[SVN r56015]
2009-09-04 14:49:24 +00:00
Jeremiah Willcock 5fe4310658 Stopped requiring vertex() function for graphs being copied into CSR format
[SVN r56014]
2009-09-04 14:47:57 +00:00
Andrew Sutton a04721f0ed Added partial content for edge_list.
Considering alternative documentation structure for adjacency_list.


[SVN r55997]
2009-09-03 13:44:54 +00:00
Andrew Sutton e54ede1993 Working on quickbook docs.
Restructuring parts of the user's guide.
Removed some concepts and fixed issues with others.
Added (incomplete) adjacency_matrix docs.


[SVN r55976]
2009-09-02 14:23:27 +00:00
Jeremiah Willcock 027f256b52 Added copyright and license info from Michael Hansen
[SVN r55780]
2009-08-25 20:55:22 +00:00
Jeremiah Willcock ab7510ba75 Added more name qualifications for VC 7.1
[SVN r55749]
2009-08-24 02:34:39 +00:00
Jeremiah Willcock 02891de03f Added doc updates from Michael Hansen
[SVN r55723]
2009-08-22 20:54:16 +00:00
Jeremiah Willcock f20a8aa9b5 Fixed edge doubling for copying from an undirected graph to a CSR graph; fixes #3357
[SVN r55667]
2009-08-19 20:54:42 +00:00
Jeremiah Willcock c9c6f4b631 Added extra space to work around buggy preprocessors
[SVN r55528]
2009-08-11 16:36:11 +00:00
Jeremiah Willcock 600bb3f37c Spelling fixes from Michael Hansen
[SVN r55507]
2009-08-10 17:51:53 +00:00
Jeremiah Willcock f87613ea1b Added grid graph from Michael Hansen
[SVN r55473]
2009-08-08 18:58:07 +00:00
Jeremiah Willcock 20fd0bef2d Fixed broken lines
[SVN r55472]
2009-08-08 18:54:13 +00:00
Jeremiah Willcock 24c0b6db9d Fixed missing includes
[SVN r55471]
2009-08-08 18:53:56 +00:00
Jeremiah Willcock fd3a5f46f5 Changed include guard
[SVN r55464]
2009-08-08 17:45:56 +00:00
Jeremiah Willcock c748a400e9 Removed #if 0ed out code
[SVN r55356]
2009-08-02 02:43:20 +00:00
Jeremiah Willcock 5eee5fa952 Added missing property iterator update
[SVN r55353]
2009-08-02 02:06:53 +00:00
Jeremiah Willcock 3b3977cd3e Commented out (probably) redundant code
[SVN r55266]
2009-07-29 16:48:50 +00:00
Jeremiah Willcock 2566623af3 Changing to explicit property specializations for vertex_index_t and edge_index_t to try to work around VC++ bugs
[SVN r55265]
2009-07-29 16:33:59 +00:00
Jeremiah Willcock eede6c1338 Added assertion that input file was opened correctly
[SVN r55258]
2009-07-29 12:49:44 +00:00
Jeremiah Willcock 27e1fe603f Used filename from argument list rather than hard-coded name to fix regression test problems
[SVN r55257]
2009-07-29 12:49:27 +00:00
Jeremiah Willcock 483310f08a Changed to use Boost.Iterator, and fixed precision and overflow issues in the sorted generator
[SVN r55156]
2009-07-25 19:41:01 +00:00
Jeremiah Willcock 0b53b0b00a Fixed tab issues found by inspect tool
[SVN r55027]
2009-07-19 15:32:27 +00:00
Andrew Sutton 083d6b83aa Integrated new implementation of howard's cycle ratio algorithm. It's an
optimization and cleanup from the older version. Note that this breaks
source compatability in one instance.


[SVN r54999]
2009-07-17 14:56:19 +00:00
Andrew Sutton 925fd6a2d6 Adding edge-list requirements to write-grapviz function(s) and documentation,
fixing #3259.


[SVN r54995]
2009-07-17 13:02:17 +00:00
Andrew Sutton 0b60534904 Changed the default probability to the sorted_erdos_renyi_generator to 0.5
in order to avoid assertion.
Fixed a couple of warnings in rmat and small_world generators.


[SVN r54769]
2009-07-07 13:02:32 +00:00
Andrew Sutton 883beb8102 Added a link to the adjacency matrix concept in the ToC.
[SVN r54765]
2009-07-07 12:20:30 +00:00
Nicholas Edmonds 394757f512 Added add_vertices and add_edges calls with global-to-local maps and resolved ambiguous overloads resulting from the new forms.
[SVN r54737]
2009-07-07 00:21:15 +00:00
Jeremiah Willcock cdcb54e084 Made add_vertex and add_vertices work with new CSR interface; fixed add_edges stuff to work with edge properties; refs #3134
[SVN r54703]
2009-07-06 04:21:48 +00:00
Jeremiah Willcock 38dd3d15fa Added add_edges() function with edge properties; refs #3134
[SVN r54684]
2009-07-05 20:35:44 +00:00
Jeremiah Willcock d4078044ad Added customizable source data type; refs #3134
[SVN r54596]
2009-07-02 20:17:27 +00:00
Jeremiah Willcock 2e70900dce Fixed typo; refs #3134
[SVN r54539]
2009-06-30 16:57:26 +00:00
Jeremiah Willcock de12ad6911 Allowed use of reserve_count_for_single_pass with old interface; refs #3134
[SVN r54538]
2009-06-30 16:55:07 +00:00
Nicholas Edmonds 414f2b1af0 Added a check to make sure edge source indices are in range for in-place CSR ctor
refs #3134



[SVN r54514]
2009-06-30 00:46:16 +00:00
Jeremiah Willcock 82c88cb90e Added global-to-local maps to all filtered constructors; refs #3134
[SVN r54415]
2009-06-27 19:57:58 +00:00
Nicholas Edmonds 30602358e9 Changed default VertexProperty and EdgeProperty from void to no_property so that indexed_edge_property doesn't try to form references to void.
refs #3134



[SVN r54412]
2009-06-27 19:37:06 +00:00
Nicholas Edmonds 1645bd1bb9 Changed all instances of inherited_edge_properties::edge_property_type to inherited_edge_properties::edge_bundled as edge_property_type is always no_property for CSR.
refs #3134



[SVN r54389]
2009-06-26 23:52:13 +00:00
Jeremiah Willcock 2641f77ab6 Added global, filtered CSR constructors from sorted edge sets
[SVN r54386]
2009-06-26 23:06:38 +00:00
Jeremiah Willcock b1554dfafb Fixed VC++ issue; refs #3134
[SVN r54378]
2009-06-26 16:08:15 +00:00
Jeremiah Willcock c1979501bb Added McGregor algorithm to ToC; patch from Michael Hansen; refs #3134
[SVN r54344]
2009-06-25 17:05:50 +00:00
Jeremiah Willcock d5e29e90c1 Added doc fixes from Michael Hansen; refs #3134
[SVN r54343]
2009-06-25 16:59:38 +00:00
Jeremiah Willcock 5a01455ca3 Added example for McGregor algorithm from Michael Hansen; refs #3134; fixes #694
[SVN r54342]
2009-06-25 16:51:17 +00:00
Jeremiah Willcock 9574e5a490 Added documentation from Michael Hansen; refs #3134
[SVN r54341]
2009-06-25 16:29:57 +00:00
Jeremiah Willcock 90a8d79f4d Added patches from Michael Hansen; refs #3134
[SVN r54337]
2009-06-25 16:24:20 +00:00
Jeremiah Willcock 71830942e6 Added capability to add sorted edge/property sets to CSR graphs; refs #3134
[SVN r54316]
2009-06-24 20:44:53 +00:00
Jeremiah Willcock 8be1112040 Added McGregor updates from Michael Hansen; refs #3134
[SVN r54315]
2009-06-24 20:31:50 +00:00
Jeremiah Willcock 8ca5d4e494 Fixed min/max issue using patch from Michael; refs #3134
[SVN r54278]
2009-06-23 14:18:24 +00:00
Jeremiah Willcock 3a4213ff02 Added test case for McGregor algorithm from Michael; refs #3134
[SVN r54216]
2009-06-22 19:40:39 +00:00
Jeremiah Willcock 5f402c0c31 Added changes from Michael; refs #3134
[SVN r54214]
2009-06-22 19:33:05 +00:00
Jeremiah Willcock 84a790d954 Added new code from Michael Hansen; refs #3134
[SVN r54069]
2009-06-18 22:21:12 +00:00
Nicholas Edmonds 5a3490da07 Removed x87 floating point precision workarounds as this was moved to boost/graph/relax.hpp in r54044.
This commit refs ticket #3134 as it will need to be merged to the release branch.



[SVN r54059]
2009-06-18 18:29:53 +00:00
Jeremiah Willcock 711e647fd2 Fixed relax() to avoid floating point precision issues
[SVN r54044]
2009-06-18 01:21:10 +00:00
Jeremiah Willcock fdfba32734 Added incremental add_edges function to new interface; refs #3134
[SVN r54023]
2009-06-17 21:05:06 +00:00
Jeremiah Willcock 9d5036e580 Added extra named parameters for McGregor maximal common subgraph algorithm; contributed by Michael Hansen; refs #3134
[SVN r53984]
2009-06-16 21:02:14 +00:00
Jeremiah Willcock c5e0a6acd0 Fixed warnings; refs #3134
[SVN r53941]
2009-06-15 18:24:59 +00:00
Jeremiah Willcock a5bbe074a6 Added header include to fix error; refs #3134
[SVN r53938]
2009-06-15 16:55:33 +00:00
Jeremiah Willcock 78a0de9f63 Turned off bundled properties for Sun CC due to compiler bug; refs #3134
[SVN r53913]
2009-06-15 00:55:35 +00:00
Jeremiah Willcock c21d244bbb Added newline to end of file; refs #3134
[SVN r53912]
2009-06-15 00:24:55 +00:00
Jeremiah Willcock eacf5f1c6d Reverted r53870 (unnecessary patch); refs #3134
[SVN r53911]
2009-06-15 00:19:08 +00:00
Jeremiah Willcock d380695958 Changed sort_pair to try to appease VC++; refs #3134
[SVN r53870]
2009-06-13 16:22:20 +00:00
Jeremiah Willcock 6d6048c9a1 Added constructors from multi-pass unsorted, filtered edge lists; refs #3134
[SVN r53837]
2009-06-12 23:40:53 +00:00
Jeremiah Willcock c523b99ddf Added more special constructors for distributed CSR; refs #3134
[SVN r53836]
2009-06-12 21:07:38 +00:00
Jeremiah Willcock 4a03e4c700 Added constructors from unsorted single-pass ranges for CSR graph by caching data in vectors; refs #3134
[SVN r53835]
2009-06-12 20:56:54 +00:00
Jeremiah Willcock cdf526c24d Changed function types to enums and removed include of iostream; refs #3134
[SVN r53834]
2009-06-12 20:25:46 +00:00
Jeremiah Willcock d249df4521 Made sort_pair a correct Strict Weak Ordering; refs #3134
[SVN r53829]
2009-06-12 18:40:10 +00:00
Jeremiah Willcock 012d41e6a5 Reduced test sizes and turned off result printing
[SVN r53826]
2009-06-12 14:58:07 +00:00
Jeremiah Willcock 37f5ad4a5f Made random graph test size configurable and reduced the regression test size to avoid timeout errors on slow machines; refs #3134
[SVN r53825]
2009-06-12 14:43:41 +00:00
Jeremiah Willcock 97e86ebe5f Fixed asserts and probability updates to handle floating point rounding errors better; refs #3134
[SVN r53806]
2009-06-12 02:02:07 +00:00
Jeremiah Willcock 84c7f22f11 Merged r53803 from release branch and rebuilt HTML docs from RST using script from that checkin
[SVN r53804]
2009-06-12 00:42:04 +00:00
Jeremiah Willcock 5d033cb991 Sped up out_degree() and related functions for new interface
[SVN r53786]
2009-06-10 14:43:12 +00:00
Jeremiah Willcock cef1982db1 Fixed issues from ticket 3155; fixes #3155, refs #3134
[SVN r53778]
2009-06-09 18:04:26 +00:00
Jeremiah Willcock 9daa48bff4 Fixed issues from ticket #3151 (some using the patch there and some in other ways); fixes #3151, refs #3134
[SVN r53761]
2009-06-08 21:06:13 +00:00
Jeremiah Willcock 54d8958f9c Copied over character escaping code from property_tree since that library is not stable yet
[SVN r53750]
2009-06-08 14:16:06 +00:00
Jeremiah Willcock 217e527cb3 Fixed syntax of copyright entities
[SVN r53749]
2009-06-08 13:45:46 +00:00
Jeremiah Willcock e006f8ff04 Fixed inline stylesheet
[SVN r53748]
2009-06-08 13:45:08 +00:00
437 changed files with 18945 additions and 6709 deletions
+16
View File
@@ -0,0 +1,16 @@
BasedOnStyle: WebKit
Standard: Cpp11
AlignAfterOpenBracket: false
AlignEscapedNewlinesLeft: true
AlwaysBreakAfterDefinitionReturnType: None
BreakBeforeBraces: Allman
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 80
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 0
IndentCaseLabels: false
SortIncludes: false
AlignTrailingComments: false
SpacesInAngles: true
+65
View File
@@ -0,0 +1,65 @@
# Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# Mael Valais, 2016
# This travis file has been inspired from boostorg/geometry/circle.yml.
#
# This file is intended to make use of travis-ci, a continuous integration
# service. The purpose is to build and run the tests on the graph module
# on every push, and be able to know if those commits are "clean" or if
# they break the build.
#
# I think that we shouldn't restrict on branches: PRs must also be tested
# So for now, I disabled the "only on branches" feature
#branches:
# only:
# - master
# - develop
# - test
language: cpp
compiler: gcc
env:
global:
- BOOST_BRANCH=$([[ "$TRAVIS_BRANCH" = "master" ]] && echo master || echo develop)
- BOOST=boost-local # must be different from graph/boost dir name
addons:
apt:
sources: ubuntu-toolchain-r-test
packages: g++-4.8
before_install:
# Clone boost repository
- cd
- mkdir $BOOST && cd $BOOST
- git init .
- git remote add --no-tags -t $BOOST_BRANCH origin https://github.com/boostorg/boost.git
- git fetch --depth=1
- git checkout $BOOST_BRANCH
- git submodule update --init --merge
- git remote set-branches --add origin $BOOST_BRANCH
- git pull --recurse-submodules
- git submodule update --init
- git checkout $BOOST_BRANCH
- git submodule foreach "git reset --quiet --hard; git clean -fxd"
- git reset --hard; git clean -fxd
- git status
# replace the content of the library with the currently tested repo
- cd && pwd && ls
- rm -rf $BOOST/libs/graph
- cd $TRAVIS_BUILD_DIR && cd ..
- mv graph $HOME/$BOOST/libs/
# build b2 and create headers
- cd && cd $BOOST
- ./bootstrap.sh
- ./b2 headers
# This part is meant for unit tests
script:
- cd $HOME/$BOOST/libs/graph/test
- ../../../b2 toolset=gcc-4.8 cxxflags=-std=c++11
+44
View File
@@ -0,0 +1,44 @@
Boost Graph Library
===================
A generic interface for traversing graphs, using C++ templates.
The full documentation is available on [boost.org](http://www.boost.org/doc/libs/release/libs/graph/doc/index.html).
## Support, bugs and feature requests ##
Bugs and feature requests can be reported through the [Trac issue tracker](https://svn.boost.org/trac/boost/query?component=graph&desc=1&order=id)
(see [open issues](https://svn.boost.org/trac/boost/query?status=!closed&component=graph&desc=1&order=id) and
[closed issues](https://svn.boost.org/trac/boost/query?status=closed&component=graph&col=id&col=summary&col=status&col=owner&col=type&col=milestone&col=version&desc=1&order=id)). [Here](http://lists.boost.org/Archives/boost/2015/04/221780.php) is why Trac is still in use.
You can submit your changes through a [pull request](https://github.com/boostorg/graph/pulls). One of the maintainers will take a look (remember that it can take some time).
There is no mailing-list specific to Boost Graph, although you can use the general-purpose Boost [mailing-list](http://lists.boost.org/mailman/listinfo.cgi/boost-users) using the tag [graph].
## Development ##
Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)):
git clone https://github.com/boostorg/boost
cd boost
git submodule update --init
The Boost Graph Library is located in `libs/graph/`.
Boost Graph Library is mostly made of headers but also contains some compiled components. Here are the build commands:
./bootstrap.sh <- compile b2
./b2 headers <- just installs headers
./b2 <- build compiled components
**Note:** The Boost Graph Library cannot currently be built outside of Boost itself.
### Running tests ###
First, make sure you are in `libs/graph/test`.
You can either run all the 300+ tests listed in `Jamfile.v2` or run a single test:
../../../b2 <- run all tests
../../../b2 cycle_canceling_test <- single test
You can also check the [regression tests reports](http://beta.boost.org/development/tests/develop/developer/graph.html).
+1
View File
@@ -21,6 +21,7 @@ lib boost_graph
# Without these flags, MSVC 7.1 and 8.0 crash
# User reports that VC++ 8.0 does not fail anymore, so that is removed
<toolset>msvc-7.1:<cxxflags>-GR-
<toolset>sun:<build>no
:
:
;
+1 -1
View File
@@ -116,7 +116,7 @@ Called for the target of every out edge of a vertex being examined.
struct AStarHeuristicConcept {
void constraints()
{
function_requires&lt; CopyConstructibleConcept&lt;Heuristic&gt; &gt;();
BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept&lt;Heuristic&gt; ));
h(u);
}
Heuristic h;
+1 -2
View File
@@ -112,8 +112,7 @@ The <TT>adjacent_vertices()</TT> function must return in constant time.
typedef typename boost::graph_traits&lt;G&gt;::adjacency_iterator
adjacency_iterator;
void constraints() {
function_requires&lt; IncidenceGraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;adjacency_iterator&gt; &gt;();
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;adjacency_iterator&gt; ));
p = adjacent_vertices(v, g);
v = *p.first;
+10 -1
View File
@@ -1,13 +1,22 @@
#!/bin/sh
# Copyright (C) 2009 The Trustees of Indiana University.
# Copyright (C) 2010 Daniel Trebbien.
# Use, modification and distribution is subject to the Boost Software
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Authors: Jeremiah Willcock, Andrew Lumsdaine
# Authors: Jeremiah Willcock, Daniel Trebbien, Andrew Lumsdaine
for i in read_graphml read_graphviz write_graphml; do
rst2html.py -gdt --link-stylesheet --traceback --trim-footnote-reference-space --footnote-references=superscript --stylesheet=../../../rst.css $i.rst > $i.html
done
# Also see grid_graph_export_png.sh for figure conversions
# Stoer-Wagner images from Daniel Trebbien
fdp -s -n -Tgif -ostoer_wagner_imgs/digraph1.gif stoer_wagner_imgs/digraph1.dot
fdp -s -n -Tgif -ostoer_wagner_imgs/digraph1-min-cut.gif stoer_wagner_imgs/digraph1-min-cut.dot
fdp -s -n -Tgif -ostoer_wagner_imgs/stoer_wagner-example.gif stoer_wagner_imgs/stoer_wagner-example.dot
fdp -s -n -Tgif -ostoer_wagner_imgs/stoer_wagner-example-c1.gif stoer_wagner_imgs/stoer_wagner-example-c1.dot
fdp -s -n -Tgif -ostoer_wagner_imgs/stoer_wagner-example-min-cut.gif stoer_wagner_imgs/stoer_wagner-example-min-cut.dot
dot -Tgif -ostoer_wagner_imgs/stoer_wagner.cpp.gif stoer_wagner_imgs/stoer_wagner.cpp.dot
+7 -2
View File
@@ -145,20 +145,25 @@ undirected graphs).
typedef typename boost::graph_traits&lt;G&gt;::in_edge_iterator
in_edge_iterator;
void constraints() {
function_requires&lt; IncidenceGraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;in_edge_iterator&gt; &gt;();
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;in_edge_iterator&gt; ));
p = in_edges(v, g);
n = in_degree(v, g);
n = degree(v, g);
e = *p.first;
const_constraints(g);
}
void const_constraints(const G&amp; g) {
p = in_edges(v, g);
n = in_degree(v, g);
n = degree(v, g);
e = *p.first;
}
std::pair&lt;in_edge_iterator, in_edge_iterator&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor v;
typename boost::graph_traits&lt;G&gt;::edge_descriptor e;
typename boost::graph_traits&lt;G&gt;::degree_size_type n;
G g;
};
</PRE>
+9
View File
@@ -150,6 +150,15 @@ undirected graph this method is never called.
</tr>
<tr>
<td>Finish Edge</td>
<td><tt>vis.finish_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on each non-tree edge as well as on each tree edge after
<tt>finish_vertex</tt> has been called on its target vertex.</td>
</tr>
<tr>
<td>Finish Vertex</td>
<td><tt>vis.finish_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
+1 -1
View File
@@ -80,7 +80,7 @@ the search.
<TR>
<TD><tt>w</tt></TD>
<TD>An object of type <tt>DistanceMap</tt>.</TD>
<TD>An object of type <tt>WeightMap</tt>.</TD>
</TR>
</table>
+2 -2
View File
@@ -146,8 +146,8 @@ must all return in constant time.
typedef typename boost::graph_traits&lt;G&gt;::edge_iterator
edge_iterator;
void constraints() {
function_requires&lt; GraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;edge_iterator&gt; &gt;();
BOOST_CONCEPT_ASSERT(( GraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;edge_iterator&gt; ));
p = edges(g);
E = num_edges(g);
+6 -6
View File
@@ -121,12 +121,12 @@ any vertex of graph object which type is <tt>G</tt>.
typedef typename boost::graph_traits&lt;G&gt;::traversal_category traversal_category;
void constraints() {
function_requires&lt; DefaultConstructibleConcept&lt;vertex_descriptor&gt; &gt;();
function_requires&lt; EqualityComparableConcept&lt;vertex_descriptor&gt; &gt;();
function_requires&lt; AssignableConcept&lt;vertex_descriptor&gt; &gt;();
function_requires&lt; DefaultConstructibleConcept&lt;edge_descriptor&gt; &gt;();
function_requires&lt; EqualityComparableConcept&lt;edge_descriptor&gt; &gt;();
function_requires&lt; AssignableConcept&lt;edge_descriptor&gt; &gt;();
BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept&lt;vertex_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( EqualityComparableConcept&lt;vertex_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( AssignableConcept&lt;vertex_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept&lt;edge_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( EqualityComparableConcept&lt;edge_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( AssignableConcept&lt;edge_descriptor&gt; ));
}
G g;
};
+2 -2
View File
@@ -162,8 +162,8 @@ Therefore, the extra requirement is added that the out-edge connecting
{
typedef typename boost::graph_traits&lt;G&gt;::out_edge_iterator out_edge_iterator;
void constraints() {
function_requires&lt; GraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;out_edge_iterator&gt; &gt;();
BOOST_CONCEPT_ASSERT(( GraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;out_edge_iterator&gt; ));
p = out_edges(u, g);
e = *p.first;
+99
View File
@@ -0,0 +1,99 @@
<!DOCTYPE html>
<!--
Copyright Daniel Trebbien 2010.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or the copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<html>
<head>
<title>KeyedUpdatableQueue</title>
</head>
<body>
<img src="../../../boost.png" alt="C++ Boost">
<h2><a name="concept:KeyedUpdatableQueue">KeyedUpdatableQueue</a></h2>
<p>A <i>KeyedUpdatableQueue</i> is a refinement of the <a href="./UpdatableQueue.html">UpdatableQueue</a> concept.
It requires that models order the contained values by their <i>keys</i>, to which
values are mapped via a read/write key map.
<h3>Notation</h3>
<table>
<tr> <td> <tt>Q</tt> </td> <td> is a type that models KeyedUpdatableQueue. </td></tr>
<tr> <td> <tt>T</tt> </td> <td> is the value type of <tt>Q</tt>. </td></tr>
</table>
<h3>Members</h3>
For a type to model the KeyedUpdatableQueue concept it must have the following members
in addition to the members that are required of types that model <a href="./UpdatableQueue.html">UpdatableQueue</a>:
<p>
<table border="1">
<tr> <td><b>Member</b></td> <td><b>Description</b></td> </tr>
<tr> <td> <tt>key_type</tt> </td>
<td> The type of keys that are associated with values </td>
</tr>
<tr> <td> <tt>key_map</tt> </td>
<td> The key property map type. This type must model <a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write Property Map</a>. </td>
</tr>
<tr> <td> <tt>key_map keys() const</tt> </td>
<td> Returns the key map </td>
</tr>
</table>
<h3>Concept Checking Class</h3>
<p><a href="../../../boost/graph/buffer_concepts.hpp"><tt>boost/graph/buffer_concepts.hpp</tt></a>
<pre>
template &lt;class Q&gt;
struct KeyedUpdatableQueueConcept
{
typedef typename Q::key_type key_type;
typedef typename Q::key_map key_map;
void constraints() {
BOOST_CONCEPT_ASSERT(( UpdatableQueue&lt;Q&gt; ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMap&lt; key_map, typename Buffer&lt;Q&gt;::value_type &gt; ));
}
void const_constraints(const Q&amp; cq) {
km = cq.keys();
k = get(km, g_ct);
}
static const typename Buffer&lt;Q&gt;::value_type g_ct;
key_type k;
key_map km;
Q q;
};
</pre>
<h3>Models</h3>
<ul>
<li><tt>boost::d_ary_heap_indirect</tt></a>
</ul>
<br>
<hr>
<table>
<tr>
<td>Copyright&nbsp;&copy;&nbsp;2010</td>
<td>Daniel Trebbien (<a href="mailto:dtrebbien@gmail.com">dtrebbien@gmail.com</a>)
</td>
</tr>
</table>
</body>
</html>
+3 -3
View File
@@ -250,7 +250,7 @@ is no longer a valid vertex descriptor.
struct MutableIncidenceGraphConcept
{
void constraints() {
function_requires&lt; MutableGraph&lt;G&gt; &gt;();
BOOST_CONCEPT_ASSERT(( MutableGraph&lt;G&gt; ));
remove_edge(iter, g);
remove_out_edge_if(u, p, g);
}
@@ -265,7 +265,7 @@ is no longer a valid vertex descriptor.
struct MutableBidirectionalGraphConcept
{
void constraints() {
function_requires&lt; MutableIncidenceGraph&lt;G&gt; &gt;();
BOOST_CONCEPT_ASSERT(( MutableIncidenceGraph&lt;G&gt; ));
remove_in_edge_if(u, p, g);
}
G g;
@@ -278,7 +278,7 @@ is no longer a valid vertex descriptor.
struct MutableEdgeListGraphConcept
{
void constraints() {
function_requires&lt; MutableGraph&lt;G&gt; &gt;();
BOOST_CONCEPT_ASSERT(( MutableGraph&lt;G&gt; ));
remove_edge_if(p, g);
}
G g;
+1 -1
View File
@@ -125,7 +125,7 @@ Return type: <TT>vertex_descriptor</TT>
{
typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
void constraints() {
function_requires&lt; MutableGraphConcept&lt;G&gt; &gt;();
BOOST_CONCEPT_ASSERT(( MutableGraphConcept&lt;G&gt; ));
v = add_vertex(vp, g);
p = add_edge(u, v, ep, g);
}
+3 -3
View File
@@ -173,9 +173,9 @@ The <tt>get()</tt> property map function must be constant time.
typedef typename property_map&lt;G, PropertyTag&gt;::type Map;
typedef typename property_map&lt;G, PropertyTag&gt;::const_type const_Map;
void constraints() {
function_requires&lt; GraphConcept&lt;G&gt; &gt;();
function_requires&lt; ReadWritePropertyMapConcept&lt;Map, X&gt; &gt;();
function_requires&lt; ReadablePropertyMapConcept&lt;const_Map, X&gt; &gt;();
BOOST_CONCEPT_ASSERT(( GraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept&lt;Map, X&gt; ));
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept&lt;const_Map, X&gt; ));
Map pmap = get(PropertyTag(), g);
pval = get(PropertyTag(), g, x);
+100
View File
@@ -0,0 +1,100 @@
<!DOCTYPE html>
<!--
Copyright Daniel Trebbien 2010.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or the copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<html>
<head>
<title>UpdatableQueue</title>
</head>
<body>
<img src="../../../boost.png" alt="C++ Boost">
<h2><a name="concept:UpdatableQueue">UpdatableQueue</a></h2>
<p>An <i>UpdatableQueue</i> is a refinement of the <a href="./Buffer.html">Buffer</a> concept that additionally requires that the Buffer be updatable.
<p>Implicit in the definition is an ordering of values. Though access to the order is not required, types that model UpdatableQueue must document how an object of the type orders values so that a program may change the position of a given value in the ordering. For example, an UpdatableQueue may choose to order values by using a property map, and a value <tt>v1</tt> is considered less than a value <tt>v2</tt> if <tt><nobr>get(pm, v1) &lt; get(pm, v2)</nobr></tt>. A program can update the properties of values, thus changing the order of values in the UpdatableQueue, and notify the UpdatableQueue of the specific values that have a different position in the ordering by calling the <tt>update</tt> member of the UpdatableQueue on each.
<p>A program that modifies the order must notify the UpdatableQueue of values that may have different positions in the ordering since they were inserted or last updated.
<h3>Notation</h3>
<table>
<tr> <td> <tt>Q</tt> </td> <td> is a type that models UpdatableQueue. </td></tr>
<tr> <td> <tt>T</tt> </td> <td> is the value type of <tt>Q</tt>. </td></tr>
</table>
<h3>Members</h3>
For a type to model the UpdatableQueue concept it must have the following members
in addition to the members that are required of types that model <a href="./Buffer.html">Buffer</a>:
<p>
<table border="1">
<tr> <td><b>Member</b></td> <td><b>Description</b></td> </tr>
<tr> <td> <a name="concept:UpdatableQueue:update"><tt>void update(const T& t)</tt></a> </td>
<td> Informs the UpdatableQueue that the program has modified the position of <tt>t</tt> in the ordering </td>
</tr>
<tr> <td> <tt><i>unspecified-bool-type</i> contains(const T& t) const</tt> </td>
<td> Returns whether the queue contains <tt>t</tt> </td>
</tr>
</table>
<h3>Concept Checking Class</h3>
<p><a href="../../../boost/graph/buffer_concepts.hpp"><tt>boost/graph/buffer_concepts.hpp</tt></a>
<pre>
template &lt;class Q&gt;
struct UpdatableQueueConcept
{
void constraints() {
BOOST_CONCEPT_ASSERT(( Buffer&lt;Q&gt; ));
q.update(g_ct);
}
void const_constraints(const Q&amp; cq) {
if (cq.contains(g_ct));
}
static const typename Buffer&lt;Q&gt;::value_type g_ct;
Q q;
};
</pre>
<h3>Futher Refinements</h3>
<ul>
<li><a href="#concept%3AUpdatablePriorityQueue">UpdatablePriorityQueue</a>
<li><a href="./KeyedUpdatableQueue.html">KeyedUpdatableQueue</a>
</ul>
<h2><a name="concept:UpdatablePriorityQueue">UpdatablePriorityQueue</a></h2>
<p>An <i>UpdatablePriorityQueue</i> is a slight refinement of <a href="#concept%3AUpdatableQueue">UpdatableQueue</a>
that imposes the requirement that a program may not increase the position of a value that is held in the queue. That is,
if a value <tt>v</tt> had position <i>n</i> in the ordering, a program may update the position of <tt>v</tt> only to 0, 1, ..., <i>n</i>&nbsp;-&nbsp;1, or <i>n</i>, where 0 is the top of the queue.
<p>The behavior when a program attempts to increase a value's position in the ordering is undefined.
<br>
<hr>
<table>
<tr>
<td>Copyright&nbsp;&copy;&nbsp;2010</td>
<td>Daniel Trebbien (<a href="mailto:dtrebbien@gmail.com">dtrebbien@gmail.com</a>)
</td>
</tr>
</table>
</body>
</html>
+2 -2
View File
@@ -51,8 +51,8 @@ requirements are added.
struct VertexAndEdgeListGraphConcept
{
void constraints() {
function_requires&lt; VertexListGraphConcept&lt;G&gt; &gt;();
function_requires&lt; EdgeListGraphConcept&lt;G&gt; &gt;();
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept&lt;G&gt; ));
}
};
</PRE>
+3 -3
View File
@@ -121,9 +121,9 @@ groups these requirements together, hence the VertexListGraph concept.
typedef typename boost::graph_traits&lt;G&gt;::vertex_iterator
vertex_iterator;
void constraints() {
function_requires&lt; IncidenceGraphConcept&lt;G&gt; &gt;();
function_requires&lt; AdjacencyGraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;vertex_iterator&gt; &gt;();
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;vertex_iterator&gt; ));
p = vertices(g);
V = num_vertices(g);
+10 -10
View File
@@ -1,7 +1,7 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
@@ -214,12 +214,12 @@ example, the following code will result in undefined (bad) behavior:
<b>// Attempt to remove all the vertices. Wrong!</b>
graph_traits&lt;Graph&gt;::vertex_iterator vi, vi_end;
for (tie(vi, vi_end) = vertices(G); vi != vi_end; ++vi)
for (boost::tie(vi, vi_end) = vertices(G); vi != vi_end; ++vi)
remove_vertex(*vi, G);
<b>// Remove all the vertices. This is still wrong!</b>
graph_traits&lt;Graph&gt;::vertex_iterator vi, vi_end, next;
tie(vi, vi_end) = vertices(G);
boost::tie(vi, vi_end) = vertices(G);
for (next = vi; vi != vi_end; vi = next) {
++next;
remove_vertex(*vi, G);
@@ -247,12 +247,12 @@ actual vertex that was removed. The following code demonstrates this.
<b>// Attempt to remove all the vertices. Wrong!</b>
graph_traits&lt;Graph&gt;::vertex_iterator vi, vi_end;
for (tie(vi, vi_end) = vertices(G); vi != vi_end; ++vi)
for (boost::tie(vi, vi_end) = vertices(G); vi != vi_end; ++vi)
remove_vertex(*vi, G);
<b>// Remove all the vertices. This is OK.</b>
graph_traits&lt;Graph&gt;::vertex_iterator vi, vi_end, next;
tie(vi, vi_end) = vertices(G);
boost::tie(vi, vi_end) = vertices(G);
for (next = vi; vi != vi_end; vi = next) {
++next;
remove_vertex(*vi, G);
@@ -281,7 +281,7 @@ vertex descriptors have become invalid, the result is incorrect.
remove_vertex(s, G); <b>// Bad idea! Invalidates vertex descriptors in parent vector.</b>
<b>// The following will produce incorrect results</b>
for(tie(vi, vend) = vertices(G); vi != vend; ++vi)
for(boost::tie(vi, vend) = vertices(G); vi != vend; ++vi)
std::cout << p[*vi] << " is the parent of " << *vi << std::endl;
</pre>
@@ -459,7 +459,7 @@ and<br>
<br><br>
This describes whether the graph class allows the insertion of
parallel edges (edges with the same source and target). The two tags
are <TT>allow_parallel_edge-_tag</TT> and
are <TT>allow_parallel_edge_tag</TT> and
<TT>disallow_parallel_edge_tag</TT>. The
<TT>setS</TT> and <TT>hash_setS</TT> variants disallow
parallel edges while the others allow parallel edges.
@@ -474,9 +474,9 @@ The type used for dealing with the number of vertices in the graph.
<hr>
<tt>graph_traits&lt;adjacency_list&gt;::edge_size_type</tt><br>
<tt>graph_traits&lt;adjacency_list&gt;::edges_size_type</tt><br>
and<br>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed_list, EdgeList&gt;::edge_size_type</tt><br>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed_list, EdgeList&gt;::edges_size_type</tt><br>
<br><br>
The type used for dealing with the number of edges in the graph.
@@ -836,7 +836,7 @@ add_edge(vertex_descriptor&nbsp;u, vertex_descriptor&nbsp;v,
</pre>
Adds edge <i>(u,v)</i> to the graph and attaches <TT>p</TT> as the
value of the edge's internal property storage. Also see the previous
<TT>add_edge()</TT> member function for more details.
<TT>add_edge()</TT> non-member function for more details.
<hr>
+1 -1
View File
@@ -74,7 +74,7 @@ matrix representation of an undirected graph.
<P></P>
<DIV ALIGN="center"><A NAME="fig:undir-adj-matrix-graph"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1:</STRONG> Adjacency Matrix Representation of an Undirected Graph.</CAPTION>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 2:</STRONG> Adjacency Matrix Representation of an Undirected Graph.</CAPTION>
<TR><TD><IMG SRC="./figs/undir-adj-matrix-graph3.gif" width="260" height="240"></TD>
<TD><IMG SRC="./figs/undir-adj-matrix2.gif" width="135" height="136"></TD></TR>
</TABLE>
+75 -10
View File
@@ -37,10 +37,28 @@ template &lt;typename VertexListGraph,
typename P, typename T, typename R&gt;
void
astar_search_no_init
(const IncidenceGraph &amp;g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params&lt;P, T, R&gt;&amp; params);
template &lt;typename VertexListGraph,
typename AStarHeuristic,
typename P, typename T, typename R&gt;
void
astar_search_tree
(const VertexListGraph &amp;g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params&lt;P, T, R&gt;&amp; params);
template &lt;typename VertexListGraph,
typename AStarHeuristic,
typename P, typename T, typename R&gt;
void
astar_search_no_init_tree
(const IncidenceGraph &amp;g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params&lt;P, T, R&gt;&amp; params);
<i>// Non-named parameter interface</i>
template &lt;typename VertexListGraph, typename AStarHeuristic,
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
@@ -60,7 +78,23 @@ astar_search
CompareFunction compare, CombineFunction combine,
CostInf inf, CostZero zero);
<i>// Version that does not initialize property maps (used for implicit graphs)</i>
template &lt;typename VertexListGraph, typename AStarHeuristic,
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
typename CostMap, typename DistanceMap,
typename WeightMap,
typename <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">CombineFunction</a>,
typename CostInf, typename CostZero&gt;
inline void
astar_search_tree
(const VertexListGraph &amp;g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
AStarHeuristic h, AStarVisitor vis,
PredecessorMap predecessor, CostMap cost,
DistanceMap distance, WeightMap weight,
CompareFunction compare, CombineFunction combine,
CostInf inf, CostZero zero);
<i>// Versions that do not initialize property maps (used for implicit graphs)</i>
template &lt;typename IncidenceGraph, typename AStarHeuristic,
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
typename CostMap, typename DistanceMap,
@@ -82,6 +116,22 @@ astar_search_no_init
<b>Note that the index_map and color parameters are swapped in
astar_search_no_init() relative to astar_search(); the named parameter
interfaces are not affected.</b>
template &lt;typename IncidenceGraph, typename AStarHeuristic,
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
typename CostMap, typename DistanceMap,
typename WeightMap,
typename <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">CombineFunction</a>,
typename CostInf, typename CostZero&gt;
inline void
astar_search_no_init_tree
(const IncidenceGraph &amp;g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
AStarHeuristic h, AStarVisitor vis,
PredecessorMap predecessor, CostMap cost,
DistanceMap distance, WeightMap weight,
CompareFunction compare, CombineFunction combine,
CostInf inf, CostZero zero);
</PRE>
<P>
@@ -125,7 +175,8 @@ useful for searching large state spaces -- in game-playing scenarios
the entire graph. Implicit searches can be performed with this
implementation of A* by creating special visitors that generate
neighbors of newly-expanded vertices. Please note that
<tt>astar_search_no_init()</tt> must be used for implicit graphs; the basic
<tt>astar_search_no_init()</tt> or <tt>astar_search_no_init_tree()</tt> must be
used for implicit graphs; the basic
<tt>astar_search()</tt> function requires a graph that models
the <a href="VertexListGraph.html">Vertex List Graph</a> concept. Both
versions
@@ -134,8 +185,9 @@ href="IncidenceGraph.html">Incidence Graph</a> concept.
</P>
<P>
This implementation of A* is based on an OPEN/CLOSED list formulation
of the algorithm. Vertices on the OPEN list have been ``discovered''
For the non-tree versions of the algorithm,
this implementation of A* is based on an OPEN/CLOSED list formulation.
Vertices on the OPEN list have been ``discovered''
by the algorithm, but not ``expanded'' (we have not discovered their
adjacent vertices). Vertices on the CLOSED list have been completely
examined by our search (we have expanded them and added their children
@@ -146,7 +198,11 @@ avoids ``cycles'' in the state space; the search will not become
trapped by loops in the graph. The OPEN/CLOSED lists are implemented
using BGL's vertex coloring mechanisms. Vertices in OPEN are colored
gray, vertices in CLOSED are colored black, and undiscovered vertices
are colored white.
are colored white. For the versions of the algorithm whose names end in
<tt>_tree</tt>, all vertices are assumed to always be white, leading to
checking for repeated vertices being done using the distance map. If a dummy
value is used for the distance map and the graph contains cycles, the algorithm
will probably enter an infinite loop.
</P>
<P>
@@ -292,7 +348,8 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote>
This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. This is necessary for efficient updates of
num_vertices(g))</tt>. This is necessary in non-tree versions of the
algorithm for efficient updates of
the heap data structure when an edge is relaxed. The type
<tt>VertexIndexMap</tt> must be a model of <a
href="../../property_map/doc/ReadablePropertyMap.html"><tt>Readable
@@ -338,7 +395,10 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<tt>combine</tt> function object and the zero object for the
identity element. Also the distance value type must have a <a
href="http://www.sgi.com/tech/stl/StrictWeakOrdering.html"><tt>StrictWeakOrdering</tt></a>
provided by the <tt>compare</tt> function object.<br>
provided by the <tt>compare</tt> function object. A
<tt>constant_writable_property_map</tt> returning the infinity value can be
used for this parameter in tree versions of the algorithm when the graph does
not contain a directed cycle.<br>
<b>Default:</b> <tt>shared_array_property_map</tt>
with the same value type as the
@@ -355,7 +415,10 @@ UTIL/OUT: <tt>rank_map(CostMap c_map)</tt>
<tt>h</tt>) from the vertex to a goal. The type <tt>CostMap</tt>
must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html"><tt>Read/Write
Property Map</tt></a>. The vertex descriptor type of the graph
Property Map</tt></a> in non-tree versions of the algorithm, and <a
href="../../property_map/doc/WritablePropertyMap.html"><tt>Writable Property
Map</tt></a> in tree versions of the algorithm. The vertex descriptor type
of the graph
needs to be usable as the key type of the distance map. The value
type of the distance map is the element type of a <a
href="./Monoid.html"><tt>Monoid</tt></a> formed with the
@@ -364,7 +427,8 @@ UTIL/OUT: <tt>rank_map(CostMap c_map)</tt>
href="http://www.sgi.com/tech/stl/StrictWeakOrdering.html"><tt>StrictWeakOrdering</tt></a>
provided by the <tt>compare</tt> function object. The value type
for this map must be the same as the value type for the distance
map.<br>
map. In tree versions of the algorithm, <tt>null_property_map</tt> can be
used for this parameter.<br>
<b>Default:</b> <tt>shared_array_property_map</tt>
with the same value type as the
@@ -375,7 +439,8 @@ UTIL/OUT: <tt>rank_map(CostMap c_map)</tt>
UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
<blockquote>
This is used during the execution of the algorithm to mark the
This is used during the execution of non-tree versions of the algorithm to
mark the
vertices, indicating whether they are on the OPEN or CLOSED lists.
The vertices start out white and become gray when they are inserted
into the OPEN list. They then turn black when they are examined and
+2 -2
View File
@@ -31,10 +31,10 @@
bandwidth(const Graph& g, VertexIndexMap index_map)
</pre>
The <b><i>bandwidth</i></b> of an undirected graph is the maximum
The <b><i>bandwidth</i></b> of a graph is the maximum
distance between two adjacent vertices, with distance measured on a
line upon which the vertices have been placed at unit intervals. To
put it another way, if the vertices of an undirected graph
put it another way, if the vertices of a graph
<i>G=(V,E)</i> are each assigned an index from zero to <i>|V| - 1</i>
given by <i>index[v]</i>, then the bandwidth of <i>G</i> is<br>
<br>
+1 -1
View File
@@ -120,7 +120,7 @@ IN: <tt>VertexIndexMap vertex_index</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
+1 -1
View File
@@ -266,7 +266,7 @@ IN: <tt>vertex_index_map(VertexIndexMap vertex_index)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
+6 -5
View File
@@ -156,11 +156,11 @@ template.
@d Concept checking of type parameters
@{
function_requires< VertexListGraphConcept<Graph> >();
function_requires< IncidenceGraphConcept<Graph> >();
function_requires< WritablePropertyMapConcept<ComponentMap, edge_t> >();
function_requires< ReadWritePropertyMapConcept<DiscoverTimeMap, vertex_t> >();
function_requires< ReadWritePropertyMapConcept<LowPointMap, vertex_t> >();
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> ));
BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<ComponentMap, edge_t> ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<DiscoverTimeMap, vertex_t> ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<LowPointMap, vertex_t> ));
@}
The first step of the algorithm is to initialize the discover times of
@@ -286,6 +286,7 @@ S.pop();
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/graph_concepts.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/concept/assert.hpp>
namespace boost {
@<Biconnected Components Algorithm@>
+2 -2
View File
@@ -338,8 +338,8 @@ main()
std::cout &lt;&lt; "c flow values:" &lt;&lt; std::endl;
graph_traits &lt; Graph &gt;::vertex_iterator u_iter, u_end;
graph_traits &lt; Graph &gt;::out_edge_iterator ei, e_end;
for (tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
for (tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
if (capacity[*ei] &gt; 0)
std::cout &lt;&lt; "f " &lt;&lt; *u_iter &lt;&lt; " " &lt;&lt; target(*ei, g) &lt;&lt; " "
&lt;&lt; (capacity[*ei] - residual_capacity[*ei]) &lt;&lt; std::endl;
+2 -2
View File
@@ -223,7 +223,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.<br>
<b>Python</b>: Unsupported parameter.
@@ -305,7 +305,7 @@ The example in <a
href="../example/bfs-example.cpp"><TT>example/bfs-example.cpp</TT></a>
demonstrates using the BGL Breadth-first search algorithm on the graph
from <A HREF="./graph_theory_review.html#fig:bfs-example">Figure
5</A>. The file
6</A>. The file
<a href="../example/bfs-example2.cpp"><TT>example/bfs-example2.cpp</TT></a>
contains the same example, except that the <tt>adacency_list</tt>
class used has <tt>VertexList</tt> and <tt>EdgeList</tt> set
+150 -100
View File
@@ -8,57 +8,59 @@
For more information, see http://www.boost.org
-->
<head>
<title>Bundled Properties</title>
</head>
<head>
<title>Bundled Properties</title>
</head>
<body BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"/>
<h1>Bundled Properties</h1>
<body BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"/>
<h1>Bundled Properties</h1>
<p>Class templates <code><a
href="adjacency_list.html">adjacency_list</a></code> and
<code><a href="adjacency_matrix.html">adjacency_matrix</a></code> support
the introduction of named properties via <a
href="using_adjacency_list.html#sec:adjacency-list-properties">internal
properties</a>. However, this method is cumbersome in many uses,
where it would be more intuitive to just specify a structure or
class that contains internal properties for edges or
vertices. Bundled properties allow one to use
<code>adjacency_list</code> and <code>adjacency_matrix</code> in this
manner, providing a simple
way to introduce and access any number of internal properties
for vertices and edges.</p>
<p>Class templates <code><a
href="adjacency_list.html">adjacency_list</a></code> and
<code><a href="adjacency_matrix.html">adjacency_matrix</a></code> support
the introduction of named properties via <a
href="using_adjacency_list.html#sec:adjacency-list-properties">internal
properties</a>. However, this method is cumbersome in many uses,
where it would be more intuitive to just specify a structure or
class that contains internal properties for edges or
vertices. Bundled properties allow one to use
<code>adjacency_list</code> and <code>adjacency_matrix</code> in this
manner, providing a simple
way to introduce and access any number of internal properties
for vertices and edges.</p>
<p>One can introduce bundled properties into an
either graph type by providing a user-defined class
type for the <code>VertexProperties</code> or
<code>EdgeProperties</code> template arguments. The user-defined
class may alternatively be placed at the end of a
<code>property</code> list, replacing the (implicit)
<code>boost::no_property</code> argument.</p>
<p>One can introduce bundled properties into an
either graph type by providing a user-defined class
type for the <code>VertexProperties</code> or
<code>EdgeProperties</code> template arguments. The user-defined
class may alternatively be placed at the end of a
<code>property</code> list, replacing the (implicit)
<code>boost::no_property</code> argument.</p>
<h2>Example: Route planning</h2>
<p>Consider the implementation of a simple route planner that
should find the shortest directions from one city to another
via a set of highways. The vertices of the graph are cities,
and we may wish to store several bits of information about the
city within each vertex:</p>
<pre>
<h2>Example: Route planning</h2>
<p>Consider the implementation of a simple route planner that
should find the shortest directions from one city to another
via a set of highways. The vertices of the graph are cities,
and we may wish to store several bits of information about the
city within each vertex:</p>
<pre>
struct City
{
string name;
int population;
vector&lt;int&gt; zipcodes;
};
</pre>
<p>The edges in the graph represent highways, which also have
several interesting attributes:</p>
</pre>
<pre>
<p>
The edges in the graph represent highways, which also have several interesting
attributes:
</p>
<pre>
struct Highway
{
string name;
@@ -67,41 +69,73 @@ struct Highway
int lanes;
bool divided;
};
</pre>
</pre>
<p>Without bundled properties, translating this example directly
into an instantiation of <code>adjacency_list</code> would
involve several custom properties and would result in a type
like this:</p>
<pre>
<p>With bundled properties, we can directly use the <code>City</code> and
<code>Highway</code> structures to define the graph:</p>
<pre>
typedef boost::adjacency_list&lt;
boost::listS, boost::vecS, boost::bidirectionalS,
City, Highway&gt;
Map;
</pre>
<p>Without bundled properties, translating this example directly
into an instantiation of <code>adjacency_list</code> would
involve several custom properties and would result in a type
like this:</p>
<pre>
typedef boost::adjacency_list&lt;
boost::listS, boost::vecS, boost::bidirectionalS,
// Vertex properties
boost::property&lt;boost::vertex_name_t, std::string,
boost::property&lt;boost::vertex_name_t, std::string,
boost::property&lt;population_t, int,
boost::property&lt;zipcodes_t, std::vector&lt;int&gt; &gt; &gt; &gt;,
// Edge properties
boost::property&lt;boost::edge_name_t, std::string,
boost::property&lt;boost::edge_length_t, double,
boost::property&lt;boost::edge_weight_t, double,
boost::property&lt;edge_speed_limit_t, int,
boost::property&lt;edge_lanes_t, int,
boost::property&lt;edge_divided, bool&gt; &gt; &gt; &gt; &gt; &gt;
Map;
</pre>
</pre>
<p>With bundled properties, we can directly use the
<code>City</code> and <code>Highway</code> structures:</p>
<pre>
<p>
Bundling vertex and edge properties greatly simplifies the declaration of
graphs.
</p>
<p>
In addition to vertex and edge bundles, we can also bundle properties of the
graph itself. Suppopse we extend the application to include a portfolio of
route-planning maps for different countries. In addition to the <code>City</code>
and <code>Highway</code> bundles above, we can declare a graph bundle,
<code>Country</Code>.
</p>
<pre>
struct Country {
string name;
bool use_right; // Drive on the left or right
bool use_metric; // mph or km/h
};
</pre>
<p>The graph would now be declared as:</p>
<pre>
<pre>
typedef boost::adjacency_list&lt;
boost::listS, boost::vecS, boost::bidirectionalS,
City, Highway&gt; Map;
</pre>
City, Highway, Country&gt;
Map;
</pre>
</pre>
<h2>Accessing bundled properties</h2>
<p>To access a bundled property for a particular edge or vertex,
subscript your graph with the descriptor of the edge or vertex
whose bundled property you wish to access. For instance:</p>
<pre>
<h2>Accessing bundled properties</h2>
<p>To access a bundled property for a particular edge or vertex,
subscript your graph with the descriptor of the edge or vertex
whose bundled property you wish to access. For instance:</p>
<pre>
Map map; // load the map
Map::vertex_descriptor v = *vertices(map).first;
map[v].name = "Troy";
@@ -109,70 +143,86 @@ map[v].population = 49170;
map[v].zipcodes.push_back(12180);
Map::edge_descriptor e = *out_edges(v, map).first;
map[e].name = "I-87";
map[e].miles = 10;
map[e].miles = 10.;
map[e].speed_limit = 65;
map[e].lanes = 4;
map[e].divided = true;
</pre>
</pre>
<h2>Properties maps from bundled properties</h2>
<p>Often one needs to create a property map from an internal
property for use in a generic algorithm. For instance, using the
graph without bundled properties we might invoke <a
href="dijkstra_shortest_paths.html">Dijkstra's shortest
paths</a> algorithm like this:</p>
<pre>
<p>
The graph bundle, since it does not correspond to a vertex or edge descripor
is accessed using the graph_bundle object as a key.
</p>
<pre>
map[graph_bundle].name = "United States";
map[graph_bundle].use_right = true;
map[graph_bundle].use_metric = false;
</pre>
<h2>Properties maps from bundled properties</h2>
<p>Often one needs to create a property map from an internal
property for use in a generic algorithm. For instance, using the
graph without bundled properties we might invoke <a
href="dijkstra_shortest_paths.html">Dijkstra's shortest
paths</a> algorithm like this:</p>
<pre>
vector&lt;double&gt; distances(num_vertices(map));
dijkstra_shortest_paths(map, from,
weight_map(get(edge_length, map))
.distance_map(make_iterator_property_map(distances.begin(),
get(vertex_index, map))));
</pre>
</pre>
<p>With bundled properties, we can just pass a <em>member pointer</em>
as the property for <code>get</code>. The equivalent example
using bundled properties is:</p>
<pre>
<p>With bundled properties, we can just pass a <em>member pointer</em>
as the property for <code>get</code>. The equivalent example using bundled
properties is:</p>
<pre>
vector&lt;double&gt; distances(num_vertices(map));
dijkstra_shortest_paths(map, from,
weight_map(get(<font color="#ff0000">&amp;Highway::miles</font>, map))
.distance_map(make_iterator_property_map(distances.begin(),
get(vertex_index, map))));
</pre>
</pre>
<p>The type of the returned property map is <code>property_map&lt;Map, int Highway::*&gt;::type</code>
or <code>property_map&lt;Map, int Highway::*&gt;::const_type</code>, depending on whether the graph
<code>map</code> is non-constant or constant.
<p> You may also access the entire vertex or edge bundle as a property map
using the <code>vertex_bundle</code> or <code>edge_bundle</code> properties,
respectively. For instance, the property map returned by <code>get(vertex_bundle, map)</code> is
an <a href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a> providing access to the
<code>City</code> values stored in each vertex.
<p>The type of the returned property map is <code>property_map&lt;Map, double Highway::*&gt;::type</code>
or <code>property_map&lt;Map, double Highway::*&gt;::const_type</code>, depending on whether the graph
<code>map</code> is non-constant or constant.
<h2>Getting the type of bundled properties</h2>
<p> You may also access the entire vertex or edge bundle as a property map
using the <code>vertex_bundle</code> or <code>edge_bundle</code> properties,
respectively. For instance, the property map returned by <code>get(vertex_bundle, map)</code> is
an <a href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a> providing access to the
<code>City</code> values stored in each vertex.
<p>To get the type of the vertex or edge bundle for a given graph
type <tt>Graph</tt>, you can use the trait
classes <tt>vertex_bundle_type</tt>
and <tt>edge_bundle_type</tt>. The
type <tt>vertex_bundle_type&lt;Graph&gt;::type</tt> will be the
type bundled with vertices (or <tt>no_vertex_bundle</tt> if the
graph supports bundles but no vertex bundle
exists). Likewise, <tt>edge_bundle_type&lt;Graph&gt;::type</tt>
will be the type bundled with edges (or <tt>no_edge_bundle</tt> if
no edge bundle exists).</p>
<h2>Property maps for a graph bundle</h2>
There is currently no support for creating property maps from the bundled
properties of a graph.
<h2>Compatibility</h2> <p>Bundled properties will only work
properly on compilers that support class template partial
specialization.</p>
<h2>Getting the type of bundled properties</h2>
<hr>
<p>To get the type of the vertex or edge bundle for a given graph
type <tt>Graph</tt>, you can use the trait
classes <tt>vertex_bundle_type</tt>
and <tt>edge_bundle_type</tt>. The
type <tt>vertex_bundle_type&lt;Graph&gt;::type</tt> will be the
type bundled with vertices (or <tt>no_vertex_bundle</tt> if the
graph supports bundles but no vertex bundle
exists). Likewise, <tt>edge_bundle_type&lt;Graph&gt;::type</tt>
will be the type bundled with edges (or <tt>no_edge_bundle</tt> if
no edge bundle exists).</p>
<h2>Compatibility</h2> <p>Bundled properties will only work
properly on compilers that support class template partial
specialization.</p>
<hr>
Copyright &copy; 2004 <a href="http://www.boost.org/people/doug_gregor.html">Doug Gregor</a>.
<address><a href="mailto:gregod@cs.rpi.edu"></a></address>
<address><a href="mailto:gregod@cs.rpi.edu"></a></address>
<!-- Created: Fri May 7 09:59:21 EDT 2004 -->
<!-- hhmts start -->
Last modified: Fri May 7 10:56:01 EDT 2004
<!-- hhmts end -->
</body>
</body>
</html>
View File
+2 -2
View File
@@ -101,8 +101,8 @@ function address(host, user) {
<pre>
namespace boost {
template&lt;typename <a href="#Directed">Directed</a> = directedS, typename <a href="#VertexProperty">VertexProperty</a> = void,
typename <a href="#EdgeProperty">EdgeProperty</a> = void, typename <a href="#GraphProperty">GraphProperty</a> = no_property,
template&lt;typename <a href="#Directed">Directed</a> = directedS, typename <a href="#VertexProperty">VertexProperty</a> = no_property,
typename <a href="#EdgeProperty">EdgeProperty</a> = no_property, typename <a href="#GraphProperty">GraphProperty</a> = no_property,
typename <a href="#Vertex">Vertex</a> = std::size_t, typename <a href="#EdgeIndex">EdgeIndex</a> = Vertex&gt;
class compressed_sparse_row_graph
{
+1 -1
View File
@@ -117,7 +117,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.<br>
<b>Python</b>: Unsupported parameter.
+9 -9
View File
@@ -79,7 +79,7 @@ those types that model <a
href="./VertexListGraph.html">VertexListGraph</a>. This is enforced by
the use of those graph operations in the algorithm, and furthermore by
our explicit requirement added as a concept check with
<TT>function_requires()</TT> (see Section <A
<TT>BOOST_CONCEPT_ASSERT()</TT> (see Section <A
HREF="../../concept_check/concept_check.htm">Concept
Checking</A> for more details about concept checking).
@@ -106,7 +106,7 @@ hence the return type of the function is the graph's
graph algorithm as a template function, the concept checks, and some
typedefs. The implementation is straightforward, the only step not
discussed above is the color initialization step, where we set the
color of all the vertices to ``uncolored''.
color of all the vertices to "uncolored."
<P>
<PRE>
@@ -122,11 +122,11 @@ namespace boost {
typedef typename property_traits&lt;Color&gt;::value_type ColorType;
typedef typename property_traits&lt;Order&gt;::value_type OrderType;
function_requires&lt; VertexListGraphConcept&lt;VertexListGraph&gt; &gt;();
function_requires&lt; ReadWritePropertyMapConcept&lt;Color, vertex_descriptor&gt; &gt;();
function_requires&lt; IntegerConcept&lt;ColorType&gt; &gt;();
function_requires&lt; size_type, ReadablePropertyMapConcept&lt;Order&gt; &gt;();
typedef typename same_type&lt;OrderType, vertex_descriptor&gt;::type req_same;
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept&lt;VertexListGraph&gt; ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept&lt;Color, vertex_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( IntegerConcept&lt;ColorType&gt; ));
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept&lt;Order, size_type&gt; ));
BOOST_STATIC_ASSERT((is_same&lt;OrderType, vertex_descriptor&gt;::value));
size_type max_color = 0;
const size_type V = num_vertices(G);
@@ -134,7 +134,7 @@ namespace boost {
mark(V, numeric_limits_max(max_color));
typename GraphTraits::vertex_iterator v, vend;
for (tie(v, vend) = vertices(G); v != vend; ++v)
for (boost::tie(v, vend) = vertices(G); v != vend; ++v)
color[*v] = V - 1; // which means "not colored"
for (size_type i = 0; i &lt; V; i++) {
@@ -142,7 +142,7 @@ namespace boost {
// mark all the colors of the adjacent vertices
typename GraphTraits::adjacency_iterator ai, aend;
for (tie(ai, aend) = adjacent_vertices(current, G); ai != aend; ++ai)
for (boost::tie(ai, aend) = adjacent_vertices(current, G); ai != aend; ++ai)
mark[color[*ai]] = i;
// find the smallest color unused by the adjacent vertices
+1 -1
View File
@@ -80,7 +80,7 @@ integers in the half-open range <tt>[0,num_vertices(G))</tt>.<br>
<b>Default:</b> <tt>get(vertex_index, G)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
+223
View File
@@ -0,0 +1,223 @@
<HTML>
<!--
Copyright (c) Piotr Wygocki 2013
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Cycle Canceling for Min Cost Max Flow</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:cycle_canceling">
<TT>cycle_canceling</TT>
</H1>
<PRE>
<i>// named parameter version</i>
template &lt;class <a href="./Graph.html">Graph</a>, class P, class T, class R&gt;
void cycle_canceling(
Graph &amp;g,
const bgl_named_params&lt;P, T, R&gt; &amp; params = <i>all defaults</i>)
<i>// non-named parameter version</i>
template &lt;class <a href="./Graph.html">Graph</a>, class Pred, class Distance, class Reversed, class ResidualCapacity, class Weight&gt;
void cycle_canceling(const Graph &amp; g, Weight weight, Reversed rev, ResidualCapacity residual_capacity, Pred pred, Distance distance)
</PRE>
<P>
The <tt>cycle_canceling()</tt> function calculates the minimum cost flow of a network with given flow. See Section <a
href="./graph_theory_review.html#sec:network-flow-algorithms">Network
Flow Algorithms</a> for a description of maximum flow.
For given flow values <i> f(u,v)</i> function minimizes flow cost in such a way, that for each <i>v in V</i> the
<i> sum<sub> u in V</sub> f(v,u) </i> is preserved. Particularly if the input flow was the maximum flow, the function produces min cost max flow.
The function calculates the flow values <i>f(u,v)</i> for all <i>(u,v)</i> in
<i>E</i>, which are returned in the form of the residual capacity
<i>r(u,v) = c(u,v) - f(u,v)</i>.
<p>
There are several special requirements on the input graph and property
map parameters for this algorithm. First, the directed graph
<i>G=(V,E)</i> that represents the network must be augmented to
include the reverse edge for every edge in <i>E</i>. That is, the
input graph should be <i>G<sub>in</sub> = (V,{E U
E<sup>T</sup>})</i>. The <tt>ReverseEdgeMap</tt> argument <tt>rev</tt>
must map each edge in the original graph to its reverse edge, that is
<i>(u,v) -> (v,u)</i> for all <i>(u,v)</i> in <i>E</i>.
The <tt>WeightMap</tt> has to map each edge from <i>E<sup>T</sup></i> to <i>-weight</i> of its reversed edge.
Note that edges from <i>E</i> can have negative weights.
<p>
If weights in the graph are nonnegative, the
<a href="./successive_shortest_path_nonnegative_weights.html"><tt>successive_shortest_path_nonnegative_weights()</tt></a>
might be better choice for min cost max flow.
<p>
The algorithm is described in <a
href="./bibliography.html#ahuja93:_network_flows">Network Flows</a>.
<p>
In each round algorithm augments the negative cycle (in terms of weight) in the residual graph.
If there is no negative cycle in the network, the cost is optimized.
<p>
Note that, although we mention capacity in the problem description, the actual algorithm doesn't have to now it.
<p>
In order to find the cost of the result flow use:
<a href="./find_flow_cost.html"><tt>find_flow_cost()</tt></a>.
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/successive_shortest_path_nonnegative_weights.hpp"><TT>boost/graph/successive_shortest_path_nonnegative_weights.hpp</TT></a>
<P>
<h3>Parameters</h3>
IN: <tt>Graph&amp; g</tt>
<blockquote>
A directed graph. The
graph's type must be a model of <a
href="./VertexListGraph.html">VertexListGraph</a> and <a href="./IncidenceGraph.html">IncidenceGraph</a> For each edge
<i>(u,v)</i> in the graph, the reverse edge <i>(v,u)</i> must also
be in the graph.
</blockquote>
<h3>Named Parameters</h3>
IN/OUT: <tt>residual_capacity_map(ResidualCapacityEdgeMap res)</tt>
<blockquote>
This maps edges to their residual capacity. The type must be a model
of a mutable <a
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
Map</a>. The key type of the map must be the graph's edge descriptor
type.<br>
<b>Default:</b> <tt>get(edge_residual_capacity, g)</tt>
</blockquote>
IN: <tt>reverse_edge_map(ReverseEdgeMap rev)</tt>
<blockquote>
An edge property map that maps every edge <i>(u,v)</i> in the graph
to the reverse edge <i>(v,u)</i>. The map must be a model of
constant <a href="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</a>. The key type of the map must be the graph's edge
descriptor type.<br>
<b>Default:</b> <tt>get(edge_reverse, g)</tt>
</blockquote>
IN: <tt>weight_map(WeightMap w)</tt>
<blockquote>
The weight (also know as ``length'' or ``cost'') of each edge in the
graph. The <tt>WeightMap</tt> type must be a model of <a
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The key type for this property map must be the edge
descriptor of the graph. The value type for the weight map must be
<i>Addable</i> with the distance map's value type. <br>
<b>Default:</b> <tt>get(edge_weight, g)</tt><br>
</blockquote>
UTIL: <tt>predecessor_map(PredEdgeMap pred)</tt>
<blockquote>
Use by the algorithm to store augmenting paths. The map must be a
model of mutable <a
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a>.
The key type must be the graph's vertex descriptor type and the
value type must be the graph's edge descriptor type.<br>
<b>Default:</b> an <a
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
of edge descriptors of size <tt>num_vertices(g)</tt> and
using the <tt>i_map</tt> for the index map.
</blockquote>
UTIL: <tt>distance_map(DistanceMap d_map)</tt>
<blockquote>
The shortest path weight from the source vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map. The
shortest path weight is the sum of the edge weights along the
shortest path. The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the distance map.
<b>Default:</b> <a
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of the <tt>WeightMap</tt>'s value type of size
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
map.<br>
</blockquote>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote>
Maps each vertex of the graph to a unique integer in the range
<tt>[0, num_vertices(g))</tt>. This property map is only needed
if the default for the distance or predecessor map is used.
The vertex index map must be a model of <a
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The key type of the map must be the graph's vertex
descriptor type.<br>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
<h3>Complexity</h3>
In the integer capacity and weight case, if <i>C</i> is the initial cost of the flow, then the complexity is <i> O(C * |V| * |E|)</i>,
where <i>O(|E|* |V|)</i> is the complexity of the bellman ford shortest paths algorithm and <i>C</i> is upper bound on number of iteration.
In many real world cases number of iterations is much smaller than <i>C</i>.
<h3>Example</h3>
The program in <a
href="../example/cycle_canceling_example.cpp"><tt>example/cycle_canceling_example.cpp</tt></a>.
<h3>See Also</h3>
<a href="./successive_shortest_path_nonnegative_weights.html"><tt>successive_shortest_path_nonnegative_weights()</tt></a><br>
<a href="./find_flow_cost.html"><tt>find_flow_cost()</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2013</TD><TD>
Piotr Wygocki, University of Warsaw (<A HREF="mailto:wygos@mimuw.edu.pl">wygos at mimuw.edu.pl</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
<!-- LocalWords: HTML Siek Edmonds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
-->
<!-- LocalWords: gif ALT BR sec edmonds karp TT DIV CELLPADDING TR TD PRE lt
-->
<!-- LocalWords: typename VertexListGraph CapacityEdgeMap ReverseEdgeMap gt
-->
<!-- LocalWords: ResidualCapacityEdgeMap VertexIndexMap src rev ColorMap pred
-->
<!-- LocalWords: PredEdgeMap tt href html hpp ul li nbsp br LvaluePropertyMap
-->
<!-- LocalWords: num ColorValue DIMACS cpp pre config iostream dimacs int std
-->
<!-- LocalWords: namespace vecS directedS cout endl iter ei HR valign nowrap
-->
<!-- LocalWords: jeremy siek htm Univ mailto jsiek lsc edu
p -->
+1 -1
View File
@@ -118,7 +118,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.<br>
<b>Python</b>: Unsupported parameter.
Executable → Regular
View File
+6
View File
@@ -107,6 +107,7 @@ DFS-VISIT(<i>G</i>, <i>u</i>)
<i>...</i>
<b>else if</b> (<i>color[v] =</i> BLACK)
<i>...</i>
<i>...</i>
<b>end for</b>
<i>color[u] :=</i> BLACK
<i>f_time[u] := time := time + 1</i>
@@ -140,6 +141,8 @@ examine edge <i>(u,v)</i>
-
<i>(u,v)</i> is a cross or forward edge
-
finish edge <i>(u,v)</i>
-
finish vertex <i>u</i>
-
</pre>
@@ -266,6 +269,9 @@ The time complexity is <i>O(E + V)</i>.
<li><b><tt>vis.forward_or_cross_edge(e, g)</tt></b> is invoked on
forward or cross edges in the graph. In an undirected graph this
method is never called.
<li><b><tt>vis.finish_edge(e, g)</tt></b> is invoked on the non-tree edges in
the graph as well as on each tree edge after its target vertex is finished.
<li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked on a vertex after
all of its out edges have been added to the search tree and all of
+12 -6
View File
@@ -239,7 +239,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
@@ -248,9 +248,13 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote>
The predecessor map records the edges in the minimum spanning
tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i>
for all <i>u in V</i> are in the minimum spanning tree. If <i>p[u] =
The predecessor map records the edges in the shortest path tree, the tree computed
by the traversal of the graph. Upon completion of the algorithm, the edges
<i>(p[u],u)</i> for all <i>u in V</i> are in the tree. The shortest path
from vertex <i>s</i> to each vertex <i>v</i> in the graph consists of the
vertices <i>v</i>, <i>p[v]</i>, <i>p[p[v]]</i>, and so on until <i>s</i> is
reached, in reverse order. The
tree is not guaranteed to be a minimum spanning tree. If <i>p[u] =
u</i> then <i>u</i> is either the source vertex or a vertex that is
not reachable from the source. The <tt>PredecessorMap</tt> type
must be a <a
@@ -326,7 +330,9 @@ IN: <tt>distance_inf(D inf)</tt>
<blockquote>
The <tt>inf</tt> object must be the greatest value of any <tt>D</tt> object.
That is, <tt>compare(d, inf) == true</tt> for any <tt>d != inf</tt>.
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>.<br>
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>. Edges
are assumed to have a weight less than (using <tt>distance_compare</tt> for
comparison) this value.<br>
<b>Default:</b> <tt>std::numeric_limits&lt;D&gt;::max()</tt><br>
<b>Python</b>: Unsupported parameter.
@@ -386,7 +392,7 @@ OUT: <tt>visitor(DijkstraVisitor v)</tt>
<H3>Complexity</H3>
<P>
The time complexity is <i>O(V log V)</i>.
The time complexity is <i>O(V log V + E)</i>.
<h3>Visitor Event Points</h3>
+12 -16
View File
@@ -69,7 +69,7 @@ Algorithms</A> for some background to the shortest-path problem.
</P>
<P>
<tt>dijkstra_shortest_paths_no_color_map</tt> differs from the original <tt>dijkstra_shortest_paths</tt> algorithm by not using a color map to identify vertices as discovered or undiscovered. Instead, this is done with the distance map: a vertex <i>u</i> such that <i>distance_compare(distance_map[u], distance_infinity) == false</i> is considered to be undiscovered.
<tt>dijkstra_shortest_paths_no_color_map</tt> differs from the original <tt>dijkstra_shortest_paths</tt> algorithm by not using a color map to identify vertices as discovered or undiscovered. Instead, this is done with the distance map: a vertex <i>u</i> such that <i>distance_compare(distance_map[u], distance_infinity) == false</i> is considered to be undiscovered. Note that this means that edges with infinite weight will not work correctly in this algorithm.
</P>
<P>
@@ -116,10 +116,6 @@ indicated by the labels on the right.
<td valign="top">
<pre>
DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
<b>for</b> each vertex <i>u in V</i> <b>(This loop is not run in dijkstra_shortest_paths_no_color_map_no_init)</b>
<i>d[u] := infinity</i>
<i>p[u] := u</i>
<b>end for</b>
<i>d[s] := 0</i>
INSERT(<i>Q</i>, <i>s</i>)
<b>while</b> (<i>Q != &Oslash;</i>)
@@ -128,11 +124,12 @@ DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
<i>d[v] := w(u,v) + d[u]</i>
<i>p[v] := u</i>
DECREASE-KEY(<i>Q</i>, <i>v</i>)
<b>if</b> (<i>d[v]</i> was originally infinity)
INSERT(<i>Q</i>, <i>v</i>)
<b>else</b>
DECREASE-KEY(<i>Q</i>, <i>v</i>)
<b>else</b>
...
<b>if</b> (<i>d[v]</i> was originally infinity)
INSERT(<i>Q</i>, <i>v</i>)
<b>end for</b>
<b>end while</b>
return (<i>d</i>, <i>p</i>)
@@ -141,10 +138,6 @@ DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
<td valign="top">
<pre>
initialize vertex <i>u</i>
discover vertex <i>s</i>
@@ -154,10 +147,11 @@ examine edge <i>(u,v)</i>
edge <i>(u,v)</i> relaxed
discover vertex <i>v</i>
edge <i>(u,v)</i> not relaxed
discover vertex <i>v</i>
finish vertex <i>u</i>
</pre>
</td>
@@ -214,7 +208,7 @@ IN: <tt>index_map(VertexIndexMap index_map)</tt>
<b>Default:</b> <tt>get(vertex_index, graph)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
</blockquote>
@@ -293,7 +287,9 @@ IN: <tt>distance_inf(D distance_infinity)</tt>
<blockquote>
The <tt>distance_infinity</tt> object must be the greatest value of any <tt>D</tt> object.
That is, <tt>distance_compare(d, distance_infinity) == true</tt> for any <tt>d != distance_infinity</tt>.
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>.<br>
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>. All edges
are assumed to have weight less than (by <tt>distance_compare</tt>) this
value.<br>
<b>Default:</b> <tt>std::numeric_limits&lt;D&gt;::max()</tt><br>
</blockquote>
@@ -322,7 +318,7 @@ OUT: <tt>visitor(DijkstraVisitor v)</tt>
<H3>Complexity</H3>
<P>
The time complexity is <i>O(V log V)</i>.
The time complexity is <i>O(V log V + E)</i>.
<h3>Visitor Event Points</h3>
+96
View File
@@ -0,0 +1,96 @@
<HTML>
<!--
Copyright (c) David Doria 2012
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Directed Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:directed-graph-class"></A>
<pre>
directed_graph&lt;VertexProp, EdgeProp, GraphProp&gt;
</pre>
</H1>
<P>
The <tt>directed_graph</tt> class template is a simplified version
of the BGL adjacency list. This class is provided for ease of use, but
may not perform as well as custom-defined adjacency list classes. Instances
of this template model the BidirectionalGraph, VertexIndexGraph, and
EdgeIndexGraph concepts.
<H3>Example</H3>
A simple examples of creating a directed_graph is available here <a href="../../../libs/graph/example/directed_graph.cpp"><tt>libs/graph/example/directed_graph.cpp</tt></a>.
<P>
<PRE>
typedef boost::directed_graph&lt;&gt; Graph;
Graph g;
boost::graph_traits&lt;Graph&gt;::vertex_descriptor v0 = g.add_vertex();
boost::graph_traits&lt;Graph&gt;::vertex_descriptor v1 = g.add_vertex();
g.add_edge(v0, v1);
</PRE>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>VertexProp</TT></TD>
<TD>A property map for the graph vertices.</TD>
<TD>&nbsp;</TD>
</TR>
<TR>
<TD><TT>EdgeProp</TT></TD>
<TD>A property map for the graph edges.</TD>
<TD>&nbsp;</TD>
</TR>
<TR>
<TD><TT>GraphProp</TT></TD>
<TD>A property map for the graph itself.</TD>
</TR>
</TABLE>
<P>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/directed_graph.hpp"><TT>boost/graph/directed_graph.hpp</TT></a>
<P>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
+1 -1
View File
@@ -153,7 +153,7 @@ A convenient way to create a <tt>distance_recorder</tt>.
<a href="./visitor_concepts.html">Visitor concepts</a>
<p>
The following are other event visitors: <a
href="./distance_recorder.html"><tt>predecessor_recorder</tt></a>,
href="./predecessor_recorder.html"><tt>predecessor_recorder</tt></a>,
<a href="./time_stamper.html"><tt>time_stamper</tt></a>,
and <a href="./property_writer.html"><tt>property_writer</tt></a>.
+98
View File
@@ -0,0 +1,98 @@
<HTML>
<!--
~~ Copyright (c) Maciej Piechotka 2013
~~
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Edge Coloring</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>
<!-- <img src="figs/python.gif" alt="(Python)"/> -->
<TT>edge_coloring</TT>
</H1>
<P>
<DIV ALIGN="LEFT">
<TABLE CELLPADDING=3 border>
<TR><TH ALIGN="LEFT"><B>Graphs:</B></TH>
<TD ALIGN="LEFT">undirected, loop-free</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Properties:</B></TH>
<TD ALIGN="LEFT">color</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT">time: <i>O(|E| |V|)</i> </TD>
</TR>
</TABLE>
</DIV>
<pre>
template &lt;class Graph, class ColorMap&gt;
typename boost::property_traits<ColorMap>::value_type
edge_coloring(const Graph &amp;g, ColorMap color);
</pre>
<p>Computes an edge coloring for the vertices in the graph, using
an algorithm proposed by Misra et al. []. Given edges ordered
e<sub>1</sub>, e<sub>2</sub>, ..., e<sub>n</sub> it assignes a
colors c<sub>1</sub>, c<sub>2</sub>, ..., c<sub>n</sub> in a way
that no vertex connects with 2 edges of the same color. Furthermore
at most m + 1 colors are used.
<!-- King, I.P. An automatic reordering scheme for simultaneous equations derived from network analysis. Int. J. Numer. Methods Engrg. 2 (1970), 523-533 -->
<h3>Where defined</h3>
<a href="../../../boost/graph/edge_coloring.hpp"><tt>boost/graph/edge_coloring.hpp</tt></a>
<h3>Parameters</h3>
IN: <tt>const Graph&amp; g</tt>
<blockquote>
The graph object on which the algorithm will be applied. The type
<tt>Graph</tt> must be a model of <a href="EdgeListGraph.html">
Edge List Graph</a> and <a href="IncidenceGraph.html">Incidence
Graph</a>.
</blockquote>
OUT: <tt>ColorMap color</tt>
<blockquote>
This property map records the colors of each edges. It must be a
model of <A HREF="../../property_map/doc/ReadWritePropertyMap.html">
Read/Write Property Map</A> whose key type is the same as the edge
descriptor type of the graph and whose value type is an integral type
that can store all values smaller or equal to m.
</blockquote>
<h3>Example</h3>
See <A
href="../example/edge_coloring.cpp"><tt>example/king_ordering.cpp</tt></A>.
<h3>See Also</h3>
<A href="./sequential_vertex_coloring.html">sequential vertex ordering</tt></A>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2013</TD><TD>
Maciej Piechotka (<A HREF="mailto:uzytkownik2@gmail.com">uzytkownik2@gmail.com</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
+197
View File
@@ -0,0 +1,197 @@
<HTML>
<!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: edge_predecessor_recorder</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>
<pre>
edge_predecessor_recorder&lt;PredEdgeMap, EventTag&gt;
</pre>
</H1>
This is an <a href="./EventVisitor.html">EventVisitor</a> that records
the predecessor (or parent) edge of a vertex in a property
map. This is particularly useful in graph search algorithms where
recording the predecessors is an efficient way to encode the search
tree that was traversed during the search. The edge predecessor recorder is
typically used with the <tt>on_tree_edge</tt> or
<tt>on_relax_edge</tt> events and cannot be used with vertex events. This
visitor is meant to be used instead of <a
href="predecessor_recorder.html"><tt>predecessor_recorder</tt></a> when a
graph has parallel edges and it is necessary to know which incoming edge a
search algorithm
used to get to a particular vertex.
<p>
<tt>edge_predecessor_recorder</tt> can be used with graph algorithms by
wrapping it with an algorithm-specific adaptor, such as <a
href="./bfs_visitor.html"><tt>bfs_visitor</tt></a> and <a
href="./dfs_visitor.html"><tt>dfs_visitor</tt></a>. Also, this event
visitor can be combined with other event visitors using
<tt>std::pair</tt> to form an EventVisitorList.
<p>
Algorithms such as Dijkstra's and breadth-first search will not assign
a predecessor edge to the source vertex (which is the root of the search
tree). It is often useful to initialize the source vertex's
predecessor to a special value, thereby identifying the root vertex.
When using an algorithm like
depth-first search that creates a forest (multiple search trees) it
is useful to do the same for every vertex. This
way all the root nodes can be distinguished.
<!-- <h3>Example</h3>
See the example for <a href="./bfs_visitor.html"><tt>bfs_visitor</tt></a>.
-->
<h3>Model of</h3>
<a href="./EventVisitor.html">EventVisitor</a>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/visitors.hpp">
<TT>boost/graph/visitors.hpp</TT></a>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>PredEdgeMap</TT></TD>
<TD>
A <a
href="../../property_map/doc/WritablePropertyMap.html">WritablePropertyMap</a>
where the key and value types are the vertex and edge descriptor types, respectively, of the graph.
</TD>
<TD>&nbsp;</TD>
</TR>
<TR><TD><TT>EventTag</TT></TD>
<TD>
The tag to specify when the <tt>edge_predecessor_recorder</tt> should be
applied during the graph algorithm. <tt>EventTag</tt> must be an
edge event.
</TD>
<TD>&nbsp;</TD>
</TR>
</table>
<H2>Associated Types</H2>
<table border>
<tr>
<th>Type</th><th>Description</th>
</tr>
<tr>
<td><tt>edge_predecessor_recorder::event_filter</tt></td>
<td>
This will be the same type as the template parameter <tt>EventTag</tt>.
</td>
</tr>
</table>
<h3>Member Functions</h3>
<p>
<table border>
<tr>
<th>Member</th><th>Description</th>
</tr>
<tr>
<td><tt>
edge_predecessor_recorder(PredEdgeMap pa);
</tt></td>
<td>
Construct an edge predecessor recorder object with predecessor property map
<tt>pa</tt>.
</td>
</tr>
<tr>
<td><tt>
template &lt;class Edge, class Graph&gt;<br>
void operator()(Edge e, const Graph& g);
</tt></td>
<td>
Given edge <i>e = (u,v)</i>, this records <i>e</i> as the
predecessor (or parent) edge of <i>v</i>.
</td>
</tr>
</table>
<h3>Non-Member Functions</h3>
<table border>
<tr>
<th>Function</th><th>Description</th>
</tr>
<tr><td><tt>
template &lt;class PredEdgeMap, class Tag&gt;<br>
edge_predecessor_recorder&lt;PredEdgeMap, Tag&gt; <br>
record_edge_predecessors(PredEdgeMap pa, Tag);
</tt></td><td>
A convenient way to create a <tt>edge_predecessor_recorder</tt>.
</td></tr>
</table>
<h3>See Also</h3>
<a href="./visitor_concepts.html">Visitor concepts</a>
<p>
The following are other event visitors: <a
<a href="./distance_recorder.html"><tt>distance_recorder</tt></a>,
<a href="./time_stamper.html"><tt>time_stamper</tt></a>,
and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
<!-- LocalWords: PredEdgeMap EventTag EventVisitor map bfs dfs const
-->
<!-- LocalWords: EventVisitorList WritablePropertyMap Siek Univ Quan
-->
<!-- LocalWords: Lumsdaine
-->
+1 -1
View File
@@ -195,7 +195,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
+3 -3
View File
@@ -115,7 +115,7 @@ library. OO was hip in the 80s and 90s, but its time we moved beyond!
// initialize the vertex_index property values
graph_traits&lt;graph_t&gt;::vertex_iterator vi, vend;
graph_traits&lt;graph_t&gt;::vertices_size_type cnt = 0;
for(tie(vi,vend) = vertices(G); vi != vend; ++vi)
for(boost::tie(vi,vend) = vertices(G); vi != vend; ++vi)
put(index, *vi, cnt++);
</pre>
</li>
@@ -124,8 +124,8 @@ library. OO was hip in the 80s and 90s, but its time we moved beyond!
not being found, such as:
<pre>
../../../boost/concept_check.hpp:209: no match for
`boost::detail::error_property_not_found & ==
boost::detail::error_property_not_found &'
`boost::detail::error_property_not_found &amp; ==
boost::detail::error_property_not_found &amp;'
</pre>
or a message such as:
<pre>
Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

+2 -2
View File
@@ -211,7 +211,7 @@ main observation for determining the ``time slot'' for a file is that
the time slot must be one more than the maximum time-slot of the files
it depends on.
<P>We start be creating a vector <code>time</code> that will store the
<P>We start by creating a vector <code>time</code> that will store the
time step at which each file can be built. We initialize every value
with time step zero.</p>
@@ -233,7 +233,7 @@ it depends on.
if (in_degree (*i, g) &gt; 0) {
Graph::in_edge_iterator j, j_end;
int maxdist = 0;
for (tie(j, j_end) = in_edges(*i, g); j != j_end; ++j)
for (boost::tie(j, j_end) = in_edges(*i, g); j != j_end; ++j)
maxdist = std::max(time[source(*j, g)], maxdist);
time[*i]=maxdist+1;
}
+1 -1
View File
@@ -257,7 +257,7 @@ The type used for dealing with the number of vertices in the graph.
<hr>
<tt>graph_traits&lt;filtered_graph&gt;::edge_size_type</tt>
<tt>graph_traits&lt;filtered_graph&gt;::edges_size_type</tt>
<br><br>
The type used for dealing with the number of edges in the graph.
+139
View File
@@ -0,0 +1,139 @@
<HTML>
<!--
Copyright (c) Piotr Wygocki 2013
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Find Flow Cost</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:find_flow_cost">
<TT>find_flow_cost</TT>
</H1>
<PRE>
<i>// named parameter version</i>
template &lt;class <a href="./Graph.html">Graph</a>&gt;
typename property_traits&lt;typename property_map &lt; Graph, edge_capacity_t &gt;::type&gt;::value_type
find_flow_cost(const Graph &amp; g,
const bgl_named_params&lt;P, T, R&gt; &amp; params = <i>all defaults</i>)
<i>// non-named parameter version</i>
template&lt;class <a href="./Graph.html">Graph</a>, class Capacity, class ResidualCapacity, class Weight&gt;
typename property_traits&lt;typename property_map &lt; Graph, edge_capacity_t &gt;::type&gt;::value_type
find_flow_cost(const Graph &amp; g, Capacity capacity, ResidualCapacity residual_capacity, Weight weight)
</PRE>
<P>
The <tt>find_flow_cost()</tt> function calculates the minimum cost maximum flow value of a network and given flow. See Section <a
href="./graph_theory_review.html#sec:network-flow-algorithms">Network
Flow Algorithms</a> for a description of maximum flow.
The function calculates the cost from the flow values <i>f(u,v)</i> for <i>(u,v)</i> in
<i>E</i>, which are passed in the form of the residual capacity
<i>r(u,v) = c(u,v) - f(u,v)</i>.
<p>
In order to compute the min cost max flow use :
<a href="./successive_shortest_path_nonnegative_weights.html"><tt>successive_shortest_path_nonnegative_weights()</tt></a> or
<a href="./cycle_canceling.html"><tt>cycle_canceling()</tt></a>.
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/successive_shortest_path_nonnegative_weights.hpp"><TT>boost/graph/successive_shortest_path_nonnegative_weights.hpp</TT></a>
<P>
<h3>Parameters</h3>
IN: <tt>const Graph&amp; g</tt>
<blockquote>
A directed graph. The
graph's type must be a model of <a
href="./VertexListGraph.html">VertexListGraph</a> and <a href="./IncidenceGraph.html">IncidenceGraph</a> For each edge
<i>(u,v)</i> in the graph, the reverse edge <i>(v,u)</i> must also
be in the graph.
</blockquote>
<h3>Named Parameters</h3>
IN: <tt>capacity_map(CapacityEdgeMap cap)</tt>
<blockquote>
The edge capacity property map. The type must be a model of a
constant <a
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a>. The
key type of the map must be the graph's edge descriptor type.<br>
<b>Default:</b> <tt>get(edge_capacity, g)</tt>
</blockquote>
IN: <tt>residual_capacity_map(ResidualCapacityEdgeMap res)</tt>
<blockquote>
This maps edges to their residual capacity. The type must be a model
of a mutable <a
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
Map</a>. The key type of the map must be the graph's edge descriptor
type.<br>
<b>Default:</b> <tt>get(edge_residual_capacity, g)</tt>
</blockquote>
IN: <tt>weight_map(WeightMap w_map)</tt>
<blockquote>
The weight or ``cost'' of each edge in the graph.
The type <tt>WeightMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
the graph needs to be usable as the key type for the weight
map. The value type for this map must be
the same as the value type of the distance map.<br>
<b>Default:</b> <tt>get(edge_weight, g)</tt><br>
</blockquote>
<h3>Complexity</h3>
The complexity is <i> O(|E|)</i>,
<h3>Example</h3>
The function is used in the successive_shortest_path_nonnegative_weights example. The program in <a
href="../example/successive_shortest_path_nonnegative_weights_example.cpp"><tt>example/successive_shortest_path_nonnegative_weights_example.cpp</tt></a>.
<h3>See Also</h3>
<a href="./cycle_canceling.html"><tt>cycle_canceling()</tt></a><br>
<a href="./successive_shortest_path_nonnegative_weights.html"><tt>successive_shortest_path_nonnegative_weights()</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2013</TD><TD>
Piotr Wygocki, University of Warsaw (<A HREF="mailto:wygos@mimuw.edu.pl">wygos at mimuw.edu.pl</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
<!-- LocalWords: HTML Siek Edmonds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
-->
<!-- LocalWords: gif ALT BR sec edmonds karp TT DIV CELLPADDING TR TD PRE lt
-->
<!-- LocalWords: typename VertexListGraph CapacityEdgeMap ReverseEdgeMap gt
-->
<!-- LocalWords: ResidualCapacityEdgeMap VertexIndexMap src rev ColorMap pred
-->
<!-- LocalWords: PredEdgeMap tt href html hpp ul li nbsp br LvaluePropertyMap
-->
<!-- LocalWords: num ColorValue DIMACS cpp pre config iostream dimacs int std
-->
<!-- LocalWords: namespace vecS directedS cout endl iter ei HR valign nowrap
-->
<!-- LocalWords: jeremy siek htm Univ mailto jsiek lsc edu
p -->
+1 -1
View File
@@ -134,7 +134,7 @@ IN: <code>distance_inf(WM inf)</code>
<blockquote>
The value used to initialize the distance for each vertex before
starting the algorithm, and to represent the distance between vertices
for which there is not path. Should be larger than any possible valid
for which there is no path. Should be larger than any possible valid
path length. The argument type must match the value type of the <code>
WeightMap</code>.<br>
+2 -2
View File
@@ -198,7 +198,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
<b>Python:</b> Unsupported parameter.
@@ -216,7 +216,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<H3>Complexity</H3>
<P> The time complexity is <i>O(|V|<sup>2</sup> + |E|)</i> for each
iteration of the algorithm in the worse case. The average case for the
iteration of the algorithm in the worst case. The average case for the
grid variant is <i>O(|V| + |E|)</i>. The number of iterations is
determined by the cooling schedule.
+2 -2
View File
@@ -127,7 +127,7 @@ namespace boost {
const size_type num = num_vertices(G);
typename GraphTraits::vertex_iterator v, vend;
for (tie(v, vend) = vertices(G); v != vend; ++v) {
for (boost::tie(v, vend) = vertices(G); v != vend; ++v) {
put(marker, *v, num);
put(degree, *v, out_degree(*v, G));
degree_buckets.push(*v);
@@ -152,7 +152,7 @@ namespace boost {
put(marker, node, 0); //node has been ordered.
typename GraphTraits::adjacency_iterator v, vend;
for (tie(v,vend) = adjacent_vertices(node, G); v != vend; ++v)
for (boost::tie(v,vend) = adjacent_vertices(node, G); v != vend; ++v)
if ( get(marker, *v) &gt; current_order ) { //*v is unordered vertex
put(marker, *v, current_order); //mark the columns adjacent to node
+6 -6
View File
@@ -396,7 +396,7 @@ disregard the directionality in the function names. The example below
demonstrates using the <TT>out_edges()</TT>, <TT>source()</TT>, and
<TT>target()</TT> with an undirected graph. The source code for this
example and the following one can be found in <a
href="../example/undirected.cpp"><TT>examples/undirected.cpp</TT></a>.
href="../example/undirected_adjacency_list.cpp"><TT>example/undirected_adjacency_list.cpp</TT></a>.
<P>
<PRE>
@@ -408,7 +408,7 @@ href="../example/undirected.cpp"><TT>examples/undirected.cpp</TT></a>.
boost::graph_traits&lt;UndirectedGraph&gt;::out_edge_iterator e, e_end;
boost::graph_traits&lt;UndirectedGraph&gt;::vertex_descriptor
s = vertex(0, undigraph);
for (tie(e, e_end) = out_edges(s, undigraph); e != e_end; ++e)
for (boost::tie(e, e_end) = out_edges(s, undigraph); e != e_end; ++e)
std::cout &lt;&lt; "(" &lt;&lt; source(*e, undigraph)
&lt;&lt; "," &lt;&lt; target(*e, undigraph) &lt;&lt; ")" &lt;&lt; endl;
</PRE>
@@ -447,8 +447,8 @@ of <i>(v,u)</i> since they are the same edge.
add_edge(digraph, v, u, Weight(2.4));
boost::graph_traits&lt;DirectedGraph&gt;::edge_descriptor e1, e2;
bool found;
tie(e1, found) = edge(u, v, digraph);
tie(e2, found) = edge(v, u, digraph);
boost::tie(e1, found) = edge(u, v, digraph);
boost::tie(e2, found) = edge(v, u, digraph);
std::cout &lt;&lt; "in a directed graph is ";
std::cout &lt;&lt; "(u,v) == (v,u) ? " &lt;&lt; (e1 == e2) &lt;&lt; std::endl;
@@ -464,8 +464,8 @@ of <i>(v,u)</i> since they are the same edge.
add_edge(undigraph, u, v, Weight(3.1));
boost::graph_traits&lt;UndirectedGraph&gt;::edge_descriptor e1, e2;
bool found;
tie(e1, found) = edge(u, v, undigraph);
tie(e2, found) = edge(v, u, undigraph);
boost::tie(e1, found) = edge(u, v, undigraph);
boost::tie(e2, found) = edge(v, u, undigraph);
std::cout &lt;&lt; "in an undirected graph is ";
std::cout &lt;&lt; "(u,v) == (v,u) ? " &lt;&lt; (e1 == e2) &lt;&lt; std::endl;
+39
View File
@@ -1,6 +1,7 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Copyright (c) Daniel Trebbien 2010
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
@@ -551,6 +552,9 @@ f(u,v)</i>. The edges with <i>r(u,v) > 0</i> are residual edges
The <b><i>maximum flow problem</i></b> is to determine the maximum
possible value for <i>|f|</i> and the corresponding flow values for
every vertex pair in the graph.
<p>
The <b><i>minimum cost maximum flow problem</i></b> is to determine the maximum flow which minimizes <i> sum<sub>(u,v) in E</sub>
cost(u,v) * f(u,v) </i>.
<p>
A flow network is shown in <a href="#fig:max-flow">Figure
@@ -578,6 +582,41 @@ which is based on the notion of a <b><i>preflow</i></b> introduced by
<a href="./bibliography.html#karzanov74:_deter">Karzanov</a>.
<h2><a name="sec:min-cut-algorithms">Minimum Cut Algorithms</a></h2>
<h3>Undirected Graphs</h3>
<p>Given an undirected graph <i>G</i> = (<i>V</i>, <i>E</i>), a <em>cut</em> of <i>G</i> is a partition of the vertices into two, non-empty sets <i>X</i> and <img src="stoer_wagner_imgs/6e4.gif" alt="\overline{X} = V - X" style="vertical-align: middle; padding-bottom: 2px">. The <i>weight</i> of a cut is defined as the number of edges between sets <i>X</i> and <img src="stoer_wagner_imgs/f79.gif" alt="\overline{X}" style="vertical-align: middle; padding-bottom: 3px"> if <i>G</i> is unweighted, or the sum of the weights of all edges between sets <i>X</i> and <img src="stoer_wagner_imgs/f79.gif" alt="\overline{X}" style="vertical-align: middle; padding-bottom: 3px"> if <i>G</i> is weighted (each edge has an associated, non-negative weight).
<p>When the weight of a cut <img src="stoer_wagner_imgs/8b7.gif" alt="C = \{X, \overline{X}\}" style="vertical-align: middle"> is minimal for a graph <i>G</i> (that is, no other cut of <i>G</i> has a lesser weight), then the cut is known as a <em>minimum cut</em> or a <em>min-cut</em>. For example, given this weighted graph:
<p><a href="stoer_wagner_imgs/stoer_wagner-example.dot"><img src="stoer_wagner_imgs/stoer_wagner-example.gif"></a>
<p>The cut {{0, 6}, {3, 2, 7, 1, 5, 4}} has weight 13:
<p><a href="stoer_wagner_imgs/stoer_wagner-example-c1.dot"><img src="stoer_wagner_imgs/stoer_wagner-example-c1.gif"></a>
<p>And the min-cut is {{0, 1, 4, 5}, {2, 3, 6, 7}} (weight 4):
<p><a href="stoer_wagner_imgs/stoer_wagner-example-min-cut.dot"><img src="stoer_wagner_imgs/stoer_wagner-example-min-cut.gif"></a>
<p>Unlike this example, a graph will sometimes have multiple min-cuts, all of equal weight. A minimum cut algorithm determines one of them as well as the min-cut weight.
<h3>Directed Graphs</h3>
<p>Given a directed graph <i>G</i> = (<i>V</i>, <i>E</i>), a <em>cut</em> of <i>G</i> is a partition of the vertices into two, non-empty sets <i>S</i> and <i>T</i> where <i>S</i> is known as the set of <em>source vertices</em> and <i>T</i> is known as the set of <em>sink vertices</em>. The <em>capacity</em> of a cut <i>C</i> = (<i>S</i>, <i>T</i>) is the number of edges from a vertex in <i>S</i> to a vertex in <i>T</i> if <i>G</i> is unweighted, or the sum of weights of edges from a vertex in <i>S</i> to a vertex in <i>T</i> if <i>G</i> is weighted.
<p>When the capacity of a cut <i>C</i> = (<i>S</i>, <i>T</i>) of a directed graph is minimal (that is, no other cut of <i>G</i> has lesser capacity), then <i>C</i> is known as a <em>minimum cut</em> or <em>min-cut</em>.
<p>For example, given this directed graph:
<p><a href="stoer_wagner_imgs/digraph1.dot"><img src="stoer_wagner_imgs/digraph1.gif"></a>
<p>A min-cut is:
<p><a href="stoer_wagner_imgs/digraph1-min-cut.dot"><img src="stoer_wagner_imgs/digraph1-min-cut.gif"></a>
<p>where <i>S</i> = {0}, <i>T</i> = {1, 2, 3}, and the min-cut capacity is 1.
<br>
<HR>
<TABLE>
+1 -1
View File
@@ -218,7 +218,7 @@ vertices in the graph.
<tr>
<td><tt>
edge_size_type
edges_size_type
</tt></td>
<td>
The unsigned integer type used for representing the number of
+4 -4
View File
@@ -69,7 +69,7 @@
<p>
Defined in
<a href="../../../boost/graph/grid_graph.hpp"><tt>boost/graph/grid_graph.hpp</tt></a>
with all functions in the <tt>boost</tt> namespace. All examples are available in a single program file in <a href="../../../libs/graph/example/grid_graph_example.cpp"><tt>libs/graph/example/grid_graph_example.cpp</tt></a>
with all functions in the <tt>boost</tt> namespace. A simple examples of creating and iterating over a grid_graph is available here <a href="../../../libs/graph/example/grid_graph_example.cpp"><tt>libs/graph/example/grid_graph_example.cpp</tt></a>. An example of adding properties to a grid_graph is also available <a href="../../../libs/graph/example/grid_graph_example.cpp"><tt>libs/graph/example/grid_graph_properties.cpp</tt></a>
</p>
<h4>Template Parameters</h4>
@@ -81,13 +81,13 @@
</pre>
<ul>
<li>
<tt>Dimensions</tt> - Number of dimensions in the graph, <b>must be greater than 2</b>
<tt>Dimensions</tt> - Number of dimensions in the graph
</li>
<li>
<tt>VertexIndex</tt> - Type used for vertex indices, defaults to std::size_t
<tt>VertexIndex</tt> - Type used for vertex indices, defaults to <tt>std::size_t</tt>
</li>
<li>
<tt>EdgeIndex</tt> - Type used for edge indices, defaults to the same type as VertexIndex
<tt>EdgeIndex</tt> - Type used for edge indices, defaults to the same type as <tt>VertexIndex</tt>
</li>
</ul>
+5 -6
View File
@@ -161,7 +161,8 @@ IN: <tt>double learning_constant_final</tt>
IN: <tt>VertexIndexMap vertex_index_map</tt>
<blockquote>
This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>.
num_vertices(g))</tt>. This is only necessary when no
displacement map is provided.
The type <tt>VertexIndexMap</tt> must be a model of <a
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The value type of the map must be an integer type. The
@@ -170,15 +171,13 @@ IN: <tt>VertexIndexMap vertex_index_map</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
IN: <tt>EdgeWeightMap weight</tt>
<blockquote>
This maps each edge to an weight.
num_vertices(g))</tt>. This is only necessary when no
displacement map is provided.
This maps each edge to a weight.
The type <tt>EdgeWeightMap</tt> must be a model of <a
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The value type of the map must be an floating-point type
@@ -221,7 +220,7 @@ Equivalent to the non-named <tt>vertex_index_map</tt> parameter.<br>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
+66
View File
@@ -0,0 +1,66 @@
<!--
Copyright (c) 2013-2015 Louis Dionne
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<p><body bgcolor="#ffffff" link="#0000ee" text="#000000" vlink="#551a8b" alink="#ff0000"></p>
<p><img src="../../../boost.png" alt="C++ Boost" /></p>
<h1 id="hawick_circuits"><code>hawick_circuits</code></h1>
<pre><code>template &lt;typename Graph, typename Visitor, typename VertexIndexMap&gt;
void hawick_circuits(Graph const&amp; graph, Visitor visitor, VertexIndexMap const&amp; vim = get(vertex_index, graph));
template &lt;typename Graph, typename Visitor, typename VertexIndexMap&gt;
void hawick_unique_circuits(Graph const&amp; graph, Visitor visitor, VertexIndexMap const&amp; vim = get(vertex_index, graph));
</code></pre>
<p>Enumerate all the elementary circuits in a directed multigraph. Specifically,
self-loops and redundant circuits caused by parallel edges are enumerated too.
<code>hawick_unique_circuits</code> may be used if redundant circuits caused by parallel
edges are not desired.</p>
<p>The algorithm is described in detail in
<a href="http://complexity.massey.ac.nz/cstn/013/cstn-013.pdf">http://complexity.massey.ac.nz/cstn/013/cstn-013.pdf</a>.</p>
<h3 id="where-defined">Where defined</h3>
<p><a href="../../../boost/graph/hawick_circuits.hpp"><code>#include &lt;boost/graph/hawick_circuits.hpp&gt;</code></a></p>
<h3 id="parameters">Parameters</h3>
<p><strong>IN:</strong> <code>Graph const&amp; graph</code></p>
<blockquote>
<p>The graph on which the algorithm is to be performed. It must be a model of
the <code>VertexListGraph</code> and <code>AdjacencyGraph</code> concepts.</p>
</blockquote>
<p><strong>IN:</strong> <code>Visitor visitor</code></p>
<blockquote>
<p>The visitor that will be notified on each circuit found by the algorithm.
The <code>visitor.cycle(circuit, graph)</code> expression must be valid, with <code>circuit</code>
being a <code>const</code>-reference to a random access sequence of <code>vertex_descriptor</code>s.</p>
<p>For example, if a circuit <code>u -&gt; v -&gt; w -&gt; u</code> exists in the graph, the
visitor will be called with a sequence consisting of <code>(u, v, w)</code>.</p>
</blockquote>
<p><strong>IN:</strong> <code>VertexIndexMap const&amp; vim = get(vertex_index, graph)</code></p>
<blockquote>
<p>A model of the <code>ReadablePropertyMap</code> concept mapping each <code>vertex_descriptor</code>
to an integer in the range <code>[0, num_vertices(graph))</code>. It defaults to using
the vertex index map provided by the <code>graph</code>.</p>
</blockquote>
<hr />
<div class="footer">
&copy; 2013-2015 Louis Dionne
</div>
+1 -1
View File
@@ -57,7 +57,7 @@ is the target. This function is equivalent to the expression
edge_descriptor e;
vertex_descriptor u, v;
...
tie(u, v) = incident(e, g);
boost::tie(u, v) = incident(e, g);
</pre>
+3 -2
View File
@@ -61,8 +61,9 @@ download from here</a>.
<H2>How to Build the BGL</H2>
<p><b>DON'T!</b> The Boost Graph Library is a header-only library and
does not need to be built to be used. The only exception is the <a
href="read_graphviz.html">GraphViz input parser</a>.</p>
does not need to be built to be used. The only exceptions are the <a
href="read_graphviz.html">GraphViz input parser</a> and the <a
href="read_graphml.html">GraphML parser</a>.</p>
<p>When compiling programs that use the BGL, <b>be sure to compile
with optimization</b>. For instance, select &ldquo;Release&rdquo; mode with
+11 -11
View File
@@ -388,31 +388,31 @@ unsigned integers.
@d Concept checking
@{
// Graph requirements
function_requires< VertexListGraphConcept<Graph1> >();
function_requires< EdgeListGraphConcept<Graph1> >();
function_requires< VertexListGraphConcept<Graph2> >();
function_requires< BidirectionalGraphConcept<Graph2> >();
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph1> ));
BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph1> ));
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph2> ));
BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph2> ));
typedef typename graph_traits<Graph1>::vertex_descriptor vertex1_t;
typedef typename graph_traits<Graph2>::vertex_descriptor vertex2_t;
typedef typename graph_traits<Graph1>::vertices_size_type size_type;
// Vertex invariant requirement
function_requires< AdaptableUnaryFunctionConcept<Invariant1,
size_type, vertex1_t> >();
function_requires< AdaptableUnaryFunctionConcept<Invariant2,
size_type, vertex2_t> >();
BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant1,
size_type, vertex1_t> ));
BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant2,
size_type, vertex2_t> ));
// Property map requirements
function_requires< ReadWritePropertyMapConcept<IsoMapping, vertex1_t> >();
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<IsoMapping, vertex1_t> ));
typedef typename property_traits<IsoMapping>::value_type IsoMappingValue;
BOOST_STATIC_ASSERT((is_same<IsoMappingValue, vertex2_t>::value));
function_requires< ReadablePropertyMapConcept<IndexMap1, vertex1_t> >();
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap1, vertex1_t> ));
typedef typename property_traits<IndexMap1>::value_type IndexMap1Value;
BOOST_STATIC_ASSERT((is_convertible<IndexMap1Value, size_type>::value));
function_requires< ReadablePropertyMapConcept<IndexMap2, vertex2_t> >();
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap2, vertex2_t> ));
typedef typename property_traits<IndexMap2>::value_type IndexMap2Value;
BOOST_STATIC_ASSERT((is_convertible<IndexMap2Value, size_type>::value));
@}
+11 -11
View File
@@ -507,31 +507,31 @@ unsigned integers.
@d Concept checking
@{
// Graph requirements
function_requires< VertexListGraphConcept<Graph1> >();
function_requires< EdgeListGraphConcept<Graph1> >();
function_requires< VertexListGraphConcept<Graph2> >();
function_requires< BidirectionalGraphConcept<Graph2> >();
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph1> ));
BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph1> ));
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph2> ));
BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph2> ));
typedef typename graph_traits<Graph1>::vertex_descriptor vertex1_t;
typedef typename graph_traits<Graph2>::vertex_descriptor vertex2_t;
typedef typename graph_traits<Graph1>::vertices_size_type size_type;
// Vertex invariant requirement
function_requires< AdaptableUnaryFunctionConcept<Invariant1,
size_type, vertex1_t> >();
function_requires< AdaptableUnaryFunctionConcept<Invariant2,
size_type, vertex2_t> >();
BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant1,
size_type, vertex1_t> ));
BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant2,
size_type, vertex2_t> ));
// Property map requirements
function_requires< ReadWritePropertyMapConcept<IsoMapping, vertex1_t> >();
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<IsoMapping, vertex1_t> ));
typedef typename property_traits<IsoMapping>::value_type IsoMappingValue;
BOOST_STATIC_ASSERT((is_same<IsoMappingValue, vertex2_t>::value));
function_requires< ReadablePropertyMapConcept<IndexMap1, vertex1_t> >();
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap1, vertex1_t> ));
typedef typename property_traits<IndexMap1>::value_type IndexMap1Value;
BOOST_STATIC_ASSERT((is_convertible<IndexMap1Value, size_type>::value));
function_requires< ReadablePropertyMapConcept<IndexMap2, vertex2_t> >();
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap2, vertex2_t> ));
typedef typename property_traits<IndexMap2>::value_type IndexMap2Value;
BOOST_STATIC_ASSERT((is_convertible<IndexMap2Value, size_type>::value));
@}
+8 -8
View File
@@ -174,7 +174,7 @@ need to consider those vertices that have the same vertex invariant
number. The number of vertices in a graph with the same vertex
invariant number $i$ is called the \emph{invariant multiplicity} for
$i$. In this implementation, by default we use the out-degree of the
vertex as the vertex invariant, though the user can also supply there
vertex as the vertex invariant, though the user can also supply their
own invariant function. The ability of the invariant function to prune
the search space varies widely with the type of graph.
@@ -301,21 +301,21 @@ unsigned integers.
@d Concept checking
@{
// Graph requirements
function_requires< VertexListGraphConcept<Graph1> >();
function_requires< EdgeListGraphConcept<Graph1> >();
function_requires< VertexListGraphConcept<Graph2> >();
function_requires< BidirectionalGraphConcept<Graph2> >();
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph1> ));
BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph1> ));
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph2> ));
BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph2> ));
// Property map requirements
function_requires< ReadWritePropertyMapConcept<IndexMapping, vertex1_t> >();
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<IndexMapping, vertex1_t> ));
typedef typename property_traits<IndexMapping>::value_type IndexMappingValue;
BOOST_STATIC_ASSERT((is_same<IndexMappingValue, vertex2_t>::value));
function_requires< ReadablePropertyMapConcept<IndexMap1, vertex1_t> >();
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap1, vertex1_t> ));
typedef typename property_traits<IndexMap1>::value_type IndexMap1Value;
BOOST_STATIC_ASSERT((is_convertible<IndexMap1Value, size_type>::value));
function_requires< ReadablePropertyMapConcept<IndexMap2, vertex2_t> >();
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap2, vertex2_t> ));
typedef typename property_traits<IndexMap2>::value_type IndexMap2Value;
BOOST_STATIC_ASSERT((is_convertible<IndexMap2Value, size_type>::value));
@}
+19 -26
View File
@@ -59,7 +59,7 @@ The current implementation is based on descriptions of a backtracking
algorithm in [<a
href="./bibliography.html#fortin96:_graph_iso_prob">46</a>,<a
href="./bibliography.html#reingold77:_combin_algo">48</a>]. The file
<a href="./isomorphism-impl.pdf">isomorphism-impl.pdf</a> contains a
<a href="./isomorphism-impl.pdf">isomorphism-impl.pdf</a> contains a (somewhat out-of-date)
&quot;literate&quot; description of the implementation. The algorithm
used is simple but slow. A more efficient (and much more complex)
algorithm is described in [<a
@@ -101,31 +101,24 @@ descriptor type and the vertex index map for graph 1.<br>
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the first graph.
</blockquote>
IN: <tt>vertex_invariant1(VertexInvariant1 i)</tt>
IN: <tt>vertex_invariant1(VertexInvariant1 i1)</tt>
IN: <tt>vertex_invariant2(VertexInvariant2 i2)</tt>
<blockquote>
A mapping <i>i</i> from vertices to integers such that if there is
some isomorphism that maps <i>v</i> onto <i>v'</i> then <i>i(v) ==
i(v')</i>. The <tt>VertexInvariant</tt> type must be a <a
href="http://www.sgi.com/tech/stl/BinaryFunction.html">BinaryFunction</a>
where the first argument is a vertex descriptor, the second argument is a
graph, and the result type is an integer. The vertex invariant must
work with the types for graph 1.
Mappings from vertices to integers which restrict which vertices may be
considered isomorphic. If a candidate isomorphism maps <i>v1</i> to <i>v2</i>
but <i>i1</i>(<i>v1</i>) != <i>i2</i>(<i>v2</i>), that candidate is rejected.
This mapping can be used either to speed up the search (as is done by the
default value, which requires that the degrees of <i>v1</i> and <i>v2</i> are
equal) or to impose extra conditions on the result. The
<tt>VertexInvariant1</tt> and <tt>VertexInvariant2</tt> types must model <a
href="http://www.sgi.com/tech/stl/UnaryFunction.html">UnaryFunction</a>, with
the argument type of <tt>vertex_invariant1</tt> being <tt>Graph1</tt>'s vertex
descriptor type, the argument type of <tt>vertex_invariant2</tt> being
<tt>Graph2</tt>'s vertex descriptor type, and both functions having integral
result types. The values returned by these two functions must be in the range
[0, <tt>vertex_max_invariant</tt>).
<br>
<b>Default:</b> <tt>degree_vertex_invariant</tt><br>
<b>Python</b>: Unsupported parameter.
</blockquote>
IN: <tt>vertex_invariant2(VertexInvariant2 i)</tt>
<blockquote>
A mapping <i>i</i> from vertices to integers such that if there is
some isomorphism that maps <i>v</i> onto <i>v'</i> then <i>i(v) ==
i(v')</i>. The <tt>VertexInvariant</tt> type must be a <a
href="http://www.sgi.com/tech/stl/BinaryFunction.html">BinaryFunction</a>
where the first argument is a vertex descriptor, the second argument is a
graph, and the result type is an integer. The vertex invariant must
work with the types for both graph 2.
<br>
<b>Default:</b> <tt>degree_vertex_invariant</tt><br>
<b>Default:</b> <tt>degree_vertex_invariant</tt> for both arguments<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
@@ -154,7 +147,7 @@ map.<br>
<b>Default:</b> <tt>get(vertex_index, g1)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
<b>Python</b>: Unsupported parameter.
@@ -173,7 +166,7 @@ map.<br>
<b>Default:</b> <tt>get(vertex_index, g2)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
<b>Python</b>: Unsupported parameter.
+15 -16
View File
@@ -15,7 +15,7 @@
<BR Clear>
<H1><A NAME="sec:johnson">
<H1><A NAME="sec:johnson"></A>
<TT>johnson_all_pairs_shortest_paths</TT>
</H1>
@@ -75,10 +75,12 @@ and <a href="IncidenceGraph.html">Incidence Graph</a>.
OUT: <tt>DistanceMatrix&amp; D</tt>
<blockquote>
The length of the shortest path between each pair of vertices
<i>u,v</i> in the graph is stored in <tt>D[u][v]</tt>. The set of
types {<tt>DistanceMatrix, vertices_size_type, D</tt>} must be a model
<i>u,v</i> in the graph is stored in <tt>D[u][v]</tt>. The tuple of
types (<tt>DistanceMatrix, vertices_size_type, D</tt>) must be a model
of <a href="BasicMatrix.html">BasicMatrix</a> where <tt>D</tt> is the
value type of the <tt>DistanceMap</tt>.
value type of the <tt>DistanceMap</tt>. There must be implicit conversions
between the value type of the distance matrix and the value type of the weight
map.
</blockquote>
@@ -86,12 +88,11 @@ value type of the <tt>DistanceMap</tt>.
IN: <tt>weight_map(WeightMap w_map)</tt>
<blockquote>
The weight or ``length'' of each edge in the graph.
The weight or "length" of each edge in the graph.
The type <tt>WeightMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
the graph needs to be usable as the key type for the weight
map. The value type for the map must be
<i>Addable</i> with the value type of the distance map.<br>
map. The value type of the weight map must support a subtraction operation.<br>
<b>Default:</b> <tt>get(edge_weight, g)</tt>
</blockquote>
@@ -112,7 +113,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
</blockquote>
@@ -128,7 +129,8 @@ IN: <tt>distance_compare(CompareFunction cmp)</tt>
This function is use to compare distances to determine
which vertex is closer to the source vertex.
The <tt>CompareFunction</tt> type must be a model of
\stlconcept{BinaryPredicate} and have argument types that
<a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">Binary Predicate</a>
and have argument types that
match the value type of the <tt>WeightMap</tt> property map.<br>
<b>Default:</b> <tt>std::less&lt;DT&gt;</tt> with
<tt>DT=typename&nbsp;property_traits&lt;WeightMap&gt;::value_type</tt>
@@ -139,11 +141,8 @@ IN: <tt>distance_combine(CombineFunction cmb)</tt>
This function is used to combine distances to compute the distance
of a path. The <tt>CombineFunction</tt> type must be a model of <a
href="http://www.sgi.com/tech/stl/BinaryFunction.html">Binary
Function</a>. The first argument type of the binary function must
match the value type of the <tt>DistanceMap</tt> property map and
the second argument type must match the value type of the
<tt>WeightMap</tt> property map. The result type must be the same
type as the distance value type.<br>
Function</a>. Both argument types and the return type of the binary function
must match the value type of the <tt>WeightMap</tt> property map. This operation is required to act as the sum operation for the weight type; in particular, it must be the inverse of the binary <tt>-</tt> operator on that type.<br>
<b>Default:</b> <tt>std::plus&lt;DT&gt;</tt> with
<tt>DT=typename&nbsp;property_traits&lt;WeightMap&gt;::value_type</tt>
</blockquote>
@@ -152,7 +151,7 @@ IN: <tt>distance_inf(DT inf)</tt>
<blockquote>
This value is used to initialize the distance for each
vertex before the start of the algorithm.
The type <tt>DT</tt> must be the value type of the <tt>WeigthMap</tt>.<br>
The type <tt>DT</tt> must be the value type of the <tt>WeightMap</tt>.<br>
<b>Default:</b> <tt>std::numeric_limits::max()</tt>
</blockquote>
@@ -160,7 +159,7 @@ IN: <tt>distance_zero(DT zero)</tt>
<blockquote>
This value is used to initialize the distance for the source
vertex before the start of the algorithm. The type <tt>DT</tt>
must be the value type of the <tt>WeigthMap</tt>.<br>
must be the value type of the <tt>WeightMap</tt>.<br>
<b>Default:</b> <tt>0</tt>
</blockquote>
+1 -1
View File
@@ -246,7 +246,7 @@ As a mapping from vertices to index values between 0 and
<b>Default</b>:<tt class="computeroutput">get(vertex_index,g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
<b>Python</b>: Unsupported parameter.
+3 -3
View File
@@ -156,7 +156,7 @@ descriptor from the map's <TT>pos</TT> iterator.
tokenizer&lt;&gt;::iterator i = line_toks.begin();
std::string actors_name = *i++;
tie(pos, inserted) = actors.insert(std::make_pair(actors_name, Vertex()));
boost::tie(pos, inserted) = actors.insert(std::make_pair(actors_name, Vertex()));
if (inserted) {
u = add_vertex(g);
actor_name[u] = actors_name;
@@ -174,7 +174,7 @@ actor into the graph.
<PRE>
std::string movie_name = *i++;
tie(pos, inserted) = actors.insert(std::make_pair(*i, Vertex()));
boost::tie(pos, inserted) = actors.insert(std::make_pair(*i, Vertex()));
if (inserted) {
v = add_vertex(g);
actor_name[v] = *i;
@@ -190,7 +190,7 @@ the name of the connecting movie.
<P>
<PRE>
graph_traits&lt;Graph&gt;::edge_descriptor e;
tie(e, inserted) = add_edge(u, v, g);
boost::tie(e, inserted) = add_edge(u, v, g);
if (inserted)
connecting_movie[e] = movie_name;
</PRE>
-407
View File
@@ -1,407 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-15">
<TITLE>Boost Graph Library: Boykov-Kolmogorov Maximum Flow</TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0 (Linux)">
<META NAME="CREATED" CONTENT="20060820;17315200">
<META NAME="CHANGEDBY" CONTENT="Stephan Diederich">
<META NAME="CHANGED" CONTENT="20060820;23125100">
<!--
// Copyright (c) 2006, Stephan Diederich
//
// This documentation may be used under either of the following two licences:
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE. OF SUCH DAMAGE.
//
// Or:
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-->
<STYLE>
<!--
TD P { color: #000000 }
H1 { color: #000000 }
P { color: #000000 }
PRE { color: #000000 }
H3 { color: #000000 }
BLOCKQUOTE { color: #000000 }
A:link { color: #0000ee }
A:visited { color: #551a8b }
-->
</STYLE>
</HEAD>
<BODY LANG="de-DE" TEXT="#000000" LINK="#0000ee" VLINK="#551a8b" BGCOLOR="#ffffff" DIR="LTR">
<P>
<IMG SRC="../../../boost.png" NAME="Grafik1" ALT="C++ Boost" ALIGN=BOTTOM WIDTH=277 HEIGHT=86 BORDER=0>
</P>
<table align="center" width="75%" style="border:1px solid; border-spacing: 10pt">
<tr>
<td style="vertical-align: top"><img src="figs/warning.png"></td>
<td>
<b>Warning!</b> This header and its contents are <em>deprecated</em> and
will be removed in a future release. Please update your program to use
<a href="boykov_kolmogorov_max_flow.html"> <tt>boykov_kolmogorov_max_flow</tt></a>
instead. Note that only the name of the algorithm has changed. The template
and function parameters will remain the same.
</td>
</tr>
</table>
<H1><A NAME="sec:kolmogorov_max_flow"></A><TT>kolmogorov_max_flow</TT>
</H1>
<PRE><I>// named parameter version</I>
template &lt;class Graph, class P, class T, class R&gt;
typename property_traits&lt;typename property_map&lt;Graph, edge_capacity_t&gt;::const_type&gt;::value_type
kolmogorov_max_flow(Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor src,
typename graph_traits&lt;Graph&gt;::vertex_descriptor sink,
const bgl_named_params&lt;P, T, R&gt;&amp; params = <I>all defaults</I>)
<I>// non-named parameter version</I>
template &lt;class Graph, class CapacityEdgeMap, class ResidualCapacityEdgeMap, class ReverseEdgeMap,
class PredecessorMap, class ColorMap, class DistanceMap, class IndexMap&gt;
typename property_traits&lt;CapacityEdgeMap&gt;::value_type
kolmogorov_max_flow(Graph&amp; g,
CapacityEdgeMap cap,
ResidualCapacityEdgeMap res_cap,
ReverseEdgeMap rev_map,
PredecessorMap pre_map,
ColorMap color,
DistanceMap dist,
IndexMap idx,
typename graph_traits &lt;Graph&gt;::vertex_descriptor src,
typename graph_traits &lt;Graph &gt;::vertex_descriptor sink)</PRE><P>
<FONT SIZE=3>Additional overloaded versions for non-named parameters
are provided (without DistanceMap/ColorMap/DistanceMap; for those
iterator_property_maps with the provided index map are used)</FONT></P>
<P>The <TT>kolmogorov_max_flow()</TT> function calculates the maximum
flow of a network. See Section <A HREF="graph_theory_review.html#sec:network-flow-algorithms">Network
Flow Algorithms</A> for a description of maximum flow. The calculated
maximum flow will be the return value of the function. The function
also calculates the flow values <I>f(u,v)</I> for all <I>(u,v)</I> in
<I>E</I>, which are returned in the form of the residual capacity
<I>r(u,v) = c(u,v) - f(u,v)</I>.
</P>
<P><B>Requirements:</B><BR>The directed graph <I>G=(V,E)</I> that
represents the network must include a reverse edge for every edge in
<I>E</I>. That is, the input graph should be <I>G<SUB>in</SUB> =
(V,{E U E<SUP>T</SUP>})</I>. The <TT>ReverseEdgeMap</TT> argument <TT>rev</TT>
must map each edge in the original graph to its reverse edge, that is
<I>(u,v) -&gt; (v,u)</I> for all <I>(u,v)</I> in <I>E</I>.
</P>
<P>Remarks: While the push-relabel method states that each edge in <I>E<SUP>T</SUP></I>
has to have capacity of 0, the reverse edges for this algorithm ARE
allowed to carry capacities. If there are already reverse edges in
the input Graph <I><FONT FACE="Courier New, monospace">G</FONT></I>,
those can be used. This can halve the amount of edges and will
noticeably increase the performance.<BR><BR><B>Algorithm
description:</B><BR>Kolmogorov's algorithm is a variety of the
augmenting-path algorithm. Standard augmenting path algorithms find
shortest paths from source to sink vertex and augment them by
substracting the bottleneck capacity found on that path from the
residual capacities of each edge and adding it to the total flow.
Additionally the minimum capacity is added to the residual capacity
of the reverse edges. If no more paths in the residual-edge tree are
found, the algorithm terminates. Instead of finding a new shortest
path from source to sink in the graph in each iteration, Kolmogorov's
version keeps the already found paths as follows:</P>
<P>The algorithm builds up two search trees, a source-tree and a
sink-tree. Each vertex has a label (stored in <I>ColorMap</I>) to
which tree it belongs and a status-flag if this vertex is active or
passive. In the beginning of the algorithm only the source and the
sink are colored (source==black, sink==white) and have active status.
All other vertices are colored gray. The algorithm consists of three
phases:</P>
<P><I>grow-phase</I>: In this phase active vertices are allowed to
acquire neighbor vertices that are connected through an edge that has
a capacity-value greater than zero. Acquiring means that those vertices
become active and belong now to the search tree of the current
active vertex. If there are no more valid connections to neighbor
vertices, the current vertex becomes passive and the grow phase
continues with the next active vertex. The grow phase terminates if
there are no more active vertices left or a vertex discovers a vertex
from the other search tree through an unsaturated edge. In this case
a path from source to sink is found.</P>
<P><I>augment-phase</I>: This phase augments the path that was found
in the grow phase. First it finds the bottleneck capacity of the
found path, and then it updates the residual-capacity of the edges
from this path by substracting the bottleneck capacity from the
residual capacity. Furthermore the residual capacity of the reverse
edges are updated by adding the bottleneck capacity. This phase can
destroy the built up search trees, as it creates at least one
saturated edge. That means, that the search trees collapse to
forests, because a condition for the search trees is, that each
vertex in them has a valid (=non-saturated) connection to a terminal.</P>
<P><I>adoption-phase</I>: Here the search trees are reconstructed. A
simple solution would be to mark all vertices coming after the first
orphan in the found path free vertices (gray). A more sophisticated
solution is to give those orphans new parents: The neighbor vertices
are checked if they have a valid connection to the same terminal like
this vertex had (a path with unsaturated edges). If there is one,
this vertex becomes the new parent of the current orphan and this
forest is re-included into the search tree. If no new valid parent is
found, this vertex becomes a free vertex (marked gray), and it's
children become orphans. The adoption phase terminates if there are
no more orphans.</P>
<P><IMG SRC="figs/kolmogorov_max_flow.gif" NAME="Grafik2" ALIGN=LEFT WIDTH=827 HEIGHT=311 BORDER=0><BR CLEAR=LEFT><B>Details:</B></P>
<UL>
<LI><P>Marking heuristics: A timestamp is stored for each vertex
which shows in which iteration of the algorithm the distance to the
corresponding terminal was calculated.
</P>
<UL>
<LI><P>This distance is used and gets calculated in the
adoption-phase. In order to find a valid new parent for an orphan,
the possible parent is checked for a connection to the terminal to
which tree it belongs. If there is such a connection, the path is
tagged with the current time-stamp, and the distance value. If
another orphan has to find a parent and it comes across a vertex
with a current timestamp, this information is used.</P>
<LI><P>The distance is also used in the grow-phase. If a vertex
comes across another vertex of the same tree while searching for
new vertices, the other's distance is compared to its distance. If
it is smaller, that other vertex becomes the new parent of the
current. This can decrease the length of the search paths, and so
amount of adoptions.</P>
</UL>
<LI><P>Ordering of orphans: As described above, the augment-phase
and the adoption phase can create orphans. The orphans the
augment-phase generates, are ordered according to their distance to
the terminals (smallest first). This combined with the
distance/timestamp heuristics results in the possibility for not
having to recheck terminal-connections too often. New orphans which
are generated in adoption phase are processed before orphans from
the main queue for the same reason.</P>
</UL>
<P><BR><B>Implementation notes:</B></P>
<P>The algorithm is mainly implemented as described in the PhD thesis
of Kolmogorov. Few changes were made for increasing performance:</P>
<UL>
<LI><P>initialization: the algorithm first augments all paths from
source-&gt;sink and all paths from source-&gt;VERTEX-&gt;sink. This
improves especially graph-cuts used in image vision where nearly
each vertex has a source and sink connect. During this step, all
vertices that have an unsaturated connection from source are added
to the active vertex list and so the source is not.
</P>
<LI><P>active vertices: Kolmogorov uses two lists for active nodes
and states that new active vertices are added to the rear of the
second. Fetching an active vertex is done from the beginning of the
first list. If the first list is empty, it is exchanged by the
second. This implementation uses just one list.</P>
<LI><P>grow-phase: In the grow phase the first vertex in the
active-list is taken and all outgoing edges are checked if they are
unsaturated. This decreases performance for graphs with high-edge
density. This implementation stores the last accessed edge and
continues with it, if the first vertex in the active-list is the
same one as during the last grow-phase.</P>
</UL>
<P>This algorithm [<A HREF="bibliography.html#kolmogorov03">68</a>, <a href="bibliography.html#boykov-kolmogorov04">69</a>] was developed by Boykov and Kolmogorov.
</P>
<H3>Where Defined</H3>
<P><TT><A HREF="../../../boost/graph/kolmogorov_max_flow.hpp">boost/graph/kolmogorov_max_flow.hpp</A></TT>
</P>
<H3>Parameters</H3>
<P>IN: <TT>Graph&amp; g</TT>
</P>
<BLOCKQUOTE>A directed graph. The graph's type must be a model of
<A HREF="VertexListGraph.html">Vertex List Graph</A>, <A HREF="EdgeListGraph.html">Edge
List Graph</A> and <A HREF="IncidenceGraph.html">Incidence Graph</A>.
For each edge <I>(u,v)</I> in the graph, the reverse edge <I>(v,u)</I>
must also be in the graph. Performance of the algorithm will be slightly
improved if the graph type also models <a href="AdjacencyMatrix.html">Adjacency
Matrix</a>.
</BLOCKQUOTE>
<P>IN: <TT>vertex_descriptor src</TT>
</P>
<BLOCKQUOTE>The source vertex for the flow network graph.
</BLOCKQUOTE>
<P>IN: <TT>vertex_descriptor sink</TT>
</P>
<BLOCKQUOTE>The sink vertex for the flow network graph.
</BLOCKQUOTE>
<H3>Named Parameters</H3>
<P>IN: <TT>edge_capacity(EdgeCapacityMap cap)</TT>
</P>
<BLOCKQUOTE>The edge capacity property map. The type must be a model
of a constant <A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</A>. The key type of the map must be the graph's edge
descriptor type.<BR><B>Default:</B> <TT>get(edge_capacity, g)</TT>
</BLOCKQUOTE>
<P>OUT: <TT>edge_residual_capacity(ResidualCapacityEdgeMap res)</TT>
</P>
<BLOCKQUOTE>The edge residual capacity property map. The type must be
a model of a mutable <A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</A>. The key type of the map must be the graph's edge
descriptor type.<BR><B>Default:</B> <TT>get(edge_residual_capacity,
g)</TT>
</BLOCKQUOTE>
<P>IN: <TT>edge_reverse(ReverseEdgeMap rev)</TT>
</P>
<BLOCKQUOTE>An edge property map that maps every edge <I>(u,v)</I> in
the graph to the reverse edge <I>(v,u)</I>. The map must be a model
of constant <A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</A>. The key type of the map must be the graph's edge
descriptor type.<BR><B>Default:</B> <TT>get(edge_reverse, g)</TT>
</BLOCKQUOTE>
<P>UTIL: <TT>vertex_predecessor(PredecessorMap pre_map)</TT>
</P>
<BLOCKQUOTE>A vertex property map that stores the edge to the vertex'
predecessor. The map must be a model of mutable <A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</A>. The key type of the map must be the graph's vertex
descriptor type.<BR><B>Default:</B> <TT>get(vertex_predecessor, g)</TT>
</BLOCKQUOTE>
<P>OUT/UTIL: <TT>vertex_color(ColorMap color)</TT>
</P>
<BLOCKQUOTE>A vertex property map that stores a color for edge
vertex. If the color of a vertex after running the algorithm is black
the vertex belongs to the source tree else it belongs to the
sink-tree (used for minimum cuts). The map must be a model of mutable
<A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
Map</A>. The key type of the map must be the graph's vertex
descriptor type.<BR><B>Default:</B> <TT>get(vertex_color, g)</TT>
</BLOCKQUOTE>
<P>UTIL: <TT>vertex_distance(DistanceMap dist)</TT>
</P>
<BLOCKQUOTE>A vertex property map that stores the distance to the
corresponding terminal. It's a utility-map for speeding up the
algorithm. The map must be a model of mutable <A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</A>. The key type of the map must be the graph's vertex
descriptor type.<BR><B>Default:</B> <TT>get(vertex_distance, g)</TT>
</BLOCKQUOTE>
<P>IN: <TT>vertex_index(VertexIndexMap index_map)</TT>
</P>
<BLOCKQUOTE>Maps each vertex of the graph to a unique integer in the
range <TT>[0, num_vertices(g))</TT>. The map must be a model of
constant <A HREF="../../property_map/doc/LvaluePropertyMap.html">LvaluePropertyMap</A>.
The key type of the map must be the graph's vertex descriptor
type.<BR><B>Default:</B> <TT>get(vertex_index, g)</TT>
</BLOCKQUOTE>
<H3>Example</H3>
<P>This reads an example maximum flow problem (a graph with edge
capacities) from a file in the DIMACS format (<TT><A HREF="../example/max_flow.dat">example/max_flow.dat</A></TT>).
The source for this example can be found in
<TT><A HREF="../example/boykov_kolmogorov-eg.cpp">example/boykov_kolmogorov-eg.cpp</A></TT>.
</P>
<PRE>#include &lt;boost/config.hpp&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;boost/graph/kolmogorov_max_flow.hpp&gt;
#include &lt;boost/graph/adjacency_list.hpp&gt;
#include &lt;boost/graph/read_dimacs.hpp&gt;
#include &lt;boost/graph/graph_utility.hpp&gt;
int
main()
{
using namespace boost;
typedef adjacency_list_traits &lt; vecS, vecS, directedS &gt; Traits;
typedef adjacency_list &lt; vecS, vecS, directedS,
property &lt; vertex_name_t, std::string,
property &lt; vertex_index_t, long,
property &lt; vertex_color_t, boost::default_color_type,
property &lt; vertex_distance_t, long,
property &lt; vertex_predecessor_t, Traits::edge_descriptor &gt; &gt; &gt; &gt; &gt;,
property &lt; edge_capacity_t, long,
property &lt; edge_residual_capacity_t, long,
property &lt; edge_reverse_t, Traits::edge_descriptor &gt; &gt; &gt; &gt; Graph;
Graph g;
property_map &lt; Graph, edge_capacity_t &gt;::type
capacity = get(edge_capacity, g);
property_map &lt; Graph, edge_residual_capacity_t &gt;::type
residual_capacity = get(edge_residual_capacity, g);
property_map &lt; Graph, edge_reverse_t &gt;::type rev = get(edge_reverse, g);
Traits::vertex_descriptor s, t;
read_dimacs_max_flow(g, capacity, rev, s, t);
std::vector&lt;default_color_type&gt; color(num_vertices(g));
std::vector&lt;long&gt; distance(num_vertices(g));
long flow = kolmogorov_max_flow(g ,s, t);
std::cout &lt;&lt; "c The total flow:" &lt;&lt; std::endl;
std::cout &lt;&lt; "s " &lt;&lt; flow &lt;&lt; std::endl &lt;&lt; std::endl;
std::cout &lt;&lt; "c flow values:" &lt;&lt; std::endl;
graph_traits &lt; Graph &gt;::vertex_iterator u_iter, u_end;
graph_traits &lt; Graph &gt;::out_edge_iterator ei, e_end;
for (tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
for (tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
if (capacity[*ei] &gt; 0)
std::cout &lt;&lt; "f " &lt;&lt; *u_iter &lt;&lt; " " &lt;&lt; target(*ei, g) &lt;&lt; " "
&lt;&lt; (capacity[*ei] - residual_capacity[*ei]) &lt;&lt; std::endl;
return EXIT_SUCCESS;
}</PRE><P>
The output is:
</P>
<PRE>c The total flow:
s 13
c flow values:
f 0 6 3
f 0 1 0
f 0 2 10
f 1 5 1
f 1 0 0
f 1 3 0
f 2 4 4
f 2 3 6
f 2 0 0
f 3 7 5
f 3 2 0
f 3 1 1
f 4 5 4
f 4 6 0
f 5 4 0
f 5 7 5
f 6 7 3
f 6 4 0
f 7 6 0
f 7 5 0</PRE><H3>
See Also</H3>
<P STYLE="margin-bottom: 0cm"><TT><A HREF="edmonds_karp_max_flow.html">edmonds_karp_max_flow()</A></TT>,<BR><TT><A HREF="push_relabel_max_flow.html">push_relabel_max_flow()</A></TT>.
</P>
<HR>
<TABLE CELLPADDING=2 CELLSPACING=2>
<TR VALIGN=TOP>
<TD>
<P>Copyright &copy; 2006</P>
</TD>
<TD>
<P>Stephan Diederich, University
Mannheim(<A HREF="mailto:diederich@ti.uni-manheim.de">diederich@ti.uni-manheim.de</A>)</P>
</TD>
</TR>
</TABLE>
<P><BR><BR>
</P>
</BODY>
</HTML>
+1 -1
View File
@@ -166,7 +166,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
+3 -3
View File
@@ -236,9 +236,9 @@ href="../test/graph.cpp"><TT>test/graph.cpp</TT></a>.
main(int,char*[])
{
typedef GRAPH&lt;int,int&gt; Graph;
function_requires&lt; VertexListGraphConcept&lt;Graph&gt; &gt;();
function_requires&lt; BidirectionalGraphConcept&lt;Graph&gt; &gt;();
function_requires&lt; MutableGraphConcept&lt;Graph&gt; &gt;();
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept&lt;Graph&gt; ));
BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept&lt;Graph&gt; ));
BOOST_CONCEPT_ASSERT(( MutableGraphConcept&lt;Graph&gt; ));
return 0;
}
</PRE>
+284
View File
@@ -0,0 +1,284 @@
<html>
<!--
Copyright (c) Fernando Vilas 2013
Some content from the Stoer-Wagner Min Cut documentation,
Copyright (c) Daniel Trebbien 2010
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<head>
<title>Boost Graph Library: Maximum Adjacency Search</Title>
<body>
<img src="../../../boost.png" alt="C++ Boost" width="277" height="86">
<h1><a name="sec:maximum-adjacency-search"></a>
<tt>maximum_adjacency_search</tt>
</h1>
<p>
<pre>
<em>// named parameter versions</em>
template &lt;class Graph, class class P, class T, class R&gt;
void
maximum_adjacency_search(const Graph&amp; g,
const bgl_named_params&lt;P, T, R&gt;&amp; params);
<i>// non-named parameter versions</i>
template &lt;class Graph, class WeightMap, class MASVisitor&gt;
void
maximum_adjacency_search(const Graph&amp; g, WeightMap weights, MASVisitor vis,
const typename graph_traits&lt;Graph&gt;::vertex_descriptor start);
</pre>
<p>
The <tt>maximum_adjacency_search()</tt> function performs a traversal
of the vertices in an undirected graph. The next vertex visited is the
vertex that has the most visited neighbors at any time. In the case of
an unweighted, undirected graph, the number of visited neighbors of the
very last vertex visited in the graph is also the number of edge-disjoint
paths between that vertex and the next-to-last vertex visited. These can be
retrieved from a visitor, an example of which is in the test harness
mas_test.cpp.
</p>
<p>
The <tt>maximum_adjacency_search()</tt> function invokes user-defined
actions at certain event-points within the algorithm. This provides a
mechanism for adapting the generic MAS algorithm to the many situations
in which it can be used. In the pseudo-code below, the event points
for MAS are the labels on the right. The user-defined actions must be
provided in the form of a visitor object, that is, an object whose type
meets the requirements for a MAS Visitor.
</p>
<table>
<tr>
<td valign="top">
<pre>
MAS(<i>G</i>)
<b>for</b> each vertex <i>u in V</i>
<i>reach_count[u] := 0</i>
<b>end for</b>
// for the starting vertex s
<i>reach_count[s] := 1</i>
<b>for</b> each unvisited vertex <i>u in V</i>
<b>call</b> MAS-VISIT(<i>G</i>, <i>u</i>)
remove u from the list on unvisited vertices
<b>for</b> each out edge from <i>u</i> to <i>t</i>
<b>if</b> <i>t</i> has not yet been visited
increment <i>reach_count[t]</i>
<b>end if</b>
<b>end for</b> each out edge
<b>call</b> MAS-VISIT(<i>G</i>, <i>u</i>)
<b>end for</b> each unvisited vertex
<pre>
</td>
<td valign="top">
<pre>
-
-
initialize vertex <i>u</i>
-
-
-
-
examine vertex <i>u</i>
-
examine edge <i>(u,t)</i>
-
-
-
-
finish vertex <i>u</i>
-
</pre>
</td>
</tr>
</table>
<h3>Where Defined</h3>
<p>
<a href="../../../boost/graph/maximum_adjacency_search.hpp"><tt>boost/graph/maximum_adjacency_search.hpp</tt></a></p>
<h3>Parameters</h3>
IN: <tt>const UndirectedGraph&amp; g</tt></p>
<blockquote>
A connected, directed graph. The graph type must
be a model of <a href="./IncidenceGraph.html">Incidence Graph</a>
and <a href="./VertexListGraph.html">Vertex List Graph</a>.<br>
</blockquote>
<h3>Named Parameters</h3>
<p>IN: <tt>WeightMap weights</tt></p>
<blockquote>
The weight or length of each edge in the graph. The
<tt>WeightMap</tt> type must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable
Property Map</a> and its value type must be <a class="external"
href="http://www.sgi.com/tech/stl/LessThanComparable.html">
Less Than Comparable</a> and summable. The key type of this map
needs to be the graph's edge descriptor type.
<b>Default:</b> <tt>get(edge_weight, g)</tt><br>
</blockquote>
IN: <tt>visitor(MASVisitor vis)</tt></p>
<blockquote>
A visitor object that is invoked inside the algorithm at the
event-points specified by the MAS Visitor concept. The visitor
object is passed by value <a href="#1">[1]</a>. <br>
<b>Default:</b> <tt>mas_visitor&lt;null_visitor&gt;</tt><br>
</blockquote>
IN: <tt>root_vertex(typename
graph_traits&lt;VertexListGraph&gt;::vertex_descriptor start)</tt></p>
<blockquote>
This specifies the vertex that the depth-first search should
originate from. The type is the type of a vertex descriptor for the
given graph.<br>
<b>Default:</b> <tt>*vertices(g).first</tt><br>
</blockquote>
<h4>Expert Parameters</h4>
<p>IN: <tt>vertex_index_map(VertexIndexMap vertexIndices)</tt> </p>
<blockquote>
This maps each vertex to an integer in the range
[0, <tt>num_vertices(g)</tt>). This is only necessary if the default is
used for the assignment, index-in-heap, or distance maps.
<tt>VertexIndexMap</tt> must be a model of <a
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The value type of the map must be an integer type. The
key type must be the graph's vertex descriptor type.<br>
<b>Default:</b> <tt>get(boost::vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
<p>UTIL: <tt>vertex_assignment_map(AssignmentMap assignments)</tt></p>
<blockquote>
<tt>AssignmentMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write Property
Map</a>. The key and value types must be the graph's vertex descriptor
type.<br>
<b>Default:</b> A <tt>boost::iterator_property_map</tt> using a
<tt>std::vector</tt> of <tt>num_vertices(g)</tt> vertex descriptors and
<tt>vertexIndices</tt> for the index map.
</blockquote>
<p>UTIL: <tt>max_priority_queue(MaxPriorityQueue&amp; pq)</tt></p>
<blockquote>
<tt>MaxPriorityQueue</tt> must be a model of <a
href="./KeyedUpdatableQueue.html">Keyed Updatable Queue</a> and a
max-<a href="./UpdatableQueue.html#concept%3AUpdatablePriorityQueue">
Updatable Priority Queue</a>. The value type must be the graph's vertex
descriptor and the key type must be the weight type.
<b>Default:</b> A <tt>boost::d_ary_heap_indirect</tt> using a default
index-in-heap and distance map.
</blockquote>
<p>UTIL: <tt>index_in_heap_map(IndexInHeapMap indicesInHeap)</tt></p>
<blockquote>
This parameter only has an effect when the default max-priority queue is used.<br>
<tt>IndexInHeapMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write Property
Map</a>. The key type must be the graph's vertex descriptor type. The
value type must be a size type
(<tt>typename&nbsp;std::vector&lt;vertex_descriptor&gt;::size_type</tt>).<br>
<b>Default:</b> A <tt>boost::iterator_property_map</tt> using a
<tt>std::vector</tt> of <tt>num_vertices(g)</tt> size type objects and
<tt>vertexIndices</tt> for the index map.
</blockquote>
<p>UTIL: <tt>distance_map(DistanceMap wAs)</tt></p>
<blockquote>
This parameter only has an effect when the default max-priority queue is used.<br>
<tt>DistanceMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write Property
Map</a>. The key type must be the graph's vertex descriptor type. The
value type must be the weight type
(<tt>typename&nbsp;boost::property_traits&lt;WeightMap&gt;::value_type</tt>).
<br>
<b>Default:</b> A <tt>boost::iterator_property_map</tt> using a
<tt>std::vector</tt> of <tt>num_vertices(g)</tt> weight type objects
and <tt>vertexIndices</tt> for the index map.
</blockquote>
<h3>Returns</h3>
<p>void</p>
<h3>Throws</h3>
<p><tt>bad_graph</tt>
<blockquote>
If <tt>num_vertices(g)</tt> is less than 2
</blockquote></p>
<p><tt>std::invalid_argument</tt>
<blockquote>
If a max-priority queue is given as an argument and it is not empty
</blockquote>.
<h3><a name="SECTION001340300000000000000">
Complexity</a>
</h3>
<p>
The time complexity is <i>O(E + V)</i>.
</p>
<h3>References</h3>
<ul>
<li>David Matula (1993). <q><a href="http://dl.acm.org/citation.cfm?id=313872&dl=ACM&coll=DL&CFID=85991501&CFTOKEN=44461131">A linear time 2 + epsilon approximation algorightm for edge connectivity</a></q>
</li>
<li>Cai, Weiqing and Matula, David W.
Partitioning by maximum adjacency search of graphs.
Partitioning Data Sets: Dimacs Workshop, April 19-21, 1993.
Vol 19. Page 55. 1995. Amer Mathematical Society</li>
}
</ul>
<h3>Visitor Event Points</h3>
<ul>
<li><b><tt>vis.initialize_vertex(s, g)</tt></b> is invoked on every
vertex of the graph before the start of the graph search.</li>
<li><b><tt>vis.start_vertex(s, g)</tt></b> is invoked on the source
vertex once before processing its out edges.</li>
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge
of each vertex after it is started.</li>
<li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked on a vertex after
all of its out edges have been examined and the reach counts of the
unvisited targets have been updated.</li>
</ul>
<h3>Notes</h3>
<p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object
passed in. Therefore you may want the visitor to hold this state by
pointer or reference.</p>
<hr>
<table>
<tr valign=top>
<td nowrap>Copyright &copy; 2012</td><td>
Fernando Vilas
</td></tr></table>
</body>
</html>
+1 -1
View File
@@ -143,7 +143,7 @@ IN: <tt>VertexIndexMap indexmap</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
</blockquote>
+1 -1
View File
@@ -56,7 +56,7 @@ target, then this function returns the source vertex.
edge_descriptor e;
...
vertex_descriptor u, v;
tie(u, v) = incident(e, g);
boost::tie(u, v) = incident(e, g);
assert(v == opposite(e, u, g));
assert(u == opposite(e, v, g));
</pre>
+1 -1
View File
@@ -97,7 +97,7 @@ and might produce the output
New face: 1 2 5 4
New face: 2 3 4 5
New face: 3 0 1 4
New face: 2 3 0 1
New face: 1 0 3 2
</pre>
<h3>Visitor Event Points</h3>
+2 -2
View File
@@ -31,7 +31,7 @@ typically used with the <tt>on_tree_edge</tt> or
<p>
<tt>predecessor_recorder</tt> can be used with graph algorithms by
wrapping it with the algorithm specific adaptor, such as <a
wrapping it with an algorithm-specific adaptor, such as <a
href="./bfs_visitor.html"><tt>bfs_visitor</tt></a> and <a
href="./dfs_visitor.html"><tt>dfs_visitor</tt></a>. Also, this event
visitor can be combined with other event visitors using
@@ -44,7 +44,7 @@ tree). It is often useful to initialize the source vertex's
predecessor to itself, thereby identifying the root vertex as the only
vertex which is its own parent. When using an algorithm like
depth-first search that creates a forest (multiple search trees) it
is useful to intialize the predecessor of every vertex to itself. This
is useful to initialize the predecessor of every vertex to itself. This
way all the root nodes can be distinguished.
+12 -11
View File
@@ -67,6 +67,7 @@ PRIM-MST(<i>G</i>, <i>s</i>, <i>w</i>)
<b>for</b> each vertex <i>u</i> <i>in</i> <i>V[G]</i>
<i>color[u] :=</i> WHITE
<i>d[u] :=</i> <i>infinity</i>
<b>end for</b>
<i>color[s] :=</i> GRAY
<i>d[s] := 0</i>
ENQUEUE(<i>PQ</i>, <i>s</i>)
@@ -171,7 +172,9 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
the graph needs to be usable as the key type for the weight
map. The value type for the map must be
<i>Addable</i> with the value type of the distance map.<br>
the same as the value type of the distance map, and that type must be <a
href="http://www.sgi.com/tech/stl/LessThanComparable.html">Less Than
Comparable</a>.<br>
<b>Default:</b> <tt>get(edge_weight, g)</tt><br>
<b>Python</b>: Must be an <tt>edge_double_map</tt> for the graph.<br>
<b>Python default</b>: <tt>graph.get_edge_double_map("weight")</tt>
@@ -189,7 +192,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
<b>Python</b>: Unsupported parameter.
@@ -197,17 +200,15 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<blockquote>
The shortest path weight from the source vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map. The
shortest path weight is the sum of the edge weights along the
shortest path. The type <tt>DistanceMap</tt> must be a model of
<a
The weight of the spanning tree edge into each
vertex in the graph <tt>g</tt> is recorded in this property map, with edges
directed away from the spanning tree root.
The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the
graph needs to be usable as the key type of the distance map. The
value type of the distance map must be <a
href="http://www.sgi.com/tech/stl/LessThanComparable.html">Less Than
Comparable</a>.<br>
graph needs to be usable as the key type of the distance map, and the value
type needs to be the same as the value type of the <tt>weight_map</tt>
argument.<br>
<b>Default:</b> <a href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of the <tt>WeightMap</tt>'s value type of size
Executable → Regular
View File
+5 -5
View File
@@ -77,7 +77,7 @@ The time complexity is <i>O(V<sup>3</sup>)</i>.
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/push_relabel_max_flow.hpp"><TT>boost/graph/preflow_push_max_flow.hpp</TT></a>
<a href="../../../boost/graph/push_relabel_max_flow.hpp"><TT>boost/graph/push_relabel_max_flow.hpp</TT></a>
<P>
@@ -141,7 +141,7 @@ IN: <tt>vertex_index_map(VertexIndexMap index_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
</blockquote>
@@ -158,7 +158,7 @@ href="../example/max_flow.cpp"><tt>example/max_flow.cpp</tt></a>.
#include &lt;boost/config.hpp&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;boost/graph/push_relabel_map_flow.hpp&gt;
#include &lt;boost/graph/push_relabel_max_flow.hpp&gt;
#include &lt;boost/graph/adjacency_list.hpp&gt;
#include &lt;boost/graph/read_dimacs.hpp&gt;
@@ -196,8 +196,8 @@ main()
std::cout &lt;&lt; "c flow values:" &lt;&lt; std::endl;
graph_traits&lt;Graph&gt;::vertex_iterator u_iter, u_end;
graph_traits&lt;Graph&gt;::out_edge_iterator ei, e_end;
for (tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
for (tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
if (capacity[*ei] &gt; 0)
std::cout &lt;&lt; "f " &lt;&lt; *u_iter &lt;&lt; " " &lt;&lt; target(*ei, g) &lt;&lt; " "
&lt;&lt; (capacity[*ei] - residual_capacity[*ei]) &lt;&lt; std::endl;
+11 -7
View File
@@ -160,6 +160,8 @@ call <tt>get(vertex_index, g)</tt> returns the actual property map object.
{
// ...
typedef graph_traits&lt;Graph&gt;::vertex_descriptor Vertex;
// get the property map for vertex indices
typedef property_map&lt;Graph, vertex_index_t&gt;::type IndexMap;
IndexMap index = get(vertex_index, g);
@@ -167,8 +169,10 @@ call <tt>get(vertex_index, g)</tt> returns the actual property map object.
std::cout &lt;&lt; &quot;vertices(g) = &quot;;
typedef graph_traits&lt;Graph&gt;::vertex_iterator vertex_iter;
std::pair&lt;vertex_iter, vertex_iter&gt; vp;
for (vp = vertices(g); vp.first != vp.second; ++vp.first)
std::cout &lt;&lt; index[*vp.first] &lt;&lt; &quot; &quot;;
for (vp = vertices(g); vp.first != vp.second; ++vp.first) {
Vertex v = *vp.first;
std::cout &lt;&lt; index[v] &lt;&lt; &quot; &quot;;
}
std::cout &lt;&lt; std::endl;
// ...
return 0;
@@ -187,7 +191,7 @@ but in this case the iterators are <i>edge iterators</i>. Dereferencing an edge
iterator gives an edge object. The <tt>source()</tt> and <tt>target()</tt>
functions return the two vertices that are connected by the edge. Instead of
explicitly creating a <tt>std::pair</tt> for the iterators, this time we will
use the <a href="../../tuple/doc/tuple_users_guide.html#tiers"><tt>tie()</tt></a> helper function.
use the <a href="../../tuple/doc/tuple_users_guide.html#tiers"><tt>boost::tie()</tt></a> helper function.
This handy function can be used to assign the parts of a <tt>std::pair</tt> into
two separate variables, in this case <tt>ei</tt> and <tt>ei_end</tt>. This is
usually more convenient than creating a <tt>std::pair</tt> and is our method of
@@ -200,7 +204,7 @@ choice for the BGL.
// ...
std::cout &lt;&lt; &quot;edges(g) = &quot;;
graph_traits&lt;Graph&gt;::edge_iterator ei, ei_end;
for (tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
std::cout &lt;&lt; &quot;(&quot; &lt;&lt; index[source(*ei, g)]
&lt;&lt; &quot;,&quot; &lt;&lt; index[target(*ei, g)] &lt;&lt; &quot;) &quot;;
std::cout &lt;&lt; std::endl;
@@ -303,7 +307,7 @@ out-edge of vertex <tt>v</tt>.
std::cout &lt;&lt; &quot;out-edges: &quot;;
typename GraphTraits::out_edge_iterator out_i, out_end;
typename GraphTraits::edge_descriptor e;
for (tie(out_i, out_end) = out_edges(v, g);
for (boost::tie(out_i, out_end) = out_edges(v, g);
out_i != out_end; ++out_i) {
e = *out_i;
Vertex src = source(e, g), targ = target(e, g);
@@ -337,7 +341,7 @@ specified instead of <tt>directedS</tt>.
std::cout &lt;&lt; &quot;in-edges: &quot;;
typedef typename graph_traits&lt;Graph&gt; GraphTraits;
typename GraphTraits::in_edge_iterator in_i, in_end;
for (tie(in_i, in_end) = in_edges(v,g);
for (boost::tie(in_i, in_end) = in_edges(v,g);
in_i != in_end; ++in_i) {
e = *in_i;
Vertex src = source(e, g), targ = target(e, g);
@@ -373,7 +377,7 @@ descriptor for an adjacent vertex.
std::cout &lt;&lt; &quot;adjacent vertices: &quot;;
typename graph_traits&lt;Graph&gt;::adjacency_iterator ai;
typename graph_traits&lt;Graph&gt;::adjacency_iterator ai_end;
for (tie(ai, ai_end) = adjacent_vertices(v, g);
for (boost::tie(ai, ai_end) = adjacent_vertices(v, g);
ai != ai_end; ++ai)
std::cout &lt;&lt; index[*ai] &lt;&lt; &quot; &quot;;
std::cout &lt;&lt; std::endl;
Executable → Regular
+4 -4
View File
@@ -123,7 +123,7 @@ in:<br>
Desaulniers, G.; Desrosiers, J.; Solomon, M. (eds.) (2005):<br>
Column Generation<br>
Springer, New York, pp. 33&ndash;65<br>
(available online <a href="http://www.dpor.rwth-aachen.de/de/publikationen/pdf/or_2004-01.pdf">
(available online <a href="http://logistik.bwl.uni-mainz.de/Dateien/or_2004-01.pdf">
here</a>)
<p>
@@ -446,11 +446,11 @@ A container for storing the Pareto-optimal resource containers in the overloads
OUT: <tt>std::vector&lt;typename graph_traits&lt;Graph&gt;::edge_descriptor&gt;&amp;
pareto_optimal_solution</tt>
<blockquote>
A container for storing the first Pareto-optimal (undominated) solution (<i>s</i>-<i>t</i>-path) in the overloads where only one Pareto-optimal solution is returned. The path is returned as a sequence of edge descriptors in reverse order (from <tt>t</tt> to <tt>s</tt>).
A container for storing the first Pareto-optimal (undominated) solution (<i>s</i>-<i>t</i>-path) in the overloads where only one Pareto-optimal solution is returned. The path is returned as a sequence of edge descriptors in reverse order (from <tt>t</tt> to <tt>s</tt>). This argument is not modified if there are no solutions.
</blockquote>
OUT: <tt>Resource_Container&amp; pareto_optimal_resource_container</tt>
<blockquote>
A <tt>Resource_Container</tt> object for storing the Pareto-optimal resource container corresponding to the first Pareto-optimal path in the overloads where only one Pareto-optimal solution is returned.
A <tt>Resource_Container</tt> object for storing the Pareto-optimal resource container corresponding to the first Pareto-optimal path in the overloads where only one Pareto-optimal solution is returned. This argument is not modified if there are no solutions.
</blockquote>
IN: <tt>const Resource_Container&amp; rc</tt>
<blockquote>
@@ -466,7 +466,7 @@ A <a href="http://www.sgi.com/tech/stl/functors.html">function object</a> or fun
</blockquote>
IN: <tt>Label_Allocator la</tt>
<blockquote>
An object of type <tt>Label_Allocator</tt> specifying a strategy for the memory management of the labels. It must offer the same interface as <tt>std::allocator<lt;r_c_shortest_paths_label&lt;Graph, Resource_Container&gt; &gt;</tt>. There is a default type <tt>default_r_c_shortest_paths_allocator</tt> for this parameter using the STL standard allocator. If the third or the fourth overload of the function is used, an object of this type is used as <tt>Label_Allocator</tt> parameter. If the first or the second overload is used, one must specify both a <tt>Label_Allocator</tt> and a <tt>Visitor</tt> parameter. If one wants to develop a user-defined type only for <tt>Visitor</tt>, one can use <tt>default_r_c_shortest_paths_allocator</tt> as <tt>Label_Allocator</tt> parameter. If one wants to use a specialized allocator, one can specify an arbitrary type as template parameter for the value type to the allocator; it is rebound to the correct type.
An object of type <tt>Label_Allocator</tt> specifying a strategy for the memory management of the labels. It must offer the same interface as <tt>std::allocator&lt;r_c_shortest_paths_label&lt;Graph, Resource_Container&gt; &gt;</tt>. There is a default type <tt>default_r_c_shortest_paths_allocator</tt> for this parameter using the STL standard allocator. If the third or the fourth overload of the function is used, an object of this type is used as <tt>Label_Allocator</tt> parameter. If the first or the second overload is used, one must specify both a <tt>Label_Allocator</tt> and a <tt>Visitor</tt> parameter. If one wants to develop a user-defined type only for <tt>Visitor</tt>, one can use <tt>default_r_c_shortest_paths_allocator</tt> as <tt>Label_Allocator</tt> parameter. If one wants to use a specialized allocator, one can specify an arbitrary type as template parameter for the value type to the allocator; it is rebound to the correct type.
</blockquote>
IN: <tt>Visitor vis</tt>
<blockquote>
+1 -1
View File
@@ -76,7 +76,7 @@ IN: <tt>Gen&amp; gen</tt>
<blockquote>
A random number generator. The generator type must
be a model of <a
href="../../random/doc/reference.html#boost_random.reference.concepts.uniform_random_number_generator">Uniform
href="../../../doc/html/boost_random/reference.html#boost_random.reference.concepts.uniform_random_number_generator">Uniform
Random Number Generator</a> or a pointer or reference to such a type.<br>
</blockquote>
+27 -7
View File
@@ -1,6 +1,7 @@
<HTML>
<!--
// Copyright (c) 2006, Stephan Diederich
// Copyright (c) 2010, Trustees of Indiana University
//
// This code may be used under either of the following two licences:
//
@@ -32,7 +33,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: read_dimacs_max_flow</Title>
<Title>Boost Graph Library: read_dimacs_max_flow and read_dimacs_min_cut</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
@@ -47,18 +48,27 @@
<pre>
//reads a graph with attached edge_capacity properties from an std::istream
template &lt;class Graph, class CapacityMap, class ReverseEdgeMap&gt;
int read_dimacs_max_flow(Graph& g,
int read_dimacs_max_flow(Graph&amp; g,
CapacityMap capacity,
ReverseEdgeMap reverse_edge,
typename graph_traits<Graph>::vertex_descriptor& src,
typename graph_traits<Graph>::vertex_descriptor& sink,
std::istream& in=std::cin)
typename graph_traits<Graph>::vertex_descriptor&amp; src,
typename graph_traits<Graph>::vertex_descriptor&amp; sink,
std::istream&amp; in=std::cin)
//reads a graph with attached edge_capacity properties from an std::istream
template &lt;class Graph, class CapacityMap, class ReverseEdgeMap&gt;
int read_dimacs_min_cut(Graph&amp; g,
CapacityMap capacity,
ReverseEdgeMap reverse_edge,
std::istream&amp; in=std::cin)
</pre>
<p>
This method reads a BGL graph object from a max-flow problem description in extended dimacs format. (see <a href="http://www.avglab.com/andrew/CATS/maxflow_formats.htm"><TT>Goldbergs site</TT></a> for more information). For each edge found in the
file an additional reverse_edge is added and set in the reverse_edge map. Source- and sink-vertex-descriptors are set according to the dimacs file.
These functions read a BGL graph object from a max-flow or min-cut problem description in extended dimacs format. (see <a href="http://www.avglab.com/andrew/CATS/maxflow_formats.htm"><TT>Goldberg's site</TT></a> for more information). For each edge found in the
file an additional reverse_edge is added and set in the reverse_edge map. For
max-flow problems, source and sink vertex descriptors are set according to the
dimacs file.
<H3>Where Defined</H3>
@@ -81,6 +91,16 @@ file an additional reverse_edge is added and set in the reverse_edge map. Source
A property map that models <a href="../../property_map/doc/LvaluePropertyMap.html">mutable Lvalue Property Map</a> whose key and value type is the edge descriptor of the graph. This map stores the corresponding reverse edge for each each in Graph g.<br>
</blockquote>
OUT: <tt>vertex_descriptor&amp; src</tt>
<blockquote>
A graph vertex that will be set to the source of a max-flow problem.
</blockquote>
OUT: <tt>vertex_descriptor&amp; sink</tt>
<blockquote>
A graph vertex that will be set to the sink of a max-flow problem.
</blockquote>
IN: <tt>std::istream&amp; in</tt>
<blockquote>
A standard <tt>std::istream</tt> object. <br>
+6 -2
View File
@@ -20,7 +20,7 @@ http://www.boost.org/LICENSE_1_0.txt)
Authors: Tiago de Paula Peixoto -->
<pre class="literal-block">
void read_graphml(std::istream&amp; in, MutableGraph&amp; graph,
dynamic_properties&amp; dp);
dynamic_properties&amp; dp, size_t graph_index = 0);
</pre>
<p>The <tt class="docutils literal"><span class="pre">read_graphml</span></tt> function interprets a graph described using the
<a class="reference external" href="http://graphml.graphdrawing.org/">GraphML</a> format and builds a BGL graph that captures that
@@ -39,6 +39,10 @@ this object, using the GraphML attribute names as the property names,
and with the appropriate C++ value type based on the GraphML attribute type
definition. Graph properties are also set with the same
<a class="reference external" href="../../property_map/doc/dynamic_property_map.html">dynamic_properties</a> object, where the key type is the type of the graph itself.</p>
<p>If the file contains multiple graphs, the <tt class="docutils literal"><span class="pre">graph_index</span></tt> parameter controls
which graph will be loaded. It defaults to <tt class="docutils literal"><span class="pre">0</span></tt>, meaning that the first graph
in the file will be loaded. If <tt class="docutils literal"><span class="pre">graph_index</span></tt> is greater than or equal to the
number of graphs in the file, an empty graph will be returned.</p>
<dl class="docutils">
<dt>Requirements:</dt>
<dd><ul class="first last simple">
@@ -156,7 +160,7 @@ graph.</li>
</div>
<div class="footer">
<hr class="footer" />
Generated on: 2009-06-12 00:41 UTC.
Generated on: 2012-11-12 22:25 UTC.
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
+6 -1
View File
@@ -19,7 +19,7 @@ __ ../../../index.htm
::
void read_graphml(std::istream& in, MutableGraph& graph,
dynamic_properties& dp);
dynamic_properties& dp, size_t graph_index = 0);
The ``read_graphml`` function interprets a graph described using the
@@ -42,6 +42,11 @@ and with the appropriate C++ value type based on the GraphML attribute type
definition. Graph properties are also set with the same
dynamic_properties_ object, where the key type is the type of the graph itself.
If the file contains multiple graphs, the ``graph_index`` parameter controls
which graph will be loaded. It defaults to ``0``, meaning that the first graph
in the file will be loaded. If ``graph_index`` is greater than or equal to the
number of graphs in the file, an empty graph will be returned.
Requirements:
- The type of the graph must model the `Mutable Graph`_ concept.
- The type of the iterator must model the `Multi-Pass Iterator`_
+2 -2
View File
@@ -181,8 +181,8 @@ bool status = read_graphviz(gvgraph,graph,dp,&quot;node_id&quot;);
<div class="section" id="building-the-graphviz-readers">
<h1><a class="toc-backref" href="#id5">Building the GraphViz Readers</a></h1>
<p>To use the GraphViz readers, you will need to build and link against
the &quot;boost_graph&quot; library. The library can be built by following the
<a class="reference external" href="../../../more/getting_started.html#Build_Install">Boost Jam Build Instructions</a> for the subdirectory <tt class="docutils literal"><span class="pre">libs/graph/build</span></tt>.</p>
the &quot;boost_graph&quot; and &quot;boost_regex&quot; libraries. These libraries can be built by following the
<a class="reference external" href="../../../more/getting_started.html#Build_Install">Boost Jam Build Instructions</a> for the subdirectories <tt class="docutils literal"><span class="pre">libs/graph/build</span></tt> and <tt class="docutils literal"><span class="pre">libs/regex/build</span></tt>.</p>
</div>
<div class="section" id="notes">
<h1><a class="toc-backref" href="#id6">Notes</a></h1>
+2 -2
View File
@@ -182,8 +182,8 @@ GraphViz reader to populate an ``adjacency_list`` graph
Building the GraphViz Readers
-----------------------------
To use the GraphViz readers, you will need to build and link against
the "boost_graph" library. The library can be built by following the
`Boost Jam Build Instructions`_ for the subdirectory ``libs/graph/build``.
the "boost_graph" and "boost_regex" libraries. These libraries can be built by following the
`Boost Jam Build Instructions`_ for the subdirectories ``libs/graph/build`` and ``libs/regex/build``.
Notes
+29 -2
View File
@@ -27,7 +27,7 @@ The <tt>reverse_graph</tt> adaptor flips the in-edges and out-edges of
a <a href="./BidirectionalGraph.html">BidirectionalGraph</a>,
effectively transposing the graph. The construction of the
<tt>reverse_graph</tt> is constant time, providing a highly efficient
way to obtain a transposed-view of a graph.
way to obtain a transposed view of a graph.
<H3>Example</H3>
@@ -190,7 +190,7 @@ The type used for dealing with the number of vertices in the graph.
<hr>
<tt>graph_traits&lt;reverse_graph&gt;::edge_size_type</tt>
<tt>graph_traits&lt;reverse_graph&gt;::edges_size_type</tt>
<br><br>
The type used for dealing with the number of edges in the graph.
@@ -215,6 +215,16 @@ and must match one of the properties specified in the
<hr>
<tt>property_map&lt;reverse_graph, edge_underlying_t&gt;::type</tt><br>
and<br>
<tt>property_map&lt;reverse_graph, edge_underlying_t&gt;::const_type</tt>
<br><br>
An edge property type mapping from edge descriptors in the <tt>reverse_graph</tt> to
edge descriptors in the underlying <tt>BidirectionalGraph</tt> object.
<hr>
<H2>Member Functions</H2>
<hr>
@@ -358,6 +368,16 @@ argument.
<hr>
<pre>
property_map&lt;reverse_graph, edge_underlying_t&gt;::const_type
get(PropertyTag, const reverse_graph&amp; g)
</pre>
Returns a property map object that converts from edge descriptors in the
<tt>reverse_graph</tt> to edge descriptors in the underlying
<tt>BidirectionalGraph</tt> object.
<hr>
<pre>
template &lt;class <a href="./PropertyTag.html">PropertyTag</a>, class X&gt;
typename property_traits&lt;property_map&lt;reverse_graph, PropertyTag&gt;::const_type&gt;::value_type
@@ -367,6 +387,13 @@ This returns the property value for <tt>x</tt>, which is either
a vertex or edge descriptor.
<hr>
<pre>
typename graph_traits&lt;BidirectionalGraph&gt;::edge_descriptor
get(edge_underlying_t, const reverse_graph&amp; g, edge_descriptor e)
</pre>
This returns the underlying edge descriptor for the edge <tt>e</tt> in the <tt>reverse_graph</tt>.
<hr>
<pre>
template &lt;class <a href="./PropertyTag.html">PropertyTag</a>, class X, class Value&gt;
void
Executable → Regular
View File
Executable → Regular
View File
+2 -2
View File
@@ -45,7 +45,7 @@ public:
small_world_iterator();
small_world_iterator(RandomGenerator&amp; gen, vertices_size_type n,
vertices_size_type k, double probability,
vertices_size_type k, double probability = 0.,
bool allow_self_loops = false);
// Iterator operations
reference operator*() const;
@@ -82,7 +82,7 @@ Constructs a past-the-end iterator.
<pre>
small_world_iterator(RandomGenerator&amp; gen, vertices_size_type n,
vertices_size_type k, double probability,
vertices_size_type k, double probability = 0.,
bool allow_self_loops = false);
</pre>
<blockquote>
+2 -2
View File
@@ -63,7 +63,7 @@ graphs, suitable for initializing an <a
href="adjacency_list.html"><tt>adjacency_list</tt></a> or other graph
structure with iterator-based initialization. An Erd&ouml;s-Renyi
graph <em>G = (n, p)</em> is a graph with <em>n</em> vertices
that. The probability of having an edge <em>(u, v)</em> in <em>G</em>
such that the probability of having an edge <em>(u, v)</em> in <em>G</em>
is <em>p</em> for any vertices <em>u</em> and <em>v</em>. Typically,
there are no self-loops, but the generator can optionally introduce
self-loops with probability <em>p</em>.</p>
@@ -93,7 +93,7 @@ sorted_erdos_renyi_iterator(RandomGenerator&amp; gen, vertices_size_type n,
Constructs an Erd&ouml;s-Renyi generator iterator that creates a
graph with <tt>n</tt> vertices and a given <tt>probability</tt> of the
total number of edges that a simple graph may have.
<tt>probability</tt>. Random vertices and edges are selected using the
Random vertices and edges are selected using the
random number generator <tt>gen</tt>. Self-loops are permitted only when
<tt>allow_self_loops</tt> is <tt>true</tt>.
</blockquote>
+2 -2
View File
@@ -143,7 +143,7 @@ namespace boost {
rcm_queue&lt;Vertex, Degree&gt; Q(degree);
typename boost::graph_traits&lt;Graph&gt;::vertex_iterator ui, ui_end;
for (tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui)
for (boost::tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui)
put(color, *ui, white(c));
breadth_first_search(G, u, Q, bfs_visitor&lt;&gt;(), color);
@@ -214,7 +214,7 @@ from BGL can be reused.
CMVisitor cm_visitor(inverse_permutation);
typename boost::graph_traits&lt;Graph&gt;::vertex_iterator ui, ui_end;
for (tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui)
for (boost::tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui)
put(color, *ui, white(c));
breadth_first_search(G, s, Q, cm_visitor, color);
}

Some files were not shown because too many files have changed in this diff Show More