mirror of
https://github.com/boostorg/graph.git
synced 2026-07-21 13:23:42 +00:00
Compare commits
1412 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a649be53bd | |||
| 2862644154 | |||
| f62a1839bd | |||
| 3600dbc226 | |||
| 01020b0265 | |||
| fcfc152f85 | |||
| ea24532da5 | |||
| 944d9fc836 | |||
| 446dc15cf8 | |||
| 44632af1a9 | |||
| 5f4ce096f8 | |||
| 393c31d148 | |||
| 73149e556b | |||
| 3b6d40011b | |||
| 797530d23a | |||
| 2e4b9c461a | |||
| 3b6825958a | |||
| fa6aa57529 | |||
| 430f61f696 | |||
| 51f7f20cb6 | |||
| 71fed2fda8 | |||
| 76aed24add | |||
| c583bfa197 | |||
| fa3bd05312 | |||
| 99d0414416 | |||
| 31026c4a5a | |||
| 5f6e128c16 | |||
| 1e200701f8 | |||
| 8543c8ad78 | |||
| f2e5ef1b40 | |||
| f6fc9c8157 | |||
| 0486e91d1b | |||
| 0defbbc323 | |||
| b657cf3901 | |||
| 5ff3645af6 | |||
| 84232b46c0 | |||
| b76ffc7f2a | |||
| 972bde3031 | |||
| 8c76c8aa01 | |||
| 4879e70593 | |||
| 27202068ea | |||
| cea3ee8225 | |||
| 6e1f68ef22 | |||
| af22c9bcde | |||
| 7a6ceb3cd2 | |||
| 2bc8d0490e | |||
| 5bb73cd899 | |||
| 6bae630c38 | |||
| bb4fbd6494 | |||
| 64aa4a822a | |||
| d865589d62 | |||
| 03318bfb5f | |||
| 97f51d8180 | |||
| 35d3e15a47 | |||
| c2c341c12d | |||
| 685f9e091a | |||
| 2247005473 | |||
| 1fd5fc12a4 | |||
| 58b6f3640a | |||
| 63135f59b5 | |||
| 0c38817632 | |||
| 5842a766b6 | |||
| 5f1bbdb941 | |||
| 9b425a037c | |||
| 2bcd634112 | |||
| 7cccda8854 | |||
| f4aa9658fe | |||
| b3751605e4 | |||
| d63a380343 | |||
| 46702c45ac | |||
| 487459712b | |||
| cb342d159b | |||
| b05b379492 | |||
| 099f965f24 | |||
| d4160d52ba | |||
| 50e9e7a692 | |||
| d2ae80b7db | |||
| 0cfb1b8895 | |||
| 493e7b53a5 | |||
| f0c469b8e6 | |||
| bbc499708c | |||
| e4e12158e7 | |||
| 0c9dbd7808 | |||
| 83646b1913 | |||
| 56ce18a75d | |||
| 1b2c9d8d3f | |||
| f364ee7be2 | |||
| 910445584a | |||
| 4149230e27 | |||
| 7f77c3563b | |||
| 14c2bf17b4 | |||
| ecbd271eb1 | |||
| ca17604dca | |||
| 274a05f630 | |||
| 554da2950e | |||
| be1a8fdebc | |||
| 2159a9ec62 | |||
| 99b9fd190a | |||
| d26f6acc17 | |||
| dc7b450dea | |||
| 27a28047d8 | |||
| 7c0a9d2998 | |||
| c1803bbb4f | |||
| 545428a4d0 | |||
| 53d0e93e43 | |||
| 1eb8c16a76 | |||
| b9c3b14d39 | |||
| 80b88a32e9 | |||
| ed8b0bb007 | |||
| 318920a132 | |||
| c188da1fac | |||
| fa6871ef4d | |||
| d3b157f465 | |||
| 1134c88ee6 | |||
| daec2ee5e0 | |||
| b6ff20c1a5 | |||
| d497c3731c | |||
| 66d8827926 | |||
| 3fb1a64bd1 | |||
| 8747675e12 | |||
| b3f9fa1284 | |||
| a7896a7e97 | |||
| 8f5e1f1bf9 | |||
| 0978691c1f | |||
| 5c7e174ae1 | |||
| a2f6aa7317 | |||
| d483524c83 | |||
| 146f6f7b3d | |||
| 3a388e5843 | |||
| 887e63d34e | |||
| 15ffe0e5cf | |||
| e694fc7e9e | |||
| 338f917cfb | |||
| 487347fc08 | |||
| 36a395a14c | |||
| a7a78f0df8 | |||
| 32bc0e1dff | |||
| c314b5518b | |||
| 0310bbee74 | |||
| ac0a340d0b | |||
| 4d45af8b80 | |||
| 4e270bd62b | |||
| 1dfbbe2a16 | |||
| 32087dd0b6 | |||
| ee71134160 | |||
| a0d87b4467 | |||
| bf217327df | |||
| aa7f76d79d | |||
| 002c56a108 | |||
| 12be045f8d | |||
| 1324532d83 | |||
| 04f8155cbb | |||
| d73f1d2a76 | |||
| 32a83a7479 | |||
| e2851a6b8c | |||
| cec1b39f43 | |||
| 0048ae1b7e | |||
| 972f3c49d0 | |||
| 40f15af259 | |||
| 0157743b8e | |||
| 31375672d7 | |||
| 977560b917 | |||
| 1b177b75a8 | |||
| 44663dd46f | |||
| 48af7e0237 | |||
| 833589ebdf | |||
| 174ed2ed11 | |||
| f234920446 | |||
| 8a2381f9c2 | |||
| d81e8612d3 | |||
| 0201705aa3 | |||
| cb8e9738b6 | |||
| 9aff046cb5 | |||
| f2bd3d1be7 | |||
| ec34a721b3 | |||
| 91291eab78 | |||
| df1d52790c | |||
| 484ccb08c9 | |||
| b3cefefb76 | |||
| a62de4ae41 | |||
| 52978e2ac1 | |||
| 392b280fc7 | |||
| 038fe2890a | |||
| c1e69486d6 | |||
| 6a46e45fee | |||
| d05622a677 | |||
| f7dfafb5af | |||
| 741bff6b7c | |||
| 023bca04f6 | |||
| c731e2a29c | |||
| 4f937d1617 | |||
| 5d17aeb1ae | |||
| fa7fe4d622 | |||
| b27d731c1e | |||
| 8f11f4b51f | |||
| 8934754552 | |||
| f30f9ca2b3 | |||
| 6bfc5b5b79 | |||
| 8c7ea35cc8 | |||
| 9cc83d86d8 | |||
| d51ba76e20 | |||
| 38b65d2afd | |||
| 948eb2455a | |||
| bdccbcdde2 | |||
| 650291caf6 | |||
| affdd15565 | |||
| 462d4bbc9b | |||
| 10242dd583 | |||
| 71f544d41d | |||
| 79b32f5d6e | |||
| 5fd3b3d078 | |||
| 400eed8f02 | |||
| 3d737c34af | |||
| 5809e70e60 | |||
| 48aff2213e | |||
| 084e55f5d5 | |||
| a01537012d | |||
| b7c9394c22 | |||
| 1e2a8ccf03 | |||
| 0d56559460 | |||
| 6f9a4a9468 | |||
| 0fcc4dd80e | |||
| 0a0b58c6bb | |||
| 785306781f | |||
| dd85022178 | |||
| 5f1edca51c | |||
| 6039d918eb | |||
| 183a67fdc4 | |||
| d31aa184af | |||
| 878d6f6b22 | |||
| a65f604d54 | |||
| 23b26724c2 | |||
| 2e54007e75 | |||
| 80806fdfb7 | |||
| 5dd748307c | |||
| 5d6c7f6695 | |||
| ab9299f9c6 | |||
| 5d0f5a6b03 | |||
| 9cfddda9cf | |||
| 21bdac5709 | |||
| 6808062c07 | |||
| a10f17eb99 | |||
| 8551039ae3 | |||
| 3cc890e854 | |||
| 037af4db54 | |||
| 82fa79e783 | |||
| 283675d792 | |||
| 2f430a19e1 | |||
| 98164bf937 | |||
| 19c23ca255 | |||
| 4aaf5307db | |||
| f36a7bab16 | |||
| 458594d43a | |||
| 84122c8049 | |||
| c0450496a8 | |||
| 19dd94ee70 | |||
| e2f742d584 | |||
| 03b6e8acd6 | |||
| a499be87cb | |||
| e8d7c9fe9b | |||
| e2db737d1b | |||
| 94b4c662f8 | |||
| bcc8ed65b5 | |||
| 30d0faa665 | |||
| 815268534f | |||
| cb43ad3a45 | |||
| 32d5b35e2e | |||
| 93cfa18f3d | |||
| 4c752ee2f1 | |||
| e0b46b934e | |||
| 1643881cac | |||
| 98899a640a | |||
| a651ecf6ab | |||
| da6e2b5efb | |||
| 85b3f9746a | |||
| 50dcb5528d | |||
| a5ff4ea80e | |||
| 2a9ef82c35 | |||
| 07e902d8e7 | |||
| bbb74d5a71 | |||
| 58f550a361 | |||
| 726e9530d6 | |||
| 2999dc735b | |||
| 67a32c26b2 | |||
| faef224193 | |||
| 74115a2a1e | |||
| eda383e91d | |||
| 9886e3fef2 | |||
| 9697b20826 | |||
| 87bf61ced3 | |||
| a45e3de9b7 | |||
| 9757b9e44c | |||
| ac70119f9f | |||
| bc21e6426e | |||
| b6594e17e7 | |||
| c88a459d8c | |||
| 00ad80ec84 | |||
| 7913228c9d | |||
| 45b600b665 | |||
| 41dc6bc8ec | |||
| 09914913d8 | |||
| 38c0346d50 | |||
| d59e865d77 | |||
| 06184c0bfe | |||
| 15d1ce3c5b | |||
| 96e152f8e5 | |||
| 10035bd207 | |||
| d311ba1ccf | |||
| 3977e06d83 | |||
| e758310566 | |||
| 3b503707ad | |||
| 03b9b5bdfd | |||
| da0610c99b | |||
| db5c1b317c | |||
| 05a9ed31da | |||
| c1ccf73891 | |||
| 281bb94e51 | |||
| c48c80f51f | |||
| f07d91397c | |||
| cf6e8efdf4 | |||
| db0f694531 | |||
| d4ae9d1e3f | |||
| f3939dcef2 | |||
| af40fc7f8c | |||
| 3d5d6b70f1 | |||
| 2f18f795a2 | |||
| 10a5b5182f | |||
| a915aa0ade | |||
| 090527e0fd | |||
| d396eb771e | |||
| b48a9cd5a4 | |||
| 8b5d16c7b0 | |||
| f5bc5e8504 | |||
| 387bcb3d72 | |||
| f3b89e9f19 | |||
| 8dd8cd945e | |||
| 8f15303620 | |||
| 7cb9113a61 | |||
| 0d3be12b42 | |||
| 54589358a4 | |||
| 56d3e72155 | |||
| 7e54f9997d | |||
| 2796c0a147 | |||
| 2f8b0897aa | |||
| a9c0fa9495 | |||
| 2f257fa083 | |||
| b50fe850a2 | |||
| 529934f827 | |||
| caa8fd4568 | |||
| c7a6fdc418 | |||
| 0ce03767a8 | |||
| 8321c79d20 | |||
| 589584b4e4 | |||
| f0faaabca1 | |||
| 4b07d0b469 | |||
| cdc7f4f75b | |||
| 9249b640e4 | |||
| c0756b5ebf | |||
| a14f8df86c | |||
| 7f94230dca | |||
| ecf83843e7 | |||
| 13cea9c32b | |||
| 50cb642e94 | |||
| c112afbbad | |||
| b1a4f32b1f | |||
| f9e930f006 | |||
| a4e6f4dd78 | |||
| 753c88c484 | |||
| fa7ef591c2 | |||
| eec98072db | |||
| 48b63adf44 | |||
| b0214ec131 | |||
| ba0cf281c9 | |||
| b5171962bf | |||
| 5d8c6fd1d3 | |||
| 59aba774bc | |||
| 0eabc7ceb5 | |||
| 8729cc8a7c | |||
| 5bfc793f06 | |||
| b357a88ecd | |||
| a089d3bc35 | |||
| 04c1c99051 | |||
| d6b7a717db | |||
| b6d9a72999 | |||
| 6f5964a6bd | |||
| d155583ac2 | |||
| 6a2d45ae20 | |||
| 0e1414f46e | |||
| 189c113f04 | |||
| add3546f94 | |||
| 6416fecc90 | |||
| 8ca2084c9d | |||
| 5b84005bac | |||
| 6a33285342 | |||
| 379383b62a | |||
| a5b6a097e6 | |||
| e24fe39546 | |||
| e4aa48bc4b | |||
| 316445d7c9 | |||
| 15872fe070 | |||
| 976e524b59 | |||
| ded3042cd2 | |||
| 677ba4b1e6 | |||
| 400e8b5904 | |||
| 06f304656c | |||
| ee8b7c377d | |||
| ed98931118 | |||
| 08453c109a | |||
| 655ce30eb3 | |||
| a61ae7153e | |||
| 6fc1f4a924 | |||
| 73136fa215 | |||
| 89b694c3f5 | |||
| b2526fbd16 | |||
| 12737ab552 | |||
| 50bfd8dad0 | |||
| 06f9e27fdf | |||
| d84651c9ad | |||
| 05dc4222ee | |||
| d69fcd93c5 | |||
| 702c1110ad | |||
| 6197b9c549 | |||
| 8cad3dfa4b | |||
| daa2e69db1 | |||
| 6a559d3b73 | |||
| b31f6de077 | |||
| 1d5f43d9f6 | |||
| 7c95f6ebcd | |||
| 3921923880 | |||
| 66f5121309 | |||
| dfe2156c16 | |||
| 7492a04210 | |||
| 60fcab11ca | |||
| 4aa40f807a | |||
| 3c25ef6717 | |||
| c0b8ef85fb | |||
| 0fc1749bd7 | |||
| b326f2cdb6 | |||
| 69db10b6ef | |||
| 56a9c5e5c3 | |||
| 2573fbb9f0 | |||
| ffb6218f07 | |||
| 8c7c546942 | |||
| 9d35801154 | |||
| efa9fbd904 | |||
| 713ee03efc | |||
| 441edc8e1c | |||
| 9cd237093c | |||
| 221ac5d6f0 | |||
| f13ec6fa32 | |||
| 8ece8fac15 | |||
| 63dd92da72 | |||
| eb9c64626c | |||
| 183a74d213 | |||
| 1740916e42 | |||
| aba24ae80a | |||
| cad7851624 | |||
| 6e1ed79cbc | |||
| bc60e27f75 | |||
| 3afa03dcd0 | |||
| 3a663cddc3 | |||
| 02fbda4272 | |||
| c07183ad71 | |||
| 292fb84421 | |||
| 290e9fc3d1 | |||
| 70a2630932 | |||
| 7d7eca4a38 | |||
| 03dbf02a5a | |||
| da78b282b4 | |||
| 612b42c7b2 | |||
| 73c4e2e36c | |||
| 0f4ecbcd4b | |||
| 9160fdb45e | |||
| 4210b6aa84 | |||
| d6314a81bb | |||
| 9ce26cf6ea | |||
| 235064c63c | |||
| 1b88c5bc8b | |||
| 887de5e2e3 | |||
| 12d334fff6 | |||
| e2da814588 | |||
| 9b7fbc1a76 | |||
| 1f2dc47fdd | |||
| fcaef7c4e3 | |||
| 07c47bca51 | |||
| b77deb851a | |||
| 86bbbf563d | |||
| f1fe4a9132 | |||
| cb26ccf2ba | |||
| cec654dedb | |||
| 983be4b9e7 | |||
| 332b49261c | |||
| a9b0657fd3 | |||
| 4af610830b | |||
| 031ce8084b | |||
| db6e8b7981 | |||
| 74564d5a1c | |||
| 91a21a559c | |||
| 73b68e32ba | |||
| 0464915a7f | |||
| 4ebf7f60fc | |||
| 4fc3cbfaae | |||
| da59145176 | |||
| bed19d5c25 | |||
| f0f1251da7 | |||
| 4f8a34090e | |||
| e096e7e5cc | |||
| 51d3fe8aed | |||
| 5922324c2b | |||
| f97c2ee746 | |||
| c40148ee94 | |||
| fdd8e41b47 | |||
| 93f232252e | |||
| 93f4a862c3 | |||
| e1bcb667b6 | |||
| 405e21d011 | |||
| a3efa1c030 | |||
| bd107e4ab5 | |||
| 85b45da7c8 | |||
| 8aa602b40d | |||
| 915b70ec05 | |||
| 5297423229 | |||
| 01a683d8ce | |||
| 5ba855f46e | |||
| d983ea89a5 | |||
| cd267de654 | |||
| 130f7129c3 | |||
| be2fc043d1 | |||
| a5a29bd065 | |||
| 73d2d7500e | |||
| d53729083f | |||
| 37bd777094 | |||
| ca70cdaa2c | |||
| 5e88d92265 | |||
| 61296c352a | |||
| 2cd57a4180 | |||
| df1a183214 | |||
| bf00bbe4f0 | |||
| b98f225d0d | |||
| 1311d1b035 | |||
| 966aa0cf48 | |||
| 67f7bcfa96 | |||
| 2c62f35e46 | |||
| 67aacbe6ef | |||
| 53bdf1db9c | |||
| 7e9b77f5fb | |||
| 535e593810 | |||
| c40a522362 | |||
| 32fa162931 | |||
| 65c9ef22c6 | |||
| 44912cc2be | |||
| f9dbc3ffb3 | |||
| 3e770e171e | |||
| 4f3e758c9c | |||
| 0e4f022d9d | |||
| 393c072c18 | |||
| 2539ea8bca | |||
| 02aaeccae5 | |||
| 3ebad4bc01 | |||
| 057a718a39 | |||
| 51a28ac04b | |||
| e8eba95d4a | |||
| afd2ee41bd | |||
| e41d96177f | |||
| 1c54f431ca | |||
| 7ea6373369 | |||
| 8caf6fc368 | |||
| f10ad0650a | |||
| 2f12c59529 | |||
| 086cd12a7e | |||
| 22b521ecf4 | |||
| 31cf899da9 | |||
| ebd636bfc0 | |||
| 8a1913f804 | |||
| f53d02e0eb | |||
| 233cc514c5 | |||
| 5f6963e0f0 | |||
| 25852f92af | |||
| 36d3d83375 | |||
| 867f8cf495 | |||
| add307aafc | |||
| 0c2db206d3 | |||
| fd7f84560b | |||
| 6aed0a5a45 | |||
| 1a9533422d | |||
| 56223ce7b0 | |||
| e39be516c2 | |||
| 55047c74c1 | |||
| d1bd08f2a3 | |||
| 74dc17ee94 | |||
| 942d3430f1 | |||
| eefb7a3d47 | |||
| 923877b3c5 | |||
| 4495a409e5 | |||
| 1bb17dab63 | |||
| f95e102060 | |||
| 0df5824004 | |||
| 3419d42acc | |||
| b5b07e13a8 | |||
| 2275b3019b | |||
| 0a990db1c5 | |||
| b4e1fe7a66 | |||
| 8c4d0b33cd | |||
| 0d1769a27c | |||
| 8f37c21e99 | |||
| 34ddb83a49 | |||
| c964747407 | |||
| b214ef2f4d | |||
| 607d866854 | |||
| f95abaa83c | |||
| ddf8a5e07e | |||
| 3009b2303c | |||
| b9e9ed2067 | |||
| f16a1b114d | |||
| 8afe81608c | |||
| 3be269ba35 | |||
| 58829e019b | |||
| 663127c3b7 | |||
| 9002628f15 | |||
| 076085fd29 | |||
| adaa84d861 | |||
| 8c83132ef7 | |||
| 60b5e07027 | |||
| 58ff2364ba | |||
| fecccdd81c | |||
| b52e49730b | |||
| 9dcbb861d6 | |||
| d2d880b4e0 | |||
| 88101e0ab0 | |||
| 4672f4d430 | |||
| 6dc5eb1d6a | |||
| 48f4d92a38 | |||
| ff872bad11 | |||
| 245e36feba | |||
| 1cdce524a2 | |||
| ba9155f89c | |||
| df80876475 | |||
| 6604e3a013 | |||
| 408469afcf | |||
| 20ab0ffec3 | |||
| 71f0ab997d | |||
| 708d8b62a5 | |||
| 616b9e7134 | |||
| 849d1538ed | |||
| 215359117a | |||
| 5cab2dcf61 | |||
| 30dd4d8f69 | |||
| 0cbdd0a40f | |||
| 38ad939f37 | |||
| cbe70511cd | |||
| 0b30767da0 | |||
| 8ff9b6c510 | |||
| b37570381b | |||
| 34ba5d36d7 | |||
| 856e0fb3ab | |||
| 48860d938c | |||
| 4e5382d828 | |||
| 2d70ac7254 | |||
| 1eb950d630 | |||
| 1441c15255 | |||
| 8e40b350e3 | |||
| 429112df7c | |||
| 0586ac290f | |||
| d42d54b54e | |||
| bec6cb4dda | |||
| 117689a3f9 | |||
| 6ea899f7ed | |||
| a64981a983 | |||
| 2a4350905b | |||
| ebdec45c4b | |||
| 97bea429fc | |||
| 01832f76c2 | |||
| 0aaf3858a0 | |||
| efd4b992cc | |||
| 706859b595 | |||
| 3d43c1a8ec | |||
| eeaee30dd3 | |||
| a4806bed3b | |||
| 8400e599ca | |||
| 28cf285c4d | |||
| 7d3b9f0b4b | |||
| aaedb9bac7 | |||
| ce845156b8 | |||
| 755c77e7c1 | |||
| 30026490ee | |||
| 63200dc0ea | |||
| 8ecd3a986c | |||
| d70d07b0ba | |||
| eaebaf87a6 | |||
| 428762da2b | |||
| 5d1e1ce628 | |||
| 771d9307cc | |||
| 7fccfd1f42 | |||
| 9092da0b8f | |||
| 118a055bc4 | |||
| 068b2916b3 | |||
| e77cd87de1 | |||
| e0c11b3116 | |||
| 8f8cd154e6 | |||
| 5aa2be67b0 | |||
| 7a2ec7c4dc | |||
| 035fac705c | |||
| 6f4b8bf204 | |||
| 57121513a7 | |||
| 7e59864546 | |||
| bbab01b9c3 | |||
| 3b7250f736 | |||
| e315856b1b | |||
| b838adfa32 | |||
| cae4628d7e | |||
| a3d25c5521 | |||
| 7cddb8febf | |||
| 908ebf506f | |||
| fee51b8cdc | |||
| 00ae7b7e72 | |||
| 5476d8d70a | |||
| c49c05f502 | |||
| e7d2639f6e | |||
| fdc5f76aca | |||
| 761f792ed4 | |||
| c1b4a409a5 | |||
| 2d41bea1c8 | |||
| ce88df48fd | |||
| 0a31d3c76b | |||
| cdef2804ea | |||
| b42b71824b | |||
| cd1186205d | |||
| 9d353c53e2 | |||
| a1fc58cc93 | |||
| f63ebe9a8b | |||
| 1c7c456e18 | |||
| e761a6b4d0 | |||
| cddab52a7b | |||
| 3af4b053be | |||
| 210e7857b2 | |||
| a4dc3d7b23 | |||
| 4b95dcfbe9 | |||
| f761059ecd | |||
| a439c48425 | |||
| 99f7ed91af | |||
| cd1fee5f7d | |||
| 231bb5dbfb | |||
| 456f4006cb | |||
| 52d7bc8d5e | |||
| 8f3dd3a4f9 | |||
| 79573b5dbd | |||
| fc1619d91e | |||
| 17f92dd61e | |||
| 2a5874c7b9 | |||
| 03193c2fb4 | |||
| 345a6b964b | |||
| 366cd32060 | |||
| a88250f76f | |||
| 2b2f2d464e | |||
| 3619e54948 | |||
| d6643f50f3 | |||
| 63249fa231 | |||
| 6f91f83d2e | |||
| 2edbcb500f | |||
| ffff89b1a2 | |||
| 3a546c9418 | |||
| 27e5672047 | |||
| 4a19d6d288 | |||
| 4778a4b359 | |||
| fd37deb67b | |||
| 90678ab0fa | |||
| 48b3020f7d | |||
| 9f29ef1a83 | |||
| b156db0c9e | |||
| 9c7f42c58a | |||
| c0bc3e3aea | |||
| fee2e45a8c | |||
| f0343d2264 | |||
| fcf6446201 | |||
| 1180386ac1 | |||
| b021084901 | |||
| c416132bfe | |||
| fec3bd2314 | |||
| 8b4ac5cc39 | |||
| b6c54fa390 | |||
| 6edd466d86 | |||
| f98a8afdd6 | |||
| 9cf1345871 | |||
| 55b82bd1f2 | |||
| 2c3505aec9 | |||
| c5780610c6 | |||
| 081b1f90bf | |||
| a4af894285 | |||
| b407ea9309 | |||
| 19b05b0cae | |||
| 3131ffa454 | |||
| 1fa0cd9a26 | |||
| 5a5b35b154 | |||
| 4b1c5fe438 | |||
| 03510b4a6e | |||
| 30e9f22af4 | |||
| 06bdbbcbba | |||
| f52b7df417 | |||
| 2e4073a8b7 | |||
| 516c833574 | |||
| fd549fe0fa | |||
| b52d4724c2 | |||
| 66cd415568 | |||
| d44293d8a8 | |||
| a0c90983ab | |||
| bb1ce866f8 | |||
| ac4b12107f | |||
| a4452c3539 | |||
| 074277924a | |||
| 6e73c470a4 | |||
| 1963179514 | |||
| bd69c0c5cf | |||
| dcd9920780 | |||
| 8b4eb672e0 | |||
| ec5f6a655c | |||
| e5341acc43 | |||
| 19679d3851 | |||
| 3624e74d13 | |||
| ae33127eed | |||
| 43386bca5c | |||
| 287529480f | |||
| 6fb2f7edec | |||
| 4a5c105654 | |||
| f132fd060f | |||
| 595b9abbdc | |||
| 0415ceffe0 | |||
| 4000bccb3d | |||
| 2e5db3d026 | |||
| ff1775df18 | |||
| b76015210d | |||
| cf1943fb84 | |||
| 086a94c8a5 | |||
| 0ec513eab1 | |||
| 10b41afc0f | |||
| c3aad6b27e | |||
| cc07f4c201 | |||
| 904b4cc924 | |||
| e864071546 | |||
| 979e02a617 | |||
| 9bcc1b9a69 | |||
| 11d2d38a51 | |||
| db812aa773 | |||
| 6c48845da8 | |||
| fb567057df | |||
| 8e365de488 | |||
| a934539462 | |||
| f5b408ef7f | |||
| 7d02f7dd6b | |||
| dbd5774482 | |||
| 11187e5a25 | |||
| aef49c1b8b | |||
| 55dec7c079 | |||
| a3786d7f7e | |||
| 94b48cea30 | |||
| 822fc80494 | |||
| 24a2de892f | |||
| 61d37fe743 | |||
| 43ff6aef6d | |||
| 7ba05ec487 | |||
| f66d119969 | |||
| adc6eb0f0d | |||
| 4673c796aa | |||
| 7b97cbf393 | |||
| e13fcab1e8 | |||
| f095156c22 | |||
| 2aeecada2a | |||
| 00d076b2f8 | |||
| b71896f622 | |||
| 89cd3d8a8a | |||
| bada2e9b7a | |||
| 7e2b915b14 | |||
| ff2980b121 | |||
| 3a01fc7f4e | |||
| 17af2e739a | |||
| 4963f676dc | |||
| 2ba8f21b13 | |||
| c6399e2baf | |||
| c07518f7d1 | |||
| 80378ca2dc | |||
| 0f78fd6710 | |||
| b3809b0910 | |||
| 398ea401df | |||
| 3edc92eebc | |||
| 286c831903 | |||
| 590f8fca52 | |||
| 8a38567538 | |||
| 862c7637cd | |||
| bd4c4438ba | |||
| a84b41c331 | |||
| eae116a598 | |||
| 53edba6e31 | |||
| 892677e57e | |||
| 8d013dc58a | |||
| c573261f24 | |||
| c44888396b | |||
| 724773b517 | |||
| 7c0a0f2da7 | |||
| 954b8066bc | |||
| 88a4583d32 | |||
| ea9d3f00eb | |||
| 3233baf282 | |||
| a942726d30 | |||
| d4865f0d49 | |||
| 57cb8046b1 | |||
| 08f2f509b0 | |||
| 0d4b7e6b7b | |||
| 367e31c08b | |||
| 4d852e33af | |||
| 835b65bd17 | |||
| e6576abc28 | |||
| 326b4ab542 | |||
| 06f8e40a12 | |||
| 51d0b63c54 | |||
| 783d79bba3 | |||
| f86b056a60 | |||
| b383f407a6 | |||
| 1f2789531e | |||
| 9ff5074af0 | |||
| fab9ffcb37 | |||
| 6e96d8e2f4 | |||
| e896bf8a41 | |||
| 033b0735eb | |||
| 4e1009cac7 | |||
| 78c4cc350b | |||
| 97f72f10fe | |||
| 0b69e667f0 | |||
| 753900a4a0 | |||
| 6e72c1f445 | |||
| b474768cd0 | |||
| b6161b1cb2 | |||
| ac874068dd | |||
| 26f16eb0e2 | |||
| b90204bf75 | |||
| 6d7c351c5b | |||
| f562f8061f | |||
| 4078644f3a | |||
| 6e86b10353 | |||
| 9196ee6cfd | |||
| 75a0bd67a0 | |||
| 917fb11348 | |||
| 90a71f990e | |||
| 7330452212 | |||
| 706f23a02d | |||
| d6eb198e36 | |||
| cb2d8619c5 | |||
| a0d982cdb4 | |||
| c048688bfa | |||
| 87b7eb047d | |||
| d6a48882b1 | |||
| 3db3c55bf4 | |||
| e98b1efd21 | |||
| 1a51b383ff | |||
| b1e8eeacd7 | |||
| 61109b6b34 | |||
| b99db562e3 | |||
| 725a5910d7 | |||
| 6af93735fd | |||
| 21c9b6e553 | |||
| 53842df1cb | |||
| 00dcf87246 | |||
| 69fb3ed70c | |||
| 71ecfa425e | |||
| eb36987fec | |||
| e9fcb04d9f | |||
| e66d822b25 | |||
| a74dac8d15 | |||
| 0dd699a355 | |||
| c19fbafcf6 | |||
| ce5aba9799 | |||
| 904819f886 | |||
| a3fa432c9f | |||
| 0c75ddee03 | |||
| ae1242ca4a | |||
| b13d8ec429 | |||
| 7b548b372f | |||
| 14a8a21105 | |||
| 109cdf39be | |||
| 1a52f5132f | |||
| a9e93bfe92 | |||
| 373aabbf5b | |||
| 1d882adf30 | |||
| 3ca99558ff | |||
| 1ba64f82ec | |||
| 0f4d9c80a1 | |||
| b76090ad8d | |||
| fad45bcb1b | |||
| dababea605 | |||
| c03ffc7c3e | |||
| 8dc3d67377 | |||
| 319cbc4947 | |||
| 205d3176a7 | |||
| 32d2dd1124 | |||
| 63bca89427 | |||
| 5e3a6a954a | |||
| 19a0adaf64 | |||
| c1164d8bb9 | |||
| c793b7a9ec | |||
| 6810d4167d | |||
| 5e9cac2ed6 | |||
| afab978e75 | |||
| c170e069ae | |||
| 6d19c10ed6 | |||
| aec5b30a0f | |||
| b5138b89ac | |||
| 9d0640b614 | |||
| 1917131f0f | |||
| 93b0fbf23e | |||
| c0b6e0933d | |||
| 8cccc3c027 | |||
| 2eca482bec | |||
| f3af4d1a4e | |||
| 4a3a1b5b70 | |||
| 77be6de60e | |||
| 744a588308 | |||
| 0737b42364 | |||
| 0ccfbb5754 | |||
| 97e1916248 | |||
| ba2d8eeffc | |||
| a4af699063 | |||
| 10135eeab5 | |||
| dd07cb4c5a | |||
| e5aebbcc97 | |||
| d00948cef3 | |||
| 8431fde428 | |||
| e47d3c4c5a | |||
| fa50529664 | |||
| 4124f2c7ff | |||
| 1d018bbeab | |||
| 08d4597f35 | |||
| 616543e629 | |||
| ab3e981794 | |||
| 2d7c00159e | |||
| 09496c3696 | |||
| b2636ec3ea | |||
| 5478788f98 | |||
| dfb0e1ab90 | |||
| 88cc021588 | |||
| 770ce8cf86 | |||
| f9cc40283c | |||
| 42cf78c555 | |||
| bf679e7e19 | |||
| 9355c68e52 | |||
| c1f12a21b0 | |||
| e553d1acf8 | |||
| 4279beb707 | |||
| 76083c7e67 | |||
| b237a6ee82 | |||
| 6a287972d4 | |||
| bc3a645196 | |||
| dced37cf67 | |||
| 801a11bf4a | |||
| e5936c730d | |||
| f41358a7ee | |||
| 93fae3dece | |||
| a880fcbde7 | |||
| 07671f91e3 | |||
| f2d850e4f9 | |||
| 53221f13ab | |||
| 1d66d04fc1 | |||
| ab16f809a0 | |||
| 51182ecec6 | |||
| 0899a49611 | |||
| d2d80c64da | |||
| 5c1a27890c | |||
| 5810b885a7 | |||
| 35a3b60e5d | |||
| fe10254f0c | |||
| 1768443b87 | |||
| 454cc349a1 | |||
| f0d4890326 | |||
| 818124bc40 | |||
| c12358b15b | |||
| 50bc92b159 | |||
| 722e0c6cc6 | |||
| b1231d3469 | |||
| a7a18787e9 | |||
| f9341ebe86 | |||
| 8258ae5b51 | |||
| 4e015739c4 | |||
| 5fe4310658 | |||
| a04721f0ed | |||
| e54ede1993 | |||
| 027f256b52 | |||
| ab7510ba75 | |||
| 02891de03f | |||
| f20a8aa9b5 | |||
| c9c6f4b631 | |||
| 1ef53b2d50 | |||
| 600bb3f37c | |||
| 1a4e9ef4ad | |||
| f87613ea1b | |||
| 20fd0bef2d | |||
| 24c0b6db9d | |||
| 33af3494f7 | |||
| fd3a5f46f5 | |||
| a1d6cf2106 | |||
| c748a400e9 | |||
| 4af9462b74 | |||
| 5eee5fa952 | |||
| 3b3977cd3e | |||
| 2566623af3 | |||
| eede6c1338 | |||
| 27e1fe603f | |||
| 1acdecb32f | |||
| 483310f08a | |||
| 30d0e0ea2a | |||
| 0b53b0b00a | |||
| 083d6b83aa | |||
| 925fd6a2d6 | |||
| 9a9bd728e7 | |||
| 0b60534904 | |||
| 06c0e7e505 | |||
| 883beb8102 | |||
| 7552f02d05 | |||
| 394757f512 | |||
| cdcb54e084 | |||
| 38dd3d15fa | |||
| d4078044ad | |||
| b0e4e9fa01 | |||
| 2e70900dce | |||
| de12ad6911 | |||
| 414f2b1af0 | |||
| 82c88cb90e | |||
| 30602358e9 | |||
| 1645bd1bb9 | |||
| 2641f77ab6 | |||
| b1554dfafb | |||
| c1979501bb | |||
| d5e29e90c1 | |||
| 5a01455ca3 | |||
| 9574e5a490 | |||
| 90a8d79f4d | |||
| 71830942e6 | |||
| 8be1112040 | |||
| 8ca5d4e494 | |||
| 3a4213ff02 | |||
| 5f402c0c31 | |||
| 84a790d954 | |||
| 872308b277 | |||
| 5a3490da07 | |||
| 711e647fd2 | |||
| fdfba32734 | |||
| 9d5036e580 | |||
| c5e0a6acd0 | |||
| a5bbe074a6 | |||
| 78a0de9f63 | |||
| c21d244bbb | |||
| eacf5f1c6d | |||
| d380695958 | |||
| 6d6048c9a1 | |||
| c523b99ddf | |||
| 4a03e4c700 | |||
| cdf526c24d | |||
| d249df4521 | |||
| 012d41e6a5 | |||
| 37f5ad4a5f | |||
| 97e86ebe5f | |||
| 84c7f22f11 | |||
| d819683bf3 | |||
| 5d033cb991 | |||
| cef1982db1 | |||
| 9daa48bff4 | |||
| dd5da5d657 | |||
| 54d8958f9c | |||
| 217e527cb3 | |||
| e006f8ff04 | |||
| 016779276c | |||
| 93dc2b2c0d | |||
| 43b99f3fbe | |||
| 77b148e6db | |||
| 3d07d486b2 | |||
| ee35a986a7 | |||
| 8b185359ef | |||
| c9ac66d0d8 | |||
| 360e769758 | |||
| c4715738db | |||
| b35856b2f3 | |||
| dafc6fbb2b | |||
| 1a184e4e2e | |||
| f789831ba9 | |||
| dfb88dedb4 | |||
| 686376231a | |||
| 791a5f0e72 | |||
| 863b976726 | |||
| f72b7b9d1d | |||
| bec5451742 | |||
| f8960081b2 | |||
| 186d6baaaa | |||
| e7054fb090 | |||
| e9709979de | |||
| c5bcc31f22 | |||
| 1b46340737 | |||
| 8dd497a9f1 | |||
| 39eda77bb0 | |||
| 0fe3f9f7d7 | |||
| 025ae1f7b1 | |||
| 268d57b5f8 | |||
| 5279b7e743 | |||
| e18f677885 | |||
| 615f47676b | |||
| bdf6e6c832 | |||
| be6033bbb8 | |||
| c2b83032f8 | |||
| f925853bb5 | |||
| 00211e9135 | |||
| 5080ba19df | |||
| 6fd494aec2 | |||
| 72769b9017 | |||
| 71c8ff92a2 | |||
| 31b9be10a4 | |||
| 754f3b92ed | |||
| a1d00ed07b | |||
| c4167010e3 | |||
| 92e58bf5eb | |||
| c9fc501377 | |||
| cf6051cbfe | |||
| 3808741d30 | |||
| 3217880ec2 | |||
| f1c6d7b56f | |||
| 6365853620 | |||
| ebc735f49e | |||
| acfe2b5d90 | |||
| c0baa8282c | |||
| 827270f597 | |||
| da1172f268 | |||
| 21526c830a | |||
| ecdbf602d9 | |||
| c192807ea7 | |||
| 817f324a13 | |||
| c8f3f9b06b | |||
| d119620775 | |||
| 863b23408c | |||
| f6b51a43a2 | |||
| c09fa80aca | |||
| 7ade369d3e | |||
| c6f5a9b984 | |||
| b43a2ff6cc | |||
| e7914b3b7a | |||
| f8f08b8d46 | |||
| 450b60114c | |||
| 534e7f6acd | |||
| 23058f4e1c | |||
| 16e79e3bc5 | |||
| 8e7b8bb95c | |||
| ce04079e62 | |||
| ee18592d0f | |||
| 549db6db29 | |||
| c57722a10f | |||
| a18ee8efa5 | |||
| 6995f7fb7e | |||
| d0aeb0072c | |||
| 5e86165add | |||
| b4b0ec400b | |||
| 2b2061df1d | |||
| 7895ca9e8f | |||
| 9b25481ac8 | |||
| 704e2a0894 | |||
| 01b30ee264 | |||
| 519192a2b8 | |||
| 44a6ffef17 | |||
| a836552002 | |||
| faeb40f7c4 | |||
| f09e7ab08c | |||
| 0d65535a49 | |||
| e674c8b9c7 | |||
| 954100837b | |||
| 809904f268 | |||
| 39ffc159eb | |||
| 0f708da558 | |||
| cbbfe23b81 | |||
| cd2f3a3a5c | |||
| 03532e0d20 | |||
| 0cb233c412 | |||
| 8d4c3cc7d6 | |||
| a2843c2352 | |||
| 1c52b10253 | |||
| 0960281a15 | |||
| 891cf5584c | |||
| 0dfbf04a75 | |||
| 0185fdf67e | |||
| aec4a0f301 | |||
| cdde244b46 | |||
| 63fae9d658 | |||
| 803a8be664 | |||
| 43eed0a3ba | |||
| f1677c439a | |||
| 8803f55af9 | |||
| 3e3b80e5c1 | |||
| bae3f3950a | |||
| c6035b97e6 | |||
| 5b53e4e6e8 | |||
| 7ce44fc213 | |||
| cef7692b91 | |||
| 5a3b472a50 | |||
| eaf4275c61 | |||
| a5a3991c22 | |||
| dd5aff7029 | |||
| 71e23c2304 | |||
| d7e37c7b56 | |||
| 7777457d50 | |||
| 670d4d5029 | |||
| 7a9822f533 | |||
| e26020a782 | |||
| b9d8262153 | |||
| 0767d8a8bb | |||
| 288af2017a | |||
| 6f50bbc49d | |||
| 4358d99cb0 | |||
| 6a7fc39328 | |||
| 4f9ff68348 | |||
| aed5fa9949 | |||
| 77d5bf7b80 | |||
| 6671008f35 | |||
| 0596637103 | |||
| 70d7e52335 | |||
| afa1569043 | |||
| 292aea9404 | |||
| 8a9558f06f | |||
| bac69f84de | |||
| 78b6d375a7 | |||
| 17f6ae8dbb | |||
| 23e75246cb | |||
| 6600277899 | |||
| 4520906847 | |||
| e27b8977b4 | |||
| 2ed4a27395 | |||
| 83e3ee4b6c | |||
| 50fba1d79f | |||
| 9572d48a03 | |||
| 51d8d9f6be | |||
| b0e70a45d0 | |||
| 4b61796e41 | |||
| 4844c47f6a | |||
| 968edbe972 | |||
| 69d72805be | |||
| 1eba2f9cc5 | |||
| 6641c154ac | |||
| 6fdfca7d38 | |||
| 4a3510bbf9 | |||
| 62427b821f | |||
| 4a16dd2717 | |||
| 9a15c9fb1e | |||
| 86fb16b3b8 | |||
| db5bab4b99 | |||
| aff71f6147 | |||
| 275e1cb92b | |||
| a3ee4eb038 | |||
| af7369b6b0 | |||
| 06562ff825 | |||
| 9a6339df8d | |||
| 8c22a6d531 | |||
| b49cda6f03 | |||
| 3fbb14a5cf | |||
| 372c7e5740 | |||
| 70e103d1b9 | |||
| 6b4635c403 | |||
| b2724beb09 | |||
| a6daa83472 | |||
| 7f9306dec9 | |||
| 9ad0c6a23c | |||
| 3fdea479bd | |||
| 4a2994c9d7 | |||
| bc707a8f67 | |||
| 38aa3f34d8 | |||
| 2555c89f91 | |||
| 597d89ead2 | |||
| bafd8ea248 | |||
| 4f9ce0c88d | |||
| 5c899afa22 | |||
| 1562d2b1ab | |||
| 8bde5765ab | |||
| 2fbbd52a0e | |||
| 10d71f2365 | |||
| 7db8d06fbf | |||
| ebde55caab | |||
| 0e63ef5f89 | |||
| a9a49a55b7 | |||
| 71f20dd7b6 | |||
| b267aee59c | |||
| b7a5fe292b | |||
| 33640c6bf3 | |||
| f7585c91af | |||
| 9b902b614d | |||
| 7218c1ba66 | |||
| 19dd79f771 | |||
| e9d6adeab1 | |||
| 3a894a9a5f | |||
| 8cbf7d89aa | |||
| 424e529aba | |||
| d73b792b6c | |||
| b39dd26509 | |||
| 7e088fd0ec | |||
| 415b79eabc | |||
| 3ea25dc783 | |||
| 6d2a97d97c | |||
| f94d5a9530 | |||
| f9dcab79b2 | |||
| 3644e4d51a | |||
| d1ae2658f9 | |||
| ae53d6cbbc | |||
| c6c6be7ae0 | |||
| 1533e730ae | |||
| b98298ab98 | |||
| cf6006d528 | |||
| ccf09ceddf | |||
| bb1977b17a | |||
| 476e8dd7d1 | |||
| ecedcaa5a3 | |||
| 07eee8a2a1 | |||
| e45cfb0ee3 | |||
| 231f4c3573 | |||
| 40af610e8f |
@@ -0,0 +1,15 @@
|
||||
BasedOnStyle: WebKit
|
||||
Standard: Cpp03
|
||||
AlignAfterOpenBracket: false
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
BreakBeforeBraces: Allman
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 80
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 0
|
||||
IndentCaseLabels: false
|
||||
SortIncludes: false
|
||||
AlignTrailingComments: false
|
||||
|
||||
SpacesInAngles: true
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
# Use, modification, and distribution are
|
||||
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE.txt)
|
||||
#
|
||||
# Copyright Rene Rivera 2020.
|
||||
|
||||
# For Drone CI we use the Starlark scripting language to reduce duplication.
|
||||
# As the yaml syntax for Drone CI is rather limited.
|
||||
#
|
||||
#
|
||||
globalenv={}
|
||||
linuxglobalimage="cppalliance/droneubuntu1604:1"
|
||||
windowsglobalimage="cppalliance/dronevs2019"
|
||||
|
||||
def main(ctx):
|
||||
return [
|
||||
linux_cxx("g++-4.4 98", "g++", packages="g++-4.4", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.4', 'CXXSTD': '98', }, globalenv=globalenv),
|
||||
linux_cxx("g++-4.4 0x", "g++", packages="g++-4.4", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.4', 'CXXSTD': '0x', }, globalenv=globalenv),
|
||||
linux_cxx("g++-4.6 03", "g++", packages="g++-4.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.6', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("g++-4.6 0x", "g++", packages="g++-4.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.6', 'CXXSTD': '0x', }, globalenv=globalenv),
|
||||
linux_cxx("g++-4.7 03", "g++-4.7", packages="g++-4.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("g++-4.7 11", "g++-4.7", packages="g++-4.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("g++-4.8 03", "g++-4.8", packages="g++-4.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("g++-4.8 11", "g++-4.8", packages="g++-4.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("g++-4.9 03", "g++-4.9", packages="g++-4.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("g++-4.9 11", "g++-4.9", packages="g++-4.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("g++-5 03", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("g++-5 11", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("g++-5 14", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("g++-5 1z", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("g++-6 03", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("g++-6 11", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("g++-6 14", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("g++-6 1z", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("g++-7 03", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("g++-7 11", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("g++-7 14", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("g++-7 17", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '17', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("g++-8 03", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("g++-8 11", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("g++-8 14", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("g++-8 17", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '17', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("g++-9 03", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("g++-9 11", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("g++-9 14", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("g++-9 17", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '17', }, globalenv=globalenv),
|
||||
linux_cxx("g++-9 2a", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '2a', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("g++-10 11", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("g++-10 14", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("g++-10 17", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '17', }, globalenv=globalenv),
|
||||
linux_cxx("g++-10 20", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '20', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-3.5 03", "clang++", packages="clang-3.5", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-3.5 11", "clang++", packages="clang-3.5", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
#linux_cxx("clang++-3.5 14", "clang++", packages="clang-3.5", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
#linux_cxx("clang++-3.5 1z", "clang++", packages="clang-3.5", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-3.6 03", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-3.6 11", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
#linux_cxx("clang++-3.6 14", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
#linux_cxx("clang++-3.6 1z", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-3.7 03", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-3.7 11", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
#linux_cxx("clang++-3.7 14", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
#linux_cxx("clang++-3.7 1z", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-3.8 03", "clang++-3.8", packages="clang-3.8", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-3.8 11", "clang++-3.8", packages="clang-3.8", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
# These have issues not of our making:
|
||||
#linux_cxx("clang++-3.8 14", "clang++-3.8", packages="clang-3.8", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
#linux_cxx("clang++-3.8 1z", "clang++-3.8", packages="clang-3.8", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-3.9 03", "clang++-3.9", packages="clang-3.9", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-3.9 11", "clang++-3.9", packages="clang-3.9", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
# These have issues not of our making:
|
||||
#linux_cxx("clang++-3.9 14", "clang++-3.9", packages="clang-3.9", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
#linux_cxx("clang++-3.9 1z", "clang++-3.9", packages="clang-3.9", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-4.0 03", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-4.0 11", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-4.0 14", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-4.0 1z", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-5.0 03", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-5.0 11", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-5.0 14", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-5.0 1z", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-6.0 03", "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-6.0 11", "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-6.0 14", "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-6.0 1z", "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-7 03", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-7 14", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-7 17", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-7 1z", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-8 03", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-8 11", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-8 14", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-8 17", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '17', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-8 2a", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '2a', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-9 03", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-9 11", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-9 14", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-9 17", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '17', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-9 2a", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '2a', }, globalenv=globalenv),
|
||||
|
||||
linux_cxx("clang++-10 03", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-10 11", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-10 14", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-10 17", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '17', }, globalenv=globalenv),
|
||||
linux_cxx("clang++-10 20", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '20', }, globalenv=globalenv),
|
||||
|
||||
osx_cxx("XCode-11.7 03", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
osx_cxx("XCode-11.7 11", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
osx_cxx("XCode-11.7 14", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
osx_cxx("XCode-11.7 17", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '17', }, globalenv=globalenv),
|
||||
osx_cxx("XCode-11.7 2a", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '2a', }, globalenv=globalenv),
|
||||
|
||||
# We don't support these old versions of Xcode any more, but you are welcome to take up the challenge for doing so if you need them.
|
||||
|
||||
# osx_cxx("XCode-10.2 03", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-10.2 11", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-10.2 14", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-10.2 17", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '17', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-10.2 2a", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '2a', }, globalenv=globalenv),
|
||||
|
||||
# osx_cxx("XCode-9.4 03", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-9.4 11", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-9.4 14", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-9.4 1z", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
# osx_cxx("XCode-9.0 03", "clang++", packages="", buildtype="boost", xcode_version="9", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-9.0 11", "clang++", packages="", buildtype="boost", xcode_version="9", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-9.0 14", "clang++", packages="", buildtype="boost", xcode_version="9", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-9.0 1z", "clang++", packages="", buildtype="boost", xcode_version="9", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
# osx_cxx("XCode-8.3 03", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-8.3 11", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-8.3 14", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-8.3 1z", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
# osx_cxx("XCode-8.0 03", "clang++", packages="", buildtype="boost", xcode_version="8", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-8.0 11", "clang++", packages="", buildtype="boost", xcode_version="8", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-8.0 14", "clang++", packages="", buildtype="boost", xcode_version="8", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-8.0 1z", "clang++", packages="", buildtype="boost", xcode_version="8", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z', }, globalenv=globalenv),
|
||||
|
||||
# osx_cxx("XCode-7.3 03", "clang++", packages="", buildtype="boost", xcode_version="7.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
|
||||
# osx_cxx("XCode-7.3 11", "clang++", packages="", buildtype="boost", xcode_version="7.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
|
||||
]
|
||||
|
||||
# from https://github.com/boostorg/boost-ci
|
||||
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
export TRAVIS_BUILD_DIR=$(pwd)
|
||||
export DRONE_BUILD_DIR=$(pwd)
|
||||
export TRAVIS_BRANCH=$DRONE_BRANCH
|
||||
export VCS_COMMIT_ID=$DRONE_COMMIT
|
||||
export GIT_COMMIT=$DRONE_COMMIT
|
||||
export PATH=~/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
echo '==================================> BEFORE_INSTALL'
|
||||
|
||||
. .drone/before-install.sh
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
cd ..
|
||||
git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
git submodule update --init tools/build
|
||||
git submodule update --init libs/config
|
||||
git submodule update --init tools/boost_install
|
||||
git submodule update --init libs/headers
|
||||
git submodule update --init tools/boostdep
|
||||
cp -r $TRAVIS_BUILD_DIR/* libs/graph
|
||||
python tools/boostdep/depinst/depinst.py graph
|
||||
./bootstrap.sh
|
||||
./b2 headers
|
||||
|
||||
echo '==================================> BEFORE_SCRIPT'
|
||||
|
||||
. $DRONE_BUILD_DIR/.drone/before-script.sh
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
echo "using $TOOLSET : : $COMPILER : $OPTIONS ;" > ~/user-config.jam
|
||||
(cd libs/config/test && ../../../b2 cxxstd=$CXXSTD config_info_travis_install toolset=$TOOLSET && ./config_info_travis)
|
||||
(cd libs/graph/test && ../../../b2 -j3 cxxstd=$CXXSTD toolset=$TOOLSET define=CI_SUPPRESS_KNOWN_ISSUES)
|
||||
|
||||
echo '==================================> AFTER_SUCCESS'
|
||||
|
||||
. $DRONE_BUILD_DIR/.drone/after-success.sh
|
||||
@@ -0,0 +1,266 @@
|
||||
# Copyright 2020 Evan Miller
|
||||
# Copyright 2020 Matt Borland
|
||||
# Copyright 2021 John Maddock
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
name: CI
|
||||
on: [ push, pull_request ]
|
||||
jobs:
|
||||
ubuntu-focal:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Removed g++-10 because of an ICE; meant to be fixed in 10.2?
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94938
|
||||
compiler: [ g++-9, clang++-10 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- uses: mstachniuk/ci-skip@v1
|
||||
with:
|
||||
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
|
||||
commit-filter-separator: ';'
|
||||
fail-fast: true
|
||||
- name: Set TOOLSET
|
||||
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
|
||||
- name: Add repository
|
||||
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
||||
- name: Install packages
|
||||
run: sudo apt install g++-9 clang-10
|
||||
- name: Checkout main boost
|
||||
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
||||
- name: Update tools/boostdep
|
||||
run: git submodule update --init tools/boostdep
|
||||
working-directory: ../boost-root
|
||||
- name: Copy files
|
||||
run: cp -r $GITHUB_WORKSPACE/* libs/graph
|
||||
working-directory: ../boost-root
|
||||
- name: Install deps
|
||||
run: python tools/boostdep/depinst/depinst.py graph
|
||||
working-directory: ../boost-root
|
||||
- name: Bootstrap
|
||||
run: ./bootstrap.sh
|
||||
working-directory: ../boost-root
|
||||
- name: Generate headers
|
||||
run: ./b2 headers
|
||||
working-directory: ../boost-root
|
||||
- name: Generate user config
|
||||
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
|
||||
working-directory: ../boost-root
|
||||
- name: Config info
|
||||
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17,2a
|
||||
working-directory: ../boost-root/libs/config/test
|
||||
- name: Test
|
||||
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17,2a
|
||||
working-directory: ../boost-root/libs/graph/test
|
||||
ubuntu-bionic:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
compiler: [ g++-7, g++-8, clang++-7, clang++-8 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- uses: mstachniuk/ci-skip@v1
|
||||
with:
|
||||
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
|
||||
commit-filter-separator: ';'
|
||||
fail-fast: true
|
||||
- name: Set TOOLSET
|
||||
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
|
||||
- name: Add repository
|
||||
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
||||
- name: Install packages
|
||||
run: sudo apt install g++-7 g++-8 clang-7 clang-8
|
||||
- name: Checkout main boost
|
||||
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
||||
- name: Update tools/boostdep
|
||||
run: git submodule update --init tools/boostdep
|
||||
working-directory: ../boost-root
|
||||
- name: Copy files
|
||||
run: cp -r $GITHUB_WORKSPACE/* libs/graph
|
||||
working-directory: ../boost-root
|
||||
- name: Install deps
|
||||
run: python tools/boostdep/depinst/depinst.py graph
|
||||
working-directory: ../boost-root
|
||||
- name: Bootstrap
|
||||
run: ./bootstrap.sh
|
||||
working-directory: ../boost-root
|
||||
- name: Generate headers
|
||||
run: ./b2 headers
|
||||
working-directory: ../boost-root
|
||||
- name: Generate user config
|
||||
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
|
||||
working-directory: ../boost-root
|
||||
- name: Config info install
|
||||
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17
|
||||
working-directory: ../boost-root/libs/config/test
|
||||
- name: Test
|
||||
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17
|
||||
working-directory: ../boost-root/libs/graph/test
|
||||
macos:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolset: [ clang ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- uses: mstachniuk/ci-skip@v1
|
||||
with:
|
||||
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[linux];[Linux];[LINUX]'
|
||||
commit-filter-separator: ';'
|
||||
fail-fast: true
|
||||
- name: Checkout main boost
|
||||
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
||||
- name: Update tools/boostdep
|
||||
run: git submodule update --init tools/boostdep
|
||||
working-directory: ../boost-root
|
||||
- name: Copy files
|
||||
run: cp -r $GITHUB_WORKSPACE/* libs/graph
|
||||
working-directory: ../boost-root
|
||||
- name: Install deps
|
||||
run: python tools/boostdep/depinst/depinst.py graph
|
||||
working-directory: ../boost-root
|
||||
- name: Bootstrap
|
||||
run: ./bootstrap.sh
|
||||
working-directory: ../boost-root
|
||||
- name: Generate headers
|
||||
run: ./b2 headers
|
||||
working-directory: ../boost-root
|
||||
- name: Config info
|
||||
run: ../../../b2 print_config_info toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a
|
||||
working-directory: ../boost-root/libs/config/test
|
||||
- name: Test
|
||||
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a define=CI_SUPPRESS_KNOWN_ISSUES
|
||||
working-directory: ../boost-root/libs/graph/test
|
||||
windows_msvc_14_0:
|
||||
runs-on: windows-2019
|
||||
defaults:
|
||||
run:
|
||||
shell: cmd
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolset: [ msvc-14.0 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- uses: mstachniuk/ci-skip@v1
|
||||
with:
|
||||
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
|
||||
commit-filter-separator: ';'
|
||||
fail-fast: true
|
||||
- name: Checkout main boost
|
||||
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
||||
- name: Update tools/boostdep
|
||||
run: git submodule update --init tools/boostdep
|
||||
working-directory: ../boost-root
|
||||
- name: Copy files
|
||||
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\graph
|
||||
working-directory: ../boost-root
|
||||
- name: Install deps
|
||||
run: python tools/boostdep/depinst/depinst.py graph
|
||||
working-directory: ../boost-root
|
||||
- name: Bootstrap
|
||||
run: bootstrap
|
||||
working-directory: ../boost-root
|
||||
- name: Generate headers
|
||||
run: b2 headers
|
||||
working-directory: ../boost-root
|
||||
- name: Config info
|
||||
run: ..\..\..\b2 print_config_info cxxstd=14,17 address-model=64 toolset=msvc-14.0
|
||||
working-directory: ../boost-root/libs/config/test
|
||||
- name: Test
|
||||
run: ..\..\..\b2 --hash address-model=64 cxxstd=14,17 toolset=msvc-14.0
|
||||
working-directory: ../boost-root/libs/graph/test
|
||||
windows_msvc_14_2:
|
||||
runs-on: windows-2019
|
||||
defaults:
|
||||
run:
|
||||
shell: cmd
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolset: [ msvc-14.2 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- uses: mstachniuk/ci-skip@v1
|
||||
with:
|
||||
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
|
||||
commit-filter-separator: ';'
|
||||
fail-fast: true
|
||||
- name: Checkout main boost
|
||||
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
||||
- name: Update tools/boostdep
|
||||
run: git submodule update --init tools/boostdep
|
||||
working-directory: ../boost-root
|
||||
- name: Copy files
|
||||
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\graph
|
||||
working-directory: ../boost-root
|
||||
- name: Install deps
|
||||
run: python tools/boostdep/depinst/depinst.py graph
|
||||
working-directory: ../boost-root
|
||||
- name: Bootstrap
|
||||
run: bootstrap
|
||||
working-directory: ../boost-root
|
||||
- name: Generate headers
|
||||
run: b2 headers
|
||||
working-directory: ../boost-root
|
||||
- name: Config info
|
||||
run: ..\..\..\b2 print_config_info cxxstd=14,17,20 address-model=64 toolset=msvc-14.2
|
||||
working-directory: ../boost-root/libs/config/test
|
||||
- name: Test
|
||||
run: ..\..\..\b2 --hash address-model=64 cxxstd=14,17,20 toolset=msvc-14.2
|
||||
working-directory: ../boost-root/libs/graph/test
|
||||
windows_msvc_14_3:
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
run:
|
||||
shell: cmd
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolset: [ msvc-14.3 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- uses: mstachniuk/ci-skip@v1
|
||||
with:
|
||||
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
|
||||
commit-filter-separator: ';'
|
||||
fail-fast: true
|
||||
- name: Checkout main boost
|
||||
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
||||
- name: Update tools/boostdep
|
||||
run: git submodule update --init tools/boostdep
|
||||
working-directory: ../boost-root
|
||||
- name: Copy files
|
||||
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\graph
|
||||
working-directory: ../boost-root
|
||||
- name: Install deps
|
||||
run: python tools/boostdep/depinst/depinst.py graph
|
||||
working-directory: ../boost-root
|
||||
- name: Bootstrap
|
||||
run: bootstrap
|
||||
working-directory: ../boost-root
|
||||
- name: Generate headers
|
||||
run: b2 headers
|
||||
working-directory: ../boost-root
|
||||
- name: Config info
|
||||
run: ..\..\..\b2 print_config_info cxxstd=14,17,20 address-model=64 toolset=msvc-14.3
|
||||
working-directory: ../boost-root/libs/config/test
|
||||
- name: Test
|
||||
run: ..\..\..\b2 --hash address-model=64 cxxstd=14,17,20 toolset=msvc-14.3
|
||||
working-directory: ../boost-root/libs/graph/test
|
||||
@@ -0,0 +1,8 @@
|
||||
cube-fr.dot
|
||||
cube.dot
|
||||
disconnected-fr.dot
|
||||
graphml_test_out.xml
|
||||
kevin-bacon2.dat
|
||||
random.dot
|
||||
triangular-fr.dot
|
||||
triangular-kk.dot
|
||||
@@ -0,0 +1,80 @@
|
||||
# Copyright 2020, 2021 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
project(boost_graph VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
add_library(boost_graph
|
||||
src/graphml.cpp
|
||||
src/read_graphviz_new.cpp
|
||||
)
|
||||
|
||||
add_library(Boost::graph ALIAS boost_graph)
|
||||
|
||||
target_include_directories(boost_graph PUBLIC include)
|
||||
|
||||
target_link_libraries(boost_graph
|
||||
PUBLIC
|
||||
Boost::algorithm
|
||||
Boost::any
|
||||
Boost::array
|
||||
Boost::assert
|
||||
Boost::bimap
|
||||
Boost::bind
|
||||
Boost::concept_check
|
||||
Boost::config
|
||||
Boost::container_hash
|
||||
Boost::conversion
|
||||
Boost::core
|
||||
Boost::detail
|
||||
Boost::foreach
|
||||
Boost::function
|
||||
Boost::integer
|
||||
Boost::iterator
|
||||
Boost::lexical_cast
|
||||
Boost::math
|
||||
Boost::move
|
||||
Boost::mpl
|
||||
Boost::multi_index
|
||||
Boost::optional
|
||||
Boost::parameter
|
||||
Boost::preprocessor
|
||||
Boost::property_map
|
||||
Boost::property_tree
|
||||
Boost::random
|
||||
Boost::range
|
||||
Boost::serialization
|
||||
Boost::smart_ptr
|
||||
Boost::spirit
|
||||
Boost::static_assert
|
||||
Boost::throw_exception
|
||||
Boost::tti
|
||||
Boost::tuple
|
||||
Boost::type_traits
|
||||
Boost::typeof
|
||||
Boost::unordered
|
||||
Boost::utility
|
||||
Boost::xpressive
|
||||
PRIVATE
|
||||
Boost::regex
|
||||
)
|
||||
|
||||
target_compile_definitions(boost_graph
|
||||
PUBLIC BOOST_GRAPH_NO_LIB
|
||||
# Source files already define BOOST_GRAPH_SOURCE
|
||||
# PRIVATE BOOST_GRAPH_SOURCE
|
||||
)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(boost_graph PUBLIC BOOST_GRAPH_DYN_LINK)
|
||||
else()
|
||||
target_compile_definitions(boost_graph PUBLIC BOOST_GRAPH_STATIC_LINK)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
endif()
|
||||
@@ -1,100 +0,0 @@
|
||||
COPYRIGHT NOTICE:
|
||||
|
||||
Copyright 1997-2000, University of Notre Dame.
|
||||
Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
|
||||
|
||||
The Boost Graph Library "Artistic License"
|
||||
|
||||
Preamble
|
||||
|
||||
The intent of this document is to state the conditions under which a
|
||||
Package may be copied, such that the Copyright Holder maintains some
|
||||
semblance of artistic control over the development of the package,
|
||||
while giving the users of the package the right to use and distribute
|
||||
the Package in a more-or-less free fashion, plus the right to make
|
||||
reasonable modifications.
|
||||
|
||||
Definitions
|
||||
|
||||
"Package" refers to the collection of files distributed by the
|
||||
Copyright Holder, and derivatives of that collection of files created
|
||||
through textual modification.
|
||||
|
||||
"Standard Version" refers to such a Package if it has not been
|
||||
modified, or has been modified in accordance with the wishes of the
|
||||
Copyright Holder as specified below.
|
||||
|
||||
"Copyright Holder" is whoever is named in the copyright or copyrights for the package.
|
||||
|
||||
"You" is you, if you're thinking about copying or distributing this Package.
|
||||
|
||||
"Reasonable copying fee" is whatever you can justify on the basis of
|
||||
media cost, duplication charges, time of people involved, and so
|
||||
on. (You will not be required to justify it to the Copyright Holder,
|
||||
but only to the computing community at large as a market that must
|
||||
bear the fee.)
|
||||
|
||||
"Freely Available" means that no fee is charged for the item itself,
|
||||
though there may be fees involved in handling the item. It also means
|
||||
that recipients of the item may redistribute it under the same
|
||||
conditions they received it.
|
||||
|
||||
1. You may make and give away verbatim copies of the source form of
|
||||
the Standard Version of this Package without restriction, provided
|
||||
that you duplicate all of the original copyright notices and
|
||||
associated disclaimers.
|
||||
|
||||
2. You may apply bug fixes, portability fixes and other modifications
|
||||
derived from the Public Domain or from the Copyright Holder. A Package
|
||||
modified in such a way shall still be considered the Standard Version.
|
||||
|
||||
3. You may otherwise modify your copy of this Package in any way,
|
||||
provided that you insert a prominent notice in each changed file
|
||||
stating how and when you changed that file, and provided that you do
|
||||
at least ONE of the following:
|
||||
|
||||
a. place your modifications in the Public Domain or otherwise make
|
||||
them Freely Available, such as by posting said modifications to Usenet
|
||||
or an equivalent medium, or placing the modifications on a major
|
||||
archive site such as uunet.uu.net, or by allowing the Copyright Holder
|
||||
to include your modifications in the Standard Version of the Package.
|
||||
b. use the modified Package only within your corporation or organization.
|
||||
c. rename any non-standard types and functions so the names do not
|
||||
conflict with Standard Vibrary, which must also be provided, and
|
||||
provide a separate documentation for each non-standard type of function
|
||||
that clearly documents how it differs from the Standard Version.
|
||||
d. make other distribution arrangements with the Copyright Holder.
|
||||
|
||||
4. You may charge a reasonable copying fee for any distribution of this
|
||||
Package. You may charge any fee you choose for support of this
|
||||
Package. You may not charge a fee for this Package itself. However,
|
||||
you may distribute this Package in aggregate with other (possibly
|
||||
commercial) programs as part of a larger (possibly commercial)
|
||||
software distribution provided that you do not advertise this Package
|
||||
as a product of your own.
|
||||
|
||||
5. The name of the Copyright Holder may not be used to endorse or
|
||||
promote products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
DISCLAIMER:
|
||||
|
||||
LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
|
||||
By way of example, but not limitation, Licensor MAKES NO
|
||||
REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
|
||||
PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
|
||||
OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
|
||||
OR OTHER RIGHTS.
|
||||
|
||||
The Authors and the University of Notre Dame du Lac shall not be held
|
||||
liable for any liability nor for any direct, indirect or consequential
|
||||
damages with respect to any claim by LICENSEE or any third party on
|
||||
account of or arising from this Agreement or use of this software.
|
||||
|
||||
Any disputes arising out of this Agreement or LICENSEE'S use of the
|
||||
software at any time shall be resolved by the courts of the state of
|
||||
Indiana. LICENSEE hereby consents to the jurisdiction of the Indiana
|
||||
courts and waives the right to challenge the jurisdiction thereof in
|
||||
any dispute arising out of this Agreement or Licensee's use of the
|
||||
software.
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
Boost Graph Library [](https://drone.cpp.al/boostorg/graph)[](https://github.com/boostorg/graph/actions)
|
||||
|
||||
===================
|
||||
|
||||
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 [Github issue page](https://github.com/boostorg/graph/issues).
|
||||
|
||||
See also:
|
||||
|
||||
* [Current open issues](https://github.com/boostorg/graph/issues)
|
||||
* [Closed issues](https://github.com/boostorg/graph/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed)
|
||||
* Old issues still open on [Trac](https://svn.boost.org/trac/boost/query?status=!closed&component=graph&desc=1&order=id)
|
||||
* Closed issues on [Trac](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)
|
||||
|
||||
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 ##
|
||||
|
||||
| | Master | Develop |
|
||||
|------------------|----------|-------------|
|
||||
| Github Actions | [](https://github.com/boostorg/graph/actions) | [](https://github.com/boostorg/graph/actions) |
|
||||
|Drone | [](https://drone.cpp.al/boostorg/graph) | [](https:/drone.cpp.al/boostorg/graph) |
|
||||
|
||||
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).
|
||||
+10
-36
@@ -4,52 +4,26 @@
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
import mpi ;
|
||||
|
||||
project boost/graph
|
||||
: requirements <include>../src
|
||||
: source-location ../src
|
||||
;
|
||||
|
||||
local optional_sources ;
|
||||
local optional_reqs ;
|
||||
|
||||
if [ modules.peek : EXPAT_INCLUDE ] && [ modules.peek : EXPAT_LIBPATH ]
|
||||
{
|
||||
local EXPAT_INCLUDE = [ modules.peek : EXPAT_INCLUDE ] ;
|
||||
local EXPAT_LIBPATH = [ modules.peek : EXPAT_LIBPATH ] ;
|
||||
|
||||
if --debug-configuration in [ modules.peek : ARGV ]
|
||||
{
|
||||
ECHO "Expat include directory: $(EXPAT_INCLUDE)" ;
|
||||
ECHO "Expat library directory: $(EXPAT_LIBPATH)" ;
|
||||
}
|
||||
|
||||
optional_sources += graphml.cpp ;
|
||||
optional_reqs += <include>$(EXPAT_INCLUDE)
|
||||
<library-path>$(EXPAT_LIBPATH)
|
||||
<find-static-library>expat
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
ECHO "warning: Graph library does not contain optional GraphML reader." ;
|
||||
ECHO "note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH to the" ;
|
||||
ECHO "note: directories containing the Expat headers and libraries, respectively." ;
|
||||
}
|
||||
|
||||
lib boost_graph
|
||||
:
|
||||
read_graphviz_spirit.cpp
|
||||
$(optional_sources)
|
||||
read_graphviz_new.cpp
|
||||
graphml.cpp
|
||||
:
|
||||
<define>BOOST_GRAPH_NO_LIB=1
|
||||
<library>../../regex/build//boost_regex
|
||||
<link>shared:<define>BOOST_GRAPH_DYN_LINK=1
|
||||
# # Intel compiler ICEs if we turn optimization on
|
||||
<toolset>intel-vc71-win-9.1:<optimization>off
|
||||
# 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>msvc-8.0:<cxxflags>-GR-
|
||||
# Requirements for any "optional" sources
|
||||
$(optional_reqs)
|
||||
<toolset>sun:<build>no
|
||||
:
|
||||
:
|
||||
;
|
||||
|
||||
boost-install boost_graph ;
|
||||
boost-install boost_graph ;
|
||||
|
||||
+14
-14
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) 2004 Kris Beevers
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) 2004 Kris Beevers
|
||||
|
||||
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: AStarHeuristic</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -32,7 +32,7 @@ href="./astar_search.html">astar_search()</a>.
|
||||
|
||||
<h3>Refinement of</h3>
|
||||
|
||||
<a href="http://www.sgi.com/tech/stl/UnaryFunction.html">Unary
|
||||
<a href="http://www.boost.org/sgi/stl/UnaryFunction.html">Unary
|
||||
Function</a> (must take a single argument -- a graph vertex -- and
|
||||
return a cost value) and <a
|
||||
href="../../utility/CopyConstructible.html">Copy Constructible</a>
|
||||
@@ -116,7 +116,7 @@ Called for the target of every out edge of a vertex being examined.
|
||||
struct AStarHeuristicConcept {
|
||||
void constraints()
|
||||
{
|
||||
function_requires< CopyConstructibleConcept<Heuristic> >();
|
||||
BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Heuristic> ));
|
||||
h(u);
|
||||
}
|
||||
Heuristic h;
|
||||
@@ -128,11 +128,11 @@ Called for the target of every out edge of a vertex being examined.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://www.cs.rpi.edu/~beevek/">Kristopher Beevers</A>,
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
|
||||
Rensselaer Polytechnic Institute (<A
|
||||
HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+19
-19
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) 2004 Kris Beevers
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) 2004 Kris Beevers
|
||||
|
||||
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: AStarVisitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -49,7 +49,7 @@ taken during the graph search.
|
||||
|
||||
<TR>
|
||||
<TD><tt>g</tt></TD>
|
||||
<TD>An object of type <tt>G</tt>.</TD>
|
||||
<TD>An object of type <tt>const G&</tt>.</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
@@ -70,7 +70,7 @@ taken during the graph search.
|
||||
<TR>
|
||||
<TD><tt>WeightMap</tt></TD>
|
||||
<TD>A type that is a model of <a
|
||||
href="../../property_map/ReadablePropertyMap.html">Readable Property
|
||||
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
|
||||
Map</a>.</TD>
|
||||
</TR>
|
||||
|
||||
@@ -118,7 +118,7 @@ OPEN list.
|
||||
<td><tt>vis.examine_vertex(u, g)</tt></td>
|
||||
<td><tt>void</tt></td>
|
||||
<td>
|
||||
This is invoked on a vertex as it is popped from the queue (i.e. it
|
||||
This is invoked on a vertex as it is popped from the queue (i.e., it
|
||||
has the lowest cost on the OPEN list). This happens immediately before
|
||||
<tt>examine_edge()</tt> is invoked on each of the out-edges of vertex
|
||||
<tt>u</tt>.
|
||||
@@ -160,7 +160,7 @@ assert(compare(combine(d_u, w_e), d_s));
|
||||
<td><tt>vis.edge_not_relaxed(e, g)</tt></td>
|
||||
<td><tt>void</tt></td>
|
||||
<td>
|
||||
Upon examination, if an edge is not relaxed (see above), then this
|
||||
Upon examination, if an edge is not relaxed (see above) then this
|
||||
method is invoked.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -171,7 +171,7 @@ method is invoked.
|
||||
<td><tt>void</tt></td>
|
||||
<td>
|
||||
This is invoked when a vertex that is on the CLOSED list is
|
||||
``rediscovered'' via a more efficient path, and is re-added to the
|
||||
``rediscovered'' via a more efficient path and is re-added to the
|
||||
OPEN list.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -181,8 +181,8 @@ OPEN list.
|
||||
<td><tt>vis.finish_vertex(u, g)</tt></td>
|
||||
<td><tt>void</tt></td>
|
||||
<td>
|
||||
This is invoked on a vertex when it is added to the CLOSED list, which
|
||||
happens after all of its out edges have been examined.
|
||||
This is invoked on a vertex when it is added to the CLOSED list. This
|
||||
happens after all of its out-edges have been examined.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -203,11 +203,11 @@ happens after all of its out edges have been examined.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://www.cs.rpi.edu/~beevek/">Kristopher Beevers</A>,
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
|
||||
Rensselaer Polytechnic Institute (<A
|
||||
HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+34
-34
@@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<!-- Copyright 2007 Aaron Windsor
|
||||
--
|
||||
-- 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)
|
||||
--
|
||||
|
||||
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)
|
||||
|
||||
-->
|
||||
<title>AddEdgeVisitor Concept</title>
|
||||
</head>
|
||||
<body alink="#ff0000"
|
||||
bgcolor="#ffffff"
|
||||
link="#0000ee"
|
||||
text="#000000"
|
||||
vlink="#551a8b">
|
||||
<body alink="#ff0000"
|
||||
bgcolor="#ffffff"
|
||||
link="#0000ee"
|
||||
text="#000000"
|
||||
vlink="#551a8b">
|
||||
|
||||
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
|
||||
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
|
||||
|
||||
<br clear="">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
The AddEdgeVisitor concept exists to allow for some indirection in algorithms
|
||||
that modify graphs by adding edges. In such algorithms, it may be convenient
|
||||
to perform additional operations (such as updating an edge index map) at
|
||||
to perform additional operations (such as updating an edge index map) at
|
||||
points in the algorithm where an edge addition occurs. Replacing calls to
|
||||
to <tt>add_edge</tt> with calls to <tt>AddEdgeVisitor::visit_vertex_pair</tt>
|
||||
allows for such operations to be defined independently from the algorithm.
|
||||
@@ -38,8 +38,8 @@ allows for such operations to be defined independently from the algorithm.
|
||||
<td> is a type that models the AddEdgeVisitor concept </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> <tt>vis</tt> </td>
|
||||
<tr>
|
||||
<td> <tt>vis</tt> </td>
|
||||
<td> is an object of type Visitor </td>
|
||||
</tr>
|
||||
|
||||
@@ -48,15 +48,15 @@ allows for such operations to be defined independently from the algorithm.
|
||||
<td> is the type of a graph </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> <tt>u,v</tt> </td>
|
||||
<tr>
|
||||
<td> <tt>u,v</tt> </td>
|
||||
<td> are objects of type <tt>graph_traits<Graph>::vertex_descriptor</tt>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> <tt>e</tt> </td>
|
||||
<td> is an object of type <tt>graph_traits<Graph>::edge_descriptor</tt>
|
||||
<tr>
|
||||
<td> <tt>e</tt> </td>
|
||||
<td> is an object of type <tt>graph_traits<Graph>::edge_descriptor</tt>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -66,7 +66,7 @@ allows for such operations to be defined independently from the algorithm.
|
||||
</td>
|
||||
|
||||
</tr><tr>
|
||||
<td>
|
||||
<td>
|
||||
|
||||
</td></tr></tbody></table>
|
||||
|
||||
@@ -84,7 +84,7 @@ None
|
||||
<tbody><tr><th>Name</th><th>Expression</th><th>Return Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr><tr>
|
||||
</tr><tr>
|
||||
<td> Add an Edge </td>
|
||||
<td> <tt>vis.visit_vertex_pair(u, v, g)</tt> </td>
|
||||
<td> <tt>void</tt></td>
|
||||
@@ -96,26 +96,26 @@ None
|
||||
|
||||
</p><h3>Models</h3>
|
||||
|
||||
Two models of this concept are defined in the file
|
||||
Two models of this concept are defined in the file
|
||||
<a href="../../../boost/graph/planar_detail/add_edge_visitors.hpp">
|
||||
<tt>add_edge_visitors.hpp</tt></a>:
|
||||
|
||||
<ul>
|
||||
<li><tt>default_add_edge_visitor</tt>: The constructor of this class takes
|
||||
no arguments.<tt>visit_vertex_pair(u, v, g)</tt> is just a dispatch to
|
||||
<tt>add_edge(u, v, g)</tt>.
|
||||
<tt>add_edge(u, v, g)</tt>.
|
||||
<li><tt>edge_index_update_visitor</tt>: The constructor of this class takes
|
||||
two arguments: the first, an EdgeIndexMap,
|
||||
is a <a href="../../property_map/ReadWritePropertyMap.html">
|
||||
ReadWritePropertyMap</a> that maps each edge in the associated graph
|
||||
<tt>g</tt> to a distinct integer in the range <tt>[0, num_edges(g))</tt>.
|
||||
The second argument is the number of edges in the underlying graph, which
|
||||
is a <a href="../../property_map/doc/ReadWritePropertyMap.html">
|
||||
ReadWritePropertyMap</a> that maps each edge in the associated graph
|
||||
<tt>g</tt> to a distinct integer in the range <tt>[0, num_edges(g))</tt>.
|
||||
The second argument is the number of edges in the underlying graph, which
|
||||
serves as the "next available index" counter within the visitor.
|
||||
For example, in the case the graph used has an initialized interior
|
||||
edge index, the <tt>edge_index_update_visitor</tt> constructor should be
|
||||
called with <tt>get(edge_index, g)</tt> as the edge index and
|
||||
<tt>num_edges(g)</tt> as the next available index. When
|
||||
<tt>visit_vertex_pair(u, v, g)</tt> is called, the
|
||||
For example, in the case the graph used has an initialized interior
|
||||
edge index, the <tt>edge_index_update_visitor</tt> constructor should be
|
||||
called with <tt>get(edge_index, g)</tt> as the edge index and
|
||||
<tt>num_edges(g)</tt> as the next available index. When
|
||||
<tt>visit_vertex_pair(u, v, g)</tt> is called, the
|
||||
<tt>edge_index_update_visitor</tt> will add the edge <i>(u,v)</i> to the graph
|
||||
and update the edge index for the newly created edge.
|
||||
</ul>
|
||||
@@ -125,6 +125,6 @@ and update the edge index for the newly created edge.
|
||||
<br>
|
||||
</p><hr>
|
||||
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
|
||||
aaron.windsor@gmail.com</a>)
|
||||
aaron.windsor@gmail.com</a>)
|
||||
|
||||
</body></html>
|
||||
</body></html>
|
||||
|
||||
+13
-14
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>AdjacencyGraph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
AdjacencyGraph
|
||||
</H2>
|
||||
|
||||
The AdjacencyGraph concept provides and interface for efficient access
|
||||
The AdjacencyGraph concept provides an interface for efficient access
|
||||
of the adjacent vertices to a vertex in a graph. This is quite similar
|
||||
to the <a href="./IncidenceGraph.html">IncidenceGraph</a> concept (the
|
||||
target of an out-edge is an adjacent vertex). Both concepts are
|
||||
@@ -112,8 +112,7 @@ The <TT>adjacent_vertices()</TT> function must return in constant time.
|
||||
typedef typename boost::graph_traits<G>::adjacency_iterator
|
||||
adjacency_iterator;
|
||||
void constraints() {
|
||||
function_requires< IncidenceGraphConcept<G> >();
|
||||
function_requires< MultiPassInputIteratorConcept<adjacency_iterator> >();
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<adjacency_iterator> ));
|
||||
|
||||
p = adjacent_vertices(v, g);
|
||||
v = *p.first;
|
||||
@@ -160,9 +159,9 @@ experience with graph algorithm implementations.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+11
-11
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>AdjacencyMatrix</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -95,9 +95,9 @@ The <TT>edge()</TT> function must return in constant time.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+15
-15
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: BFSVisitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -140,9 +140,9 @@ edges for undirected graphs.
|
||||
<td><tt>vis.gray_target(e, g)</tt></td>
|
||||
<td><tt>void</tt></td>
|
||||
<td>
|
||||
This is invoked on the subset of non-tree edges who's target vertex is
|
||||
This is invoked on the subset of non-tree edges whose target vertex is
|
||||
colored gray at the time of examination. The color gray indicates
|
||||
that the vertex is currently in the queue.
|
||||
that the vertex is currently in the queue.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -151,7 +151,7 @@ that the vertex is currently in the queue.
|
||||
<td><tt>vis.black_target(e, g)</tt></td>
|
||||
<td><tt>void</tt></td>
|
||||
<td>
|
||||
This is invoked on the subset of non-tree edges who's target vertex is
|
||||
This is invoked on the subset of non-tree edges whose target vertex is
|
||||
colored black at the time of examination. The color black indicates
|
||||
that the vertex has been removed from the queue.
|
||||
</td>
|
||||
@@ -206,15 +206,15 @@ class count_tree_edges_bfs_visitor(bgl.Graph.BFSVisitor):
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
Executable
+22
@@ -0,0 +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, 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
|
||||
+13
-13
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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>BasicMatrix</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -78,11 +78,11 @@ Element access is constant time.
|
||||
void constraints() {
|
||||
V& elt = A[i][j];
|
||||
const_constraints(A);
|
||||
ignore_unused_variable_warning(elt);
|
||||
ignore_unused_variable_warning(elt);
|
||||
}
|
||||
void const_constraints(const M& A) {
|
||||
const V& elt = A[i][j];
|
||||
ignore_unused_variable_warning(elt);
|
||||
ignore_unused_variable_warning(elt);
|
||||
}
|
||||
M A;
|
||||
I i, j;
|
||||
@@ -93,11 +93,11 @@ Element access is constant time.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+14
-14
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: Bellman Ford Visitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -116,8 +116,8 @@ this method is invoked.
|
||||
<td><tt>vis.edge_minimized(e, g)</tt></td>
|
||||
<td><tt>void</tt></td>
|
||||
<td>
|
||||
After the <tt>num_vertices(g)</tt> iterations through the edge set
|
||||
of the graph is complete, one last iteration is made to test whether
|
||||
After <tt>num_vertices(g)</tt> iterations through the edge set
|
||||
of the graph are completed, one last iteration is made to test whether
|
||||
each edge was minimized. If the edge is minimized then this function
|
||||
is invoked.
|
||||
</td>
|
||||
@@ -170,15 +170,15 @@ class count_tree_edges_bellman_ford_visitor(bgl.Graph.BellmanFordVisitor):
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+18
-13
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Bidirectional</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -145,20 +145,25 @@ undirected graphs).
|
||||
typedef typename boost::graph_traits<G>::in_edge_iterator
|
||||
in_edge_iterator;
|
||||
void constraints() {
|
||||
function_requires< IncidenceGraphConcept<G> >();
|
||||
function_requires< MultiPassInputIteratorConcept<in_edge_iterator> >();
|
||||
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<in_edge_iterator> ));
|
||||
|
||||
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& g) {
|
||||
p = in_edges(v, g);
|
||||
n = in_degree(v, g);
|
||||
n = degree(v, g);
|
||||
e = *p.first;
|
||||
}
|
||||
std::pair<in_edge_iterator, in_edge_iterator> p;
|
||||
typename boost::graph_traits<G>::vertex_descriptor v;
|
||||
typename boost::graph_traits<G>::edge_descriptor e;
|
||||
typename boost::graph_traits<G>::degree_size_type n;
|
||||
G g;
|
||||
};
|
||||
</PRE>
|
||||
@@ -167,9 +172,9 @@ undirected graphs).
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+15
-15
@@ -1,18 +1,18 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Buffer</Title>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -43,9 +43,9 @@ For a type to model the Buffer concept it must have the following members.
|
||||
|
||||
<tr> <td><b>Member</b></td> <td><b>Description</b></td> </tr>
|
||||
|
||||
<tr> <td> <tt>value_type</tt> </td>
|
||||
<tr> <td> <tt>value_type</tt> </td>
|
||||
<td> The type of object stored in the Buffer. The value type
|
||||
must be <A href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>.</td>
|
||||
must be <A href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>.</td>
|
||||
</tr>
|
||||
|
||||
<tr> <td> <tt>size_type</tt> </td>
|
||||
@@ -70,7 +70,7 @@ For a type to model the Buffer concept it must have the following members.
|
||||
</tr>
|
||||
|
||||
<tr> <td> <tt>const T& top() const</tt> </td>
|
||||
<td> Returns a const reference to some object in the Buffer.
|
||||
<td> Returns a const reference to some object in the Buffer.
|
||||
Precondition: <tt>empty()</tt> is <tt>false</tt>.</td>
|
||||
</tr>
|
||||
|
||||
@@ -99,7 +99,7 @@ most linear time complexity in the size of the Generalized Queue.
|
||||
<h3>Models</h3>
|
||||
|
||||
<UL>
|
||||
<LI><a href="http://www.sgi.com/tech/stl/stack.html"><tt>std::stack</tt></a>
|
||||
<LI><a href="http://www.boost.org/sgi/stl/stack.html"><tt>std::stack</tt></a>
|
||||
<LI><a href="../../../boost/pending/mutable_queue.hpp"><tt>boost::mutable_queue</tt></a>
|
||||
</UL>
|
||||
|
||||
@@ -109,10 +109,10 @@ most linear time complexity in the size of the Generalized Queue.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University and C++ Library & Compiler Group/SGI (<A HREF="mailto:jsiek@engr.sgi.com">jsiek@engr.sgi.com</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
|
||||
+14
-14
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: ColorValue Concept</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -28,9 +28,9 @@ mark which vertices have been visited.
|
||||
<P>
|
||||
|
||||
<h3>Refinement of</h3> <a
|
||||
href="http://www.sgi.com/tech/stl/EqualityComparable.html">EqualityComparable</a>
|
||||
href="http://www.boost.org/sgi/stl/EqualityComparable.html">EqualityComparable</a>
|
||||
and <a
|
||||
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a>
|
||||
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">DefaultConstructible</a>
|
||||
|
||||
|
||||
<h3>Notation</h3>
|
||||
@@ -94,15 +94,15 @@ href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructibl
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+22
-13
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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>DFS Visitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -149,6 +149,15 @@ undirected graph this method is never called.
|
||||
</td>
|
||||
</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>
|
||||
@@ -157,7 +166,7 @@ undirected graph this method is never called.
|
||||
This is invoked on vertex <tt>u</tt> after <tt>finish_vertex</tt> has
|
||||
been called for all the vertices in the DFS-tree rooted at vertex
|
||||
<tt>u</tt>. If vertex <tt>u</tt> is a leaf in the DFS-tree, then
|
||||
the <tt>finish_vertex</tt> function is call on <tt>u</tt> after
|
||||
the <tt>finish_vertex</tt> function is called on <tt>u</tt> after
|
||||
all the out-edges of <tt>u</tt> have been examined.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -198,15 +207,15 @@ class count_tree_edges_dfs_visitor(bgl.Graph.DFSVisitor):
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+15
-15
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: Dijkstra Visitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -65,7 +65,7 @@ the search.
|
||||
|
||||
<TR>
|
||||
<TD><tt>DistanceMap</tt></TD>
|
||||
<TD>A type that is a model of <a href="../../property_map/ReadWritePropertyMap.html">Read/Write Property Map</a>.</TD>
|
||||
<TD>A type that is a model of <a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write Property Map</a>.</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
@@ -75,12 +75,12 @@ the search.
|
||||
|
||||
<TR>
|
||||
<TD><tt>WeightMap</tt></TD>
|
||||
<TD>A type that is a model of <a href="../../property_map/ReadWritePropertyMap.html">Readable Property Map</a>.</TD>
|
||||
<TD>A type that is a model of <a href="../../property_map/doc/ReadWritePropertyMap.html">Readable Property Map</a>.</TD>
|
||||
</TR>
|
||||
|
||||
<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>
|
||||
@@ -208,15 +208,15 @@ class count_tree_edges_dijkstra_visitor(bgl.Graph.DijkstraVisitor):
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+15
-15
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>EdgeListGraph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -109,7 +109,7 @@ Return type: <TT>vertex_descriptor</TT>
|
||||
<tr>
|
||||
<TD><TT>target(e, g)</TT></TD>
|
||||
<TD>
|
||||
Returns the vertex descriptor for
|
||||
Returns the vertex descriptor for
|
||||
<i>v</i> of the edge <i>(u,v)</i> represented by <TT>e</TT>.<br>
|
||||
Return type: <TT>vertex_descriptor</TT>
|
||||
</TD>
|
||||
@@ -143,11 +143,11 @@ must all return in constant time.
|
||||
template <class G>
|
||||
struct EdgeListGraphConcept
|
||||
{
|
||||
typedef typename boost::graph_traits<G>::edge_iterator
|
||||
typedef typename boost::graph_traits<G>::edge_iterator
|
||||
edge_iterator;
|
||||
void constraints() {
|
||||
function_requires< GraphConcept<G> >();
|
||||
function_requires< MultiPassInputIteratorConcept<edge_iterator> >();
|
||||
BOOST_CONCEPT_ASSERT(( GraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<edge_iterator> ));
|
||||
|
||||
p = edges(g);
|
||||
E = num_edges(g);
|
||||
@@ -176,9 +176,9 @@ must all return in constant time.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+12
-12
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) Jeremy Siek 2001
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) Jeremy Siek 2001
|
||||
|
||||
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>Edge Mutable Graph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -35,7 +35,7 @@ No additional associated types.
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a name="sec:add_edge"><TT>add_edge(u, v, g)</TT></a>
|
||||
<li><a name="sec:add_edge"><TT>add_edge(u, v, g)</TT></a>
|
||||
<b>returns</b> <TT>std::pair<edge_descriptor, bool></TT>
|
||||
<br><br>
|
||||
|
||||
@@ -100,9 +100,9 @@ UNDER CONSTRUCTION
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+12
-12
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: EventVisitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -147,15 +147,15 @@ either a vertex or edge descriptor of the graph.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+14
-14
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: EventVisitorList</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
An EventVisitorList is either an <a
|
||||
href="./EventVisitor.html">EventVisitor</a>, or a list of
|
||||
EventVisitor's combined using <tt>std::pair</tt>. Each graph algorithm
|
||||
EventVisitors combined using <tt>std::pair</tt>. Each graph algorithm
|
||||
defines visitor adaptors that convert an EventVisitorList into the
|
||||
particular kind of visitor needed by the algorithm.
|
||||
|
||||
@@ -91,7 +91,7 @@ Now we can pass the resulting visitor object into
|
||||
color.begin());
|
||||
</pre>
|
||||
|
||||
For creating a list of more than two event visitors, nest calls to
|
||||
For creating a list of more than two event visitors, you can nest calls to
|
||||
<tt>std::make_pair</tt> in the following way:
|
||||
|
||||
<pre>
|
||||
@@ -113,15 +113,15 @@ std::make_pair(<i>visitor1</i>,
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+28
-28
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Graph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -24,7 +24,7 @@ The Graph concept contains a few requirements that are common to all
|
||||
the graph concepts. These include some associated types for
|
||||
<tt>vertex_descriptor</tt>, <tt>edge_descriptor</tt>, etc. One should
|
||||
note that a model of Graph is <B>not</B> required to be a model of <a
|
||||
href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>,
|
||||
href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>,
|
||||
so algorithms should pass graph objects by reference.
|
||||
|
||||
<P>
|
||||
@@ -51,9 +51,9 @@ so algorithms should pass graph objects by reference.
|
||||
A vertex descriptor corresponds to a unique vertex in an abstract
|
||||
graph instance. A vertex descriptor must be
|
||||
<a
|
||||
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default Constructible</a>,
|
||||
<a href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>, and
|
||||
<a href="http://www.sgi.com/tech/stl/EqualityComparable.html">Equality Comparable</a>.
|
||||
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">Default Constructible</a>,
|
||||
<a href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>, and
|
||||
<a href="http://www.boost.org/sgi/stl/EqualityComparable.html">Equality Comparable</a>.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -61,10 +61,9 @@ href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default Constructib
|
||||
<td><pre>boost::graph_traits<G>::edge_descriptor</pre>
|
||||
An edge descriptor corresponds to a unique edge <i>(u,v)</i> in a
|
||||
graph. An edge descriptor must be <a
|
||||
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default Constructible</I>,
|
||||
<a
|
||||
href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>,
|
||||
and <a href="http://www.sgi.com/tech/stl/EqualityComparable.html">Equality Comparable</a>.
|
||||
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">Default Constructible</I>,
|
||||
<a href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>, and
|
||||
<a href="http://www.boost.org/sgi/stl/EqualityComparable.html">Equality Comparable</a>.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -86,9 +85,10 @@ are <TT>allow_parallel_edge_tag</TT> and <TT>disallow_parallel_edge_tag</TT>.
|
||||
<td><pre>boost::graph_traits<G>::traversal_category</pre>
|
||||
This describes the ways in which the vertices and edges of the
|
||||
graph can be visited. The choices are <TT>incidence_graph_tag</TT>,
|
||||
<TT>adjacency_graph_tag</TT>, <TT>bidirectional_graph_tag</TT>,
|
||||
<TT>vertex_list_graph_tag</TT>, <TT>edge_list_graph_tag</TT>, and
|
||||
<TT>adjacency_matrix_tag</TT>.
|
||||
<TT>adjacency_graph_tag</TT>, <TT>bidirectional_graph_tag</TT>,
|
||||
<TT>vertex_list_graph_tag</TT>, <TT>edge_list_graph_tag</TT>, and
|
||||
<TT>adjacency_matrix_tag</TT>. You can also create your own
|
||||
tag which should inherit from one or more of the above.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -122,12 +122,12 @@ any vertex of graph object which type is <tt>G</tt>.
|
||||
typedef typename boost::graph_traits<G>::traversal_category traversal_category;
|
||||
|
||||
void constraints() {
|
||||
function_requires< DefaultConstructibleConcept<vertex_descriptor> >();
|
||||
function_requires< EqualityComparableConcept<vertex_descriptor> >();
|
||||
function_requires< AssignableConcept<vertex_descriptor> >();
|
||||
function_requires< DefaultConstructibleConcept<edge_descriptor> >();
|
||||
function_requires< EqualityComparableConcept<edge_descriptor> >();
|
||||
function_requires< AssignableConcept<edge_descriptor> >();
|
||||
BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept<vertex_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( EqualityComparableConcept<vertex_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( AssignableConcept<vertex_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept<edge_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( EqualityComparableConcept<edge_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( AssignableConcept<edge_descriptor> ));
|
||||
}
|
||||
G g;
|
||||
};
|
||||
@@ -141,9 +141,9 @@ any vertex of graph object which type is <tt>G</tt>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+16
-16
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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>IncidenceGraph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -76,7 +76,7 @@ href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>.
|
||||
|
||||
<TR>
|
||||
<TD><pre>boost::graph_traits<G>::degree_size_type</pre>
|
||||
The unsigned intergral type used for representing the number
|
||||
The unsigned integral type used for representing the number
|
||||
out-edges or incident edges of a vertex.
|
||||
</TD>
|
||||
</TR>
|
||||
@@ -108,7 +108,7 @@ directed graphs) or incident edges (for undirected graphs) of vertex
|
||||
<TT>u</TT> in graph <TT>g</TT>. The source vertex of an edge obtained
|
||||
via an out edge iterator is guaranteed (for both directed and
|
||||
undirected graphs) to be the vertex <tt>u</tt> used in the call to
|
||||
<tt>out_edges(u, g)</tt> and the target vertex must the a vertex
|
||||
<tt>out_edges(u, g)</tt> and the target vertex must be a vertex
|
||||
adjacent to <tt>u</tt>.<a href="#1">[1]</a>
|
||||
<br>
|
||||
Return type: <TT>std::pair<out_edge_iterator, out_edge_iterator></TT>
|
||||
@@ -162,8 +162,8 @@ Therefore, the extra requirement is added that the out-edge connecting
|
||||
{
|
||||
typedef typename boost::graph_traits<G>::out_edge_iterator out_edge_iterator;
|
||||
void constraints() {
|
||||
function_requires< GraphConcept<G> >();
|
||||
function_requires< MultiPassInputIteratorConcept<out_edge_iterator> >();
|
||||
BOOST_CONCEPT_ASSERT(( GraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<out_edge_iterator> ));
|
||||
|
||||
p = out_edges(u, g);
|
||||
e = *p.first;
|
||||
@@ -188,15 +188,15 @@ Therefore, the extra requirement is added that the out-edge connecting
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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>IteratorConstructibleGraph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -22,7 +22,7 @@ IteratorConstructibleGraph
|
||||
The IteratorConstructibleGraph concept describes the interface for
|
||||
graph types that can be constructed using a kind of edge iterator. The
|
||||
edge iterator can be any <a
|
||||
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
|
||||
that dereferences to a pair of integers <i>(i,j)</i>, which represent
|
||||
an edge that should be in the graph. The two integers <i>i</i> and
|
||||
<i>j</i> represent vertices where <i>0 <= i < |V|</i> and <i>0 <= j <
|
||||
@@ -44,20 +44,20 @@ the second constructor can be more efficient than the first.
|
||||
The following exampe creates two graph objects from an array of edges
|
||||
(vertex pairs). The type <tt>Edge*</tt> satisfies the requirements for
|
||||
an <a
|
||||
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
|
||||
and can therefore be used to construct a graph.
|
||||
|
||||
<pre>
|
||||
typedef ... IteratorConstructibleGraph;
|
||||
typedef boost::graph_traits<IteratorConstructibleGraph> Traits;
|
||||
|
||||
typedef std::pair<Traits::vertices_size_type,
|
||||
typedef std::pair<Traits::vertices_size_type,
|
||||
Traits::vertices_size_type> Edge;
|
||||
Edge edge_array[] =
|
||||
{ Edge(0,1), Edge(0,2), Edge(0,3), Edge(0,4), Edge(0,5),
|
||||
Edge(1, 2), Edge(1,5), Edge(1,3),
|
||||
Edge(2, 4), Edge(2,5),
|
||||
Edge(3, 2),
|
||||
Edge(3, 2),
|
||||
Edge(4, 3), Edge(4,1),
|
||||
Edge(5, 4) };
|
||||
Edge* first = edge_array,
|
||||
@@ -65,7 +65,7 @@ and can therefore be used to construct a graph.
|
||||
|
||||
IteratorConstructibleGraph G1(first, last);
|
||||
// do something with G1 ...
|
||||
|
||||
|
||||
Traits::vertices_size_type size_V = 6;
|
||||
Traits::edges_size_type size_E = sizeof(edge_array)/sizeof(Edge);
|
||||
IteratorConstructibleGraph G2(first, last, size_V, size_E);
|
||||
@@ -147,15 +147,15 @@ constructor lacking the graph size information.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -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 <class Q>
|
||||
struct KeyedUpdatableQueueConcept
|
||||
{
|
||||
typedef typename Q::key_type key_type;
|
||||
typedef typename Q::key_map key_map;
|
||||
|
||||
void constraints() {
|
||||
BOOST_CONCEPT_ASSERT(( UpdatableQueue<Q> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMap< key_map, typename Buffer<Q>::value_type > ));
|
||||
}
|
||||
|
||||
void const_constraints(const Q& cq) {
|
||||
km = cq.keys();
|
||||
k = get(km, g_ct);
|
||||
}
|
||||
|
||||
static const typename Buffer<Q>::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 © 2010</td>
|
||||
<td>Daniel Trebbien (<a href="mailto:dtrebbien@gmail.com">dtrebbien@gmail.com</a>)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+1
-1
@@ -41,7 +41,7 @@ RESULT = pdf
|
||||
epstopdf $*.eps
|
||||
|
||||
.dot.eps:
|
||||
dot -Tps -o $*.eps $*.dot
|
||||
dot -Tps -o $*.eps $*.dot
|
||||
|
||||
.w.tex: /afs/nd.edu/user11/jsiek/.jweb
|
||||
jweb -np $*.w
|
||||
|
||||
+13
-13
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2001
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2001
|
||||
|
||||
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>Monoid</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -33,7 +33,7 @@ The element type must be a model of <a
|
||||
href="../../utility/Assignable.html">Assignable</a> and <a
|
||||
href="../../utility/CopyConstructible.html">CopyConstructible</a>.
|
||||
The function object type must be a model of <a
|
||||
href="http://www.sgi.com/tech/stl/BinaryFunction.html">BinaryFunction</a>.
|
||||
href="http://www.boost.org/sgi/stl/BinaryFunction.html">BinaryFunction</a>.
|
||||
|
||||
<h3>Notation</h3>
|
||||
|
||||
@@ -108,15 +108,15 @@ Return type: <TT>bool</TT>
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+16
-16
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>MutableGraph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -58,8 +58,8 @@ edges and vertices.
|
||||
<TR>
|
||||
<TD><tt>p</tt></TD>
|
||||
<TD>is an object of a type that models <a
|
||||
href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>
|
||||
and whose argument type matches the <tt>edge_descriptor</tt> type.
|
||||
href="http://www.boost.org/sgi/stl/Predicate.html">Predicate</a>
|
||||
and whose argument type matches the <tt>edge_descriptor</tt> type.
|
||||
</TR>
|
||||
|
||||
</table>
|
||||
@@ -250,7 +250,7 @@ is no longer a valid vertex descriptor.
|
||||
struct MutableIncidenceGraphConcept
|
||||
{
|
||||
void constraints() {
|
||||
function_requires< MutableGraph<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( MutableGraph<G> ));
|
||||
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< MutableIncidenceGraph<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( MutableIncidenceGraph<G> ));
|
||||
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< MutableGraph<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( MutableGraph<G> ));
|
||||
remove_edge_if(p, g);
|
||||
}
|
||||
G g;
|
||||
@@ -291,9 +291,9 @@ is no longer a valid vertex descriptor.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>MutablePropertyGraph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -125,7 +125,7 @@ Return type: <TT>vertex_descriptor</TT>
|
||||
{
|
||||
typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor;
|
||||
void constraints() {
|
||||
function_requires< MutableGraphConcept<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( MutableGraphConcept<G> ));
|
||||
v = add_vertex(vp, g);
|
||||
p = add_edge(u, v, ep, g);
|
||||
}
|
||||
@@ -142,9 +142,9 @@ Return type: <TT>vertex_descriptor</TT>
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+40
-40
@@ -1,18 +1,18 @@
|
||||
<html><head><!-- Copyright 2007 Aaron Windsor
|
||||
--
|
||||
-- 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)
|
||||
--
|
||||
|
||||
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)
|
||||
|
||||
-->
|
||||
<title>Planar Embedding Concept</title>
|
||||
</head>
|
||||
<body alink="#ff0000"
|
||||
bgcolor="#ffffff"
|
||||
link="#0000ee"
|
||||
text="#000000"
|
||||
vlink="#551a8b">
|
||||
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
|
||||
<body alink="#ff0000"
|
||||
bgcolor="#ffffff"
|
||||
link="#0000ee"
|
||||
text="#000000"
|
||||
vlink="#551a8b">
|
||||
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
|
||||
|
||||
<br clear="">
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
|
||||
A planar embedding is an important intermediate representation of a drawing
|
||||
of a planar graph. Instead of specifying the absolute positions of the vertices
|
||||
and edges in the plane, a planar embedding specifies their positions relative
|
||||
to one another. A planar embedding consists of a sequence, for each vertex in
|
||||
the graph, of all of the edges incident on that vertex in the order in which
|
||||
and edges in the plane, a planar embedding specifies their positions relative
|
||||
to one another. A planar embedding consists of a sequence, for each vertex in
|
||||
the graph, of all of the edges incident on that vertex in the order in which
|
||||
they are to be drawn around that vertex.
|
||||
<p>
|
||||
A planar embedding is a refinement of
|
||||
<a href="../../property_map/LvaluePropertyMap.html">LValuePropertyMap</a> that
|
||||
A planar embedding is a refinement of
|
||||
<a href="../../property_map/doc/LvaluePropertyMap.html">LValuePropertyMap</a> that
|
||||
places additional restrictions the <tt>value_type</tt> used in the property
|
||||
map.
|
||||
|
||||
@@ -36,24 +36,24 @@ map.
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td> <tt>Embedding</tt> </td>
|
||||
<tr>
|
||||
<td> <tt>Embedding</tt> </td>
|
||||
<td> is a type that models the Planar Embedding concept.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr>
|
||||
<td> <tt>embedding</tt> </td>
|
||||
<td> is an object of type <tt>Embedding</tt>. </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> <tt>Graph</tt> </td>
|
||||
<tr>
|
||||
<td> <tt>Graph</tt> </td>
|
||||
<td> is the type of the underlying graph.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> <tt>e</tt> </td>
|
||||
<td> is an object of type <tt>graph_traits<Graph>::edge_descriptor</tt>.
|
||||
<tr>
|
||||
<td> <tt>e</tt> </td>
|
||||
<td> is an object of type <tt>graph_traits<Graph>::edge_descriptor</tt>.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -63,7 +63,7 @@ map.
|
||||
</tt>.</td>
|
||||
|
||||
</tr><tr>
|
||||
<td>
|
||||
<td>
|
||||
|
||||
</td></tr></tbody></table>
|
||||
|
||||
@@ -72,12 +72,12 @@ map.
|
||||
|
||||
<table border="1">
|
||||
|
||||
<tbody><tr>
|
||||
<tbody><tr>
|
||||
<td> Const Iterator </td>
|
||||
<td> <tt>boost::property_traits<Embedding>::value_type::const_iterator
|
||||
</tt>
|
||||
</td>
|
||||
<td> The iterator type used to iterate over the ordering of the edges in the
|
||||
<td> The iterator type used to iterate over the ordering of the edges in the
|
||||
planar embedding of a particular vertex
|
||||
</td>
|
||||
</tr>
|
||||
@@ -92,32 +92,32 @@ planar embedding of a particular vertex
|
||||
|
||||
<tbody><tr><th>Expression</th><th>Return Type</th><th>Description</th>
|
||||
|
||||
</tr><tr>
|
||||
</tr><tr>
|
||||
<td> <tt>embedding[v].begin()</tt> </td>
|
||||
<td> <tt>boost::property_traits<Embedding>::value_type::const_iterator
|
||||
</tt></td>
|
||||
<td> Returns an iterator to the beginning of the range of edges in the
|
||||
<td> Returns an iterator to the beginning of the range of edges in the
|
||||
embedding around vertex v</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr>
|
||||
<td> <tt>embedding[v].end()</tt> </td>
|
||||
<td> <tt>boost::property_traits<Embedding>::value_type::const_iterator
|
||||
</tt></td>
|
||||
<td> Returns an iterator to the end of the range of edges in the
|
||||
<td> Returns an iterator to the end of the range of edges in the
|
||||
embedding around vertex v</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr>
|
||||
<td> <tt>embedding[v].clear()</tt> </td>
|
||||
<td> <tt>void</tt></td>
|
||||
<td> Clears all edges in the embedding around a vertex <tt>v</tt></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr>
|
||||
<td> <tt>embedding[v].push_back(e)</tt> </td>
|
||||
<td> <tt>void</tt></td>
|
||||
<td> Adds an edge <tt>e</tt> to the end of the sequence of embedded edges
|
||||
<td> Adds an edge <tt>e</tt> to the end of the sequence of embedded edges
|
||||
around the vertex <tt>v</tt> </td>
|
||||
</tr>
|
||||
|
||||
@@ -126,18 +126,18 @@ planar embedding of a particular vertex
|
||||
</p><h3>Complexity Guarantees</h3>
|
||||
|
||||
Starting with an empty embedding, any mixed sequence of <i>n</i> calls to a
|
||||
particular vertex's <tt>push_back</tt> and <tt>clear</tt> should take
|
||||
particular vertex's <tt>push_back</tt> and <tt>clear</tt> should take
|
||||
<i>O(n)</i> time.
|
||||
|
||||
<h3>Models</h3>
|
||||
|
||||
Any LValue property map that maps vertices to a <tt>std::vector</tt>,
|
||||
Any LValue property map that maps vertices to a <tt>std::vector</tt>,
|
||||
<tt>std::list</tt>, or <tt>std::deque</tt> models this
|
||||
concept. Below is an example of using this approach to create a model of
|
||||
PlanarEmbedding:
|
||||
|
||||
<pre>
|
||||
#include <boost/property_map.hpp>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
#include <vector>
|
||||
|
||||
...
|
||||
@@ -146,7 +146,7 @@ PlanarEmbedding:
|
||||
// an instance of Graph in a variable g.
|
||||
|
||||
// A typedef for the storage - a vector of vectors of edge descriptors
|
||||
typedef
|
||||
typedef
|
||||
std::vector< std::vector< graph_traits<Graph>::edge_descriptor > >
|
||||
planar_embedding_storage_t;
|
||||
|
||||
@@ -173,6 +173,6 @@ planar_embedding_t planar_embedding(planar_embedding_storage.begin(),
|
||||
<br>
|
||||
</p><hr>
|
||||
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
|
||||
aaron.windsor@gmail.com</a>)
|
||||
aaron.windsor@gmail.com</a>)
|
||||
|
||||
</body></html>
|
||||
</body></html>
|
||||
|
||||
+23
-23
@@ -1,28 +1,28 @@
|
||||
<HTML>
|
||||
<!-- Copyright 2007 Aaron Windsor
|
||||
--
|
||||
-- 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)
|
||||
--
|
||||
|
||||
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>Planar Face Visitor Concept</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<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>Planar Face Visitor Concept</H1>
|
||||
|
||||
This concept defines the visitor interface for
|
||||
<a href="./planar_face_traversal.html"><tt>planar_face_traversal</tt></a>.
|
||||
Users can define a class with the Planar Face Visitor interface and pass an
|
||||
object of the class to <tt>planar_face_traversal</tt>, thereby augmenting the
|
||||
actions taken during the traversal. Note that objects passed to
|
||||
This concept defines the visitor interface for
|
||||
<a href="./planar_face_traversal.html"><tt>planar_face_traversal</tt></a>.
|
||||
Users can define a class with the Planar Face Visitor interface and pass an
|
||||
object of the class to <tt>planar_face_traversal</tt>, thereby augmenting the
|
||||
actions taken during the traversal. Note that objects passed to
|
||||
<tt>planar_face_traversal</tt> are passed by reference.
|
||||
|
||||
<h3>Notation</h3>
|
||||
@@ -79,8 +79,8 @@ This is invoked once per traversal, before the traversal begins.
|
||||
<td><tt>vis.begin_face()</tt></td>
|
||||
<td><tt>void</tt></td>
|
||||
<td>
|
||||
This is invoked once for each face, before any vertices or edges on the face
|
||||
are visited.
|
||||
This is invoked once for each face, before any vertices or edges on the face
|
||||
are visited.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -108,7 +108,7 @@ This is invoked when an edge is encountered while traversing a face.
|
||||
<td><tt>vis.end_face()</tt></td>
|
||||
<td><tt>void</tt></td>
|
||||
<td>
|
||||
This is invoked once for each face, after all vertices and edges on the face
|
||||
This is invoked once for each face, after all vertices and edges on the face
|
||||
are visited.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -129,20 +129,20 @@ This is invoked once per traversal, after the traversal ends.
|
||||
|
||||
<ul>
|
||||
<li> The file <a href="../../../boost/graph/planar_face_traversal.hpp">
|
||||
<tt>planar_face_traversal.hpp</tt></a> contains a class
|
||||
<tt>planar_face_traversal.hpp</tt></a> contains a class
|
||||
<tt>planar_face_traversal_visitor</tt> that implements empty actions for
|
||||
all event points of a Planar Face Visitor. In the case where only a few of the
|
||||
all event points of a Planar Face Visitor. In the case where only a few of the
|
||||
event points of Planar Face Visitor need to be implemented, one can derive from
|
||||
<tt>planar_face_traversal_visitor</tt> and only implement the necessary event
|
||||
<tt>planar_face_traversal_visitor</tt> and only implement the necessary event
|
||||
points. <li> The implementation of <a href="./make_maximal_planar.html">
|
||||
<tt>make_maximal_planar</tt></a> uses a <tt>triangulation_visitor</tt> that is
|
||||
<tt>make_maximal_planar</tt></a> uses a <tt>triangulation_visitor</tt> that is
|
||||
a model of Planar Face Visitor.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
<HR>
|
||||
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
|
||||
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
|
||||
aaron.windsor@gmail.com</a>)
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+17
-17
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>PropertyGraph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -22,7 +22,7 @@ PropertyGraph
|
||||
A PropertyGraph is a graph that has some property associated with each
|
||||
of the vertices or edges in the graph. As a given graph may have
|
||||
several properties associated with each vertex or edge, a tag is used
|
||||
to identity which property is being accessed. The graph provides a
|
||||
to identify which property is being accessed. The graph provides a
|
||||
function which returns a property map object.
|
||||
|
||||
<P>
|
||||
@@ -90,7 +90,7 @@ function which returns a property map object.
|
||||
<td><pre>boost::property_map<G, PropertyTag>::type</pre>
|
||||
The type of the property map for the property specified by
|
||||
<TT>PropertyTag</TT>. This type must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a>
|
||||
with a key type the same as the graph's vertex or edge descriptor type.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -99,7 +99,7 @@ with a key type the same as the graph's vertex or edge descriptor type.
|
||||
<td><pre>boost::property_map<G, PropertyTag>::const_type</pre>
|
||||
The type of the const property map for the property specified by
|
||||
<TT>PropertyTag</TT>. This type must be a model of <a
|
||||
href="../../property_map/ReadablePropertyMap.html">ReadablePropertyMap</a>
|
||||
href="../../property_map/doc/ReadablePropertyMap.html">ReadablePropertyMap</a>
|
||||
with a key type the same as the graph's vertex or edge descriptor type.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -173,9 +173,9 @@ The <tt>get()</tt> property map function must be constant time.
|
||||
typedef typename property_map<G, PropertyTag>::type Map;
|
||||
typedef typename property_map<G, PropertyTag>::const_type const_Map;
|
||||
void constraints() {
|
||||
function_requires< GraphConcept<G> >();
|
||||
function_requires< ReadWritePropertyMapConcept<Map, X> >();
|
||||
function_requires< ReadablePropertyMapConcept<const_Map, X> >();
|
||||
BOOST_CONCEPT_ASSERT(( GraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<Map, X> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<const_Map, X> ));
|
||||
|
||||
Map pmap = get(PropertyTag(), g);
|
||||
pval = get(PropertyTag(), g, x);
|
||||
@@ -202,9 +202,9 @@ The <tt>get()</tt> property map function must be constant time.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+13
-13
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Property</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -67,7 +67,7 @@ href="../../../boost/pending/property.hpp"><tt>boost/pending/property.hpp</tt></
|
||||
<h3>Refinement of</h3>
|
||||
|
||||
<a
|
||||
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default Constructible</a>
|
||||
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">Default Constructible</a>
|
||||
|
||||
|
||||
<h3>Models</h3>
|
||||
@@ -96,7 +96,7 @@ href="../../../boost/graph/properties.hpp"><tt>boost/graph/properties.hpp</tt></
|
||||
|
||||
<a href="./PropertyGraph.html">PropertyGraph</a>
|
||||
and
|
||||
<a href="../../property_map/property_map.html">Property Map Concepts</a>
|
||||
<a href="../../property_map/doc/property_map.html">Property Map Concepts</a>
|
||||
|
||||
<h3>Notes</h3>
|
||||
|
||||
@@ -109,9 +109,9 @@ type is also required to specialize
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
<HTML>
|
||||
<!--
|
||||
Copyright (c) Matyas Egyhazy 2008
|
||||
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: TSP Tour Visitor</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>TSP Tour Visitor concept</H1>
|
||||
|
||||
This concept defines the visitor interface for <a
|
||||
href="./metric_tsp_approx.html"><tt>metric_tsp_approx()</tt></a>
|
||||
and related algorithms. The user can create a class that matches this
|
||||
interface, and then pass objects of the class into
|
||||
<tt>metric_tsp_approx()</tt> to augment the actions taken during
|
||||
the search.
|
||||
|
||||
<h3>Refinement of</h3>
|
||||
|
||||
none
|
||||
|
||||
<h3>Notation</h3>
|
||||
|
||||
<Table>
|
||||
<TR>
|
||||
<TD><tt>V</tt></TD>
|
||||
<TD>A type that is a model of Dijkstra Visitor.</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><tt>vis</tt></TD>
|
||||
<TD>An object of type <tt>V</tt>.</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><tt>G</tt></TD>
|
||||
<TD>A type that is a model of Graph.</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><tt>g</tt></TD>
|
||||
<TD>An object of type <tt>G</tt>.</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><tt>v</tt></TD>
|
||||
<TD>An object of type <tt>boost::graph_traits<G>::vertex_descriptor</tt>.</TD>
|
||||
</TR>
|
||||
|
||||
</table>
|
||||
|
||||
<h3>Associated Types</h3>
|
||||
|
||||
none
|
||||
|
||||
<p>
|
||||
|
||||
<h3>Valid Expressions</h3>
|
||||
|
||||
<table border>
|
||||
<tr>
|
||||
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Visit Vertex</td>
|
||||
<td><tt>vis.visit_vertex(v, g)</tt></td>
|
||||
<td><tt>void</tt></td>
|
||||
<td>
|
||||
This is invoked on each vertex of the graph when it is visited as part of the TSP tour.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<h3>Models</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="tsp_tour_visitor.html"><tt>tsp_tour_visitor</tt></a>
|
||||
<li><a href="tsp_tour_len_visitor.html"><tt>tsp_tour_len_tsp_visitor</tt></a>
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2008</TD><TD>
|
||||
Matyas Egyhazy</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -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) < 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 <class Q>
|
||||
struct UpdatableQueueConcept
|
||||
{
|
||||
void constraints() {
|
||||
BOOST_CONCEPT_ASSERT(( Buffer<Q> ));
|
||||
|
||||
q.update(g_ct);
|
||||
}
|
||||
|
||||
void const_constraints(const Q& cq) {
|
||||
if (cq.contains(g_ct));
|
||||
}
|
||||
|
||||
static const typename Buffer<Q>::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> - 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 © 2010</td>
|
||||
<td>Daniel Trebbien (<a href="mailto:dtrebbien@gmail.com">dtrebbien@gmail.com</a>)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>VertexAndEdgeListGraph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -27,7 +27,7 @@ requirements are added.
|
||||
|
||||
<H3>Refinement of</H3>
|
||||
|
||||
<a href="./VertexListGraph.html">VertexListGraph</a>,
|
||||
<a href="./VertexListGraph.html">VertexListGraph</a>,
|
||||
<a href="./EdgeListGraph.html">EdgeListGraph</a>
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ requirements are added.
|
||||
struct VertexAndEdgeListGraphConcept
|
||||
{
|
||||
void constraints() {
|
||||
function_requires< VertexListGraphConcept<G> >();
|
||||
function_requires< EdgeListGraphConcept<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<G> ));
|
||||
}
|
||||
};
|
||||
</PRE>
|
||||
@@ -62,9 +62,9 @@ requirements are added.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+15
-15
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>VertexListGraph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -118,12 +118,12 @@ groups these requirements together, hence the VertexListGraph concept.
|
||||
template <class G>
|
||||
struct VertexListGraphConcept
|
||||
{
|
||||
typedef typename boost::graph_traits<G>::vertex_iterator
|
||||
typedef typename boost::graph_traits<G>::vertex_iterator
|
||||
vertex_iterator;
|
||||
void constraints() {
|
||||
function_requires< IncidenceGraphConcept<G> >();
|
||||
function_requires< AdjacencyGraphConcept<G> >();
|
||||
function_requires< MultiPassInputIteratorConcept<vertex_iterator> >();
|
||||
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<vertex_iterator> ));
|
||||
|
||||
p = vertices(g);
|
||||
V = num_vertices(g);
|
||||
@@ -146,9 +146,9 @@ groups these requirements together, hence the VertexListGraph concept.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+15
-15
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) Jeremy Siek 2001
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) Jeremy Siek 2001
|
||||
|
||||
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>Vertex Mutable Graph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -28,7 +28,7 @@ implementation does the rest.
|
||||
<H3>Refinement of</H3>
|
||||
|
||||
<a href="./Graph.html">Graph</a> and <a
|
||||
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a>
|
||||
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">DefaultConstructible</a>
|
||||
|
||||
<H3>Associated Types</H3>
|
||||
|
||||
@@ -37,7 +37,7 @@ No additional associated types.
|
||||
<h3>Valid Expressions</h3>
|
||||
|
||||
<ul>
|
||||
<li><a name="sec:add_vertex"><TT>add_vertex(g)</TT></a>
|
||||
<li><a name="sec:add_vertex"><TT>add_vertex(g)</TT></a>
|
||||
<b>returns</b> <TT>vertex_descriptor</TT>
|
||||
<br><br>
|
||||
|
||||
@@ -56,7 +56,7 @@ No additional associated types.
|
||||
<br>
|
||||
<b> Postconditions: </b> <TT>num_vertices(g)</TT> is one less; <i>u</i>
|
||||
no longer appears in the vertex set of the graph and it
|
||||
is no longer a valid vertex descriptor.
|
||||
is no longer a valid vertex descriptor.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -64,7 +64,7 @@ No additional associated types.
|
||||
<H3>Complexity guarantees</H3>
|
||||
<ul>
|
||||
<li> Vertex insertion is guaranteed to be amortized constant time.
|
||||
|
||||
|
||||
<li> Vertex removal is at most <TT>O(|E| + |V|)</TT>.
|
||||
</ul>
|
||||
|
||||
@@ -73,11 +73,11 @@ No additional associated types.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
|
||||
+12
-12
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: Acknowledgements</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -62,15 +62,15 @@ Science of the U.S. Department of Energy.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
|
||||
<head>
|
||||
@@ -115,7 +115,7 @@ href="../../utility/MultiPassInputIterator.html">Multi-Pass Input Iterator</a>
|
||||
|
||||
The adjacency iterator type implements the member functions and
|
||||
operators required of the <a
|
||||
href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">Random Access Iterator</a>
|
||||
href="http://www.boost.org/sgi/stl/RandomAccessIterator.html">Random Access Iterator</a>
|
||||
concept, except that the <tt>reference</tt> type is the same as the <tt>value_type</tt>
|
||||
so <tt>operator*()</tt> returns by-value. In addition it has the following constructor:
|
||||
|
||||
|
||||
+90
-67
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Adjacency List</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -37,7 +37,7 @@ href="#fig:adj-list-graph">Figure 1</a> shows an adjacency list
|
||||
representation of a directed graph.
|
||||
|
||||
<P></P>
|
||||
<DIV ALIGN="center"><A NAME="fig:adj-list-graph"></A><A NAME="1509"></A>
|
||||
<DIV ALIGN="center"><A NAME="fig:adj-list-graph"></A>
|
||||
<TABLE>
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1:</STRONG> Adjacency List Representation of a Directed Graph.</CAPTION>
|
||||
<TR><TD><IMG SRC="./figs/adj-matrix-graph2.gif" width="386" height="284"></TD>
|
||||
@@ -67,7 +67,7 @@ href="#fig:undir-adj-list-graph">Figure 2</a> shows an adjacency list
|
||||
representation of an undirected graph.
|
||||
|
||||
<P></P>
|
||||
<DIV ALIGN="center"><A NAME="fig:undir-adj-list-graph"></A><A NAME="1509"></A>
|
||||
<DIV ALIGN="center"><A NAME="fig:undir-adj-list-graph"></A>
|
||||
<TABLE>
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 2:</STRONG> Adjacency List Representation of an Undirected Graph.</CAPTION>
|
||||
<TR><TD><IMG SRC="./figs/undir-adj-matrix-graph2.gif" width="260" height="240"></TD>
|
||||
@@ -86,7 +86,7 @@ Section <A HREF="./using_adjacency_list.html">Using
|
||||
|
||||
<P>
|
||||
The example in <a
|
||||
href="../example/family-tree-eg.cpp"><tt>examples/family-tree-eg.cpp</tt></a>
|
||||
href="../example/family_tree.cpp"><tt>examples/family_tree.cpp</tt></a>
|
||||
shows how to represent a family tree with a graph.
|
||||
|
||||
<H3>Template Parameters</H3>
|
||||
@@ -146,7 +146,7 @@ shows how to represent a family tree with a graph.
|
||||
<H3>Model of</H3>
|
||||
|
||||
<P>
|
||||
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>,
|
||||
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>,
|
||||
<a href="./MutablePropertyGraph.html">MutablePropertyGraph</a>,
|
||||
<a href="../../utility/CopyConstructible.html">CopyConstructible</a>,
|
||||
<a href="../../utility/Assignable.html">Assignable</a>,
|
||||
@@ -175,13 +175,13 @@ properties is described in Section <A
|
||||
HREF="./using_adjacency_list.html#sec:adjacency-list-properties">Internal
|
||||
Properties </A>. The property maps are objects that implement the
|
||||
interface defined in Section <A
|
||||
HREF="../../property_map/property_map.html">Property Map
|
||||
HREF="../../property_map/doc/property_map.html">Property Map
|
||||
Concepts</A> or may be <a href="bundles.html">bundled properties</a>,
|
||||
which have a more succinct syntax. The types of all property values
|
||||
must be Copy Constructible, Assignable, and Default Constructible.
|
||||
must be Copy Constructible, Assignable, and Default Constructible.
|
||||
The property maps obtained from the
|
||||
<TT>adjacency_list</TT> class are models of the <a
|
||||
href="../../property_map/LvaluePropertyMap.html">Lvalue Property
|
||||
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
|
||||
Map</a> concept. If the <TT>adjacency_list</TT> is const,
|
||||
then the property map is constant, otherwise the property
|
||||
map is mutable.
|
||||
@@ -194,7 +194,7 @@ the <TT>vertex_index_t</TT> property. The indices fall in the range
|
||||
removed the indices are adjusted so that they retain these
|
||||
properties. Some care must be taken when using these indices to access
|
||||
exterior property storage. The property map for vertex index is a
|
||||
model of <a href="../../property_map/ReadablePropertyMap.html">Readable
|
||||
model of <a href="../../property_map/doc/ReadablePropertyMap.html">Readable
|
||||
Property Map</a>.
|
||||
|
||||
<P>
|
||||
@@ -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<Graph>::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<Graph>::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<Graph>::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<Graph>::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>
|
||||
|
||||
@@ -322,30 +322,51 @@ each operation.
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Table:</STRONG>
|
||||
Summary of Descriptor and Iterator Invalidation.
|
||||
</CAPTION>
|
||||
<tr> <th>Function</th> <th>Vertex Desc</th> <th>Edge Desc</th>
|
||||
<th>Vertex Iter</th> <th>Edge Iter</th> <th>Adj Iter</th> </tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>add_edge()</tt></td> <td align=center><tt>OK</tt></td><td
|
||||
align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td><td
|
||||
align=center><tt>EL=vecS &&<br> Directed=directedS</tt></td><td align=center><tt>EL=vecS</tt></td>
|
||||
<th>Function</th>
|
||||
<th>Vertex Desc</th>
|
||||
<th>Edge Desc</th>
|
||||
<th>Vertex Iter</th>
|
||||
<th>Edge Iter</th>
|
||||
<th>Adj Iter</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>remove_edge()<br>remove_edge_if()<br>remove_out_edge_if()<br>remove_in_edge_if()<br>clear_vertex()</tt></td><td align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td>
|
||||
<td align=center><tt>EL=vecS &&<br> Directed=directedS</tt></td><td align=center><tt>EL=vecS</tt></td>
|
||||
<td>
|
||||
<tt>add_edge()</tt></td>
|
||||
<td align=center><tt>OK</tt></td>
|
||||
<td align=center><tt>OK</tt></td>
|
||||
<td align=center><tt>OK</tt></td>
|
||||
<td align=center><tt>EL=vecS && <br>Directed=directedS</tt></td>
|
||||
<td align=center><tt>EL=vecS</tt></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>add_vertex()</tt></td><td align=center><tt>OK</tt></td><td
|
||||
align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td><td
|
||||
align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td>
|
||||
<td><tt>remove_edge()<br>remove_edge_if()<br>remove_out_edge_if()<br>
|
||||
remove_in_edge_if()<br>clear_vertex()</tt>
|
||||
</td>
|
||||
<td align=center><tt>OK</tt></td>
|
||||
<td align=center><tt>OK</tt></td>
|
||||
<td align=center><tt>OK</tt></td>
|
||||
<td align=center><tt>EL=vecS && <br>Directed=directedS</tt></td>
|
||||
<td align=center><tt>EL=vecS</tt></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>remove_vertex()</tt></td><td align=center><tt>VL=vecS</tt></td><td align=center><tt>VL=vecS</tt></td><td align=center><tt>VL=vecS</tt></td><td align=center><tt>VL=vecS</tt></td><td align=center><tt>VL=vecS</tt></td>
|
||||
<td><tt>add_vertex()</tt></td>
|
||||
<td align=center><tt>OK</tt></td>
|
||||
<td align=center><tt>OK</tt></td>
|
||||
<td align=center><tt>OK</tt></td>
|
||||
<td align=center><tt>VL=vecS && <br/> Directed=directedS</tt></td>
|
||||
<td align=center><tt>VL=vecS && <br/> Directed=directedS</tt></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>remove_vertex()</tt></td>
|
||||
<td align=center><tt>VL=vecS</tt></td>
|
||||
<td align=center><tt>VL=vecS</tt></td>
|
||||
<td align=center><tt>VL=vecS</tt></td>
|
||||
<td align=center><tt>VL=vecS</tt></td>
|
||||
<td align=center><tt>VL=vecS</tt></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<H2>Associated Types</H2>
|
||||
|
||||
<hr>
|
||||
@@ -376,9 +397,9 @@ The type for the iterators returned by <TT>vertices()</TT>.
|
||||
|
||||
When <tt>VertexList=vecS</tt> then the <tt>vertex_iterator</tt> models
|
||||
<a
|
||||
href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>. Otherwise
|
||||
href="http://www.boost.org/sgi/stl/RandomAccessIterator.html">RandomAccessIterator</a>. Otherwise
|
||||
the <tt>vertex_iterator</tt> models <a
|
||||
href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalIterator</a>.
|
||||
href="http://www.boost.org/sgi/stl/BidirectionalIterator.html">BidirectionalIterator</a>.
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -386,7 +407,7 @@ href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalItera
|
||||
<br><br>
|
||||
The type for the iterators returned by <TT>edges()</TT>.
|
||||
The <tt>edge_iterator</tt> models <a
|
||||
href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalIterator</a>.
|
||||
href="http://www.boost.org/sgi/stl/BidirectionalIterator.html">BidirectionalIterator</a>.
|
||||
|
||||
|
||||
<hr>
|
||||
@@ -397,13 +418,13 @@ href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalItera
|
||||
|
||||
The type for the iterators returned by <TT>out_edges()</TT>.
|
||||
When <tt>OutEdgeList=vecS</tt> then the <tt>out_edge_iterator</tt> models
|
||||
<a href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">
|
||||
<a href="http://www.boost.org/sgi/stl/RandomAccessIterator.html">
|
||||
RandomAccessIterator</a>. When <tt>OutEdgeList=slistS</tt> then the
|
||||
<tt>out_edge_iterator</tt> models <a
|
||||
href="http://www.sgi.com/tech/stl/ForwardIterator.html">
|
||||
href="http://www.boost.org/sgi/stl/ForwardIterator.html">
|
||||
ForwardIterator</a>. Otherwise the <tt>out_edge_iterator</tt> models
|
||||
<a
|
||||
href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">
|
||||
href="http://www.boost.org/sgi/stl/BidirectionalIterator.html">
|
||||
BidirectionalIterator</a>.
|
||||
|
||||
<hr>
|
||||
@@ -438,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.
|
||||
@@ -453,9 +474,9 @@ The type used for dealing with the number of vertices in the graph.
|
||||
|
||||
<hr>
|
||||
|
||||
<tt>graph_traits<adjacency_list>::edge_size_type</tt><br>
|
||||
<tt>graph_traits<adjacency_list>::edges_size_type</tt><br>
|
||||
and<br>
|
||||
<tt>adjacency_list_traits<OutEdgeList, VertexList, Directed_list, EdgeList>::edge_size_type</tt><br>
|
||||
<tt>adjacency_list_traits<OutEdgeList, VertexList, Directed_list, EdgeList>::edges_size_type</tt><br>
|
||||
<br><br>
|
||||
The type used for dealing with the number of edges in the graph.
|
||||
|
||||
@@ -539,7 +560,7 @@ Assignment operator. Makes this graph a copy of graph
|
||||
<hr>
|
||||
|
||||
<pre>
|
||||
adjacency_list(vertices_size_type n,
|
||||
adjacency_list(vertices_size_type n,
|
||||
const GraphProperty& p = GraphProperty())
|
||||
</pre>
|
||||
Creates a graph object with <TT>n</TT> vertices and zero edges.
|
||||
@@ -550,14 +571,14 @@ Creates a graph object with <TT>n</TT> vertices and zero edges.
|
||||
<pre>
|
||||
template <class EdgeIterator>
|
||||
adjacency_list(EdgeIterator first, EdgeIterator last,
|
||||
vertices_size_type n,
|
||||
edges_size_type m = 0,
|
||||
vertices_size_type n,
|
||||
edges_size_type m = 0,
|
||||
const GraphProperty& p = GraphProperty())
|
||||
</pre>
|
||||
Creates a graph object with <TT>n</TT> vertices and with the edges
|
||||
specified in the edge list given by the range <TT>[first, last)</TT>.
|
||||
The <tt>EdgeIterator</tt> must be a model of <a
|
||||
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>.
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>.
|
||||
The value type of the <TT>EdgeIterator</TT> must be a
|
||||
<TT>std::pair</TT>, where the type in the pair is an integer type. The
|
||||
integers will correspond to vertices, and they must all fall in the
|
||||
@@ -571,14 +592,14 @@ template <class EdgeIterator, class EdgePropertyIterator>
|
||||
adjacency_list(EdgeIterator first, EdgeIterator last,
|
||||
EdgePropertyIterator ep_iter,
|
||||
vertices_size_type n,
|
||||
vertices_size_type m = 0,
|
||||
edges_size_type m = 0,
|
||||
const GraphProperty& p = GraphProperty())
|
||||
</pre>
|
||||
Creates a graph object with <TT>n</TT> vertices and with the edges
|
||||
specified in the edge list given by the range <TT>[first, last)</TT>.
|
||||
The <tt>EdgeIterator</tt> and <tt>EdgePropertyIterator</tt> must be a
|
||||
model of <a
|
||||
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>.
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>.
|
||||
The value type of the <TT>EdgeIterator</TT> must be a
|
||||
<TT>std::pair</TT>, where the type in the pair is an integer type. The
|
||||
integers will correspond to vertices, and they must all fall in the
|
||||
@@ -600,7 +621,7 @@ void swap(adjacency_list& x)
|
||||
Swap the vertices, edges, and properties of this graph with the
|
||||
vertices, edges, and properties of graph <tt>x</tt>.
|
||||
<hr>
|
||||
|
||||
|
||||
<P>
|
||||
|
||||
<H2>Non-Member Functions</H2>
|
||||
@@ -742,8 +763,10 @@ std::pair<edge_descriptor, bool>
|
||||
edge(vertex_descriptor u, vertex_descriptor v,
|
||||
const adjacency_list& g)
|
||||
</pre>
|
||||
Returns an edge connecting vertex <tt>u</tt> to vertex <tt>v</tt> in
|
||||
graph <tt>g</tt>.
|
||||
If an edge from vertex <tt>u</tt> to vertex <tt>v</tt> exists, return a pair
|
||||
containing one such edge and <tt>true</tt>. If there are no edges between
|
||||
<tt>u</tt> and <tt>v</tt>, return a pair with an arbitrary edge descriptor and
|
||||
<tt>false</tt>.
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -781,7 +804,7 @@ returned edge descriptor points to the already existing edge.
|
||||
<p>
|
||||
The placement of the new edge in the out-edge list is in general
|
||||
unspecified, though ordering of the out-edge list can be accomplished
|
||||
through the choice of <tt>OutEdgeList</tt>.
|
||||
through the choice of <tt>OutEdgeList</tt>.
|
||||
|
||||
If the <tt>VertexList</tt> selector is
|
||||
<tt>vecS</tt>, and if either vertex descriptor <tt>u</tt> or
|
||||
@@ -813,7 +836,7 @@ add_edge(vertex_descriptor u, vertex_descriptor 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>
|
||||
|
||||
@@ -821,7 +844,7 @@ value of the edge's internal property storage. Also see the previous
|
||||
void remove_edge(vertex_descriptor u, vertex_descriptor v,
|
||||
adjacency_list& g)
|
||||
</pre>
|
||||
Removes the edge <i>(u,v)</i> from the graph.
|
||||
Removes the edge <i>(u,v)</i> from the graph.
|
||||
<p>
|
||||
This operation causes any outstanding edge descriptors or iterators
|
||||
that point to edge <i>(u,v)</i> to become invalid. In addition, if
|
||||
@@ -861,13 +884,13 @@ has time complexity <i>O(E/V)</i>.
|
||||
<hr>
|
||||
|
||||
<pre>
|
||||
template <class <a href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>>
|
||||
template <class <a href="http://www.boost.org/sgi/stl/Predicate.html">Predicate</a>>
|
||||
void remove_out_edge_if(vertex_descriptor u, Predicate predicate,
|
||||
adjacency_list& g)
|
||||
</pre>
|
||||
Removes all out-edges of vertex <i>u</i> from the graph that satisfy
|
||||
the <tt>predicate</tt>. That is, if the predicate returns true when
|
||||
applied to an edge descriptor, then the edge is removed.
|
||||
applied to an edge descriptor, then the edge is removed.
|
||||
<p>
|
||||
The affect on descriptor and iterator stability is the same as that of
|
||||
invoking <tt>remove_edge()</tt> on each of the removed edges.
|
||||
@@ -876,7 +899,7 @@ invoking <tt>remove_edge()</tt> on each of the removed edges.
|
||||
|
||||
<pre>
|
||||
template <class <a
|
||||
href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>>
|
||||
href="http://www.boost.org/sgi/stl/Predicate.html">Predicate</a>>
|
||||
void remove_in_edge_if(vertex_descriptor v, Predicate predicate,
|
||||
adjacency_list& g)
|
||||
</pre>
|
||||
@@ -894,12 +917,12 @@ This operation is available for undirected and bidirectional
|
||||
<hr>
|
||||
|
||||
<pre>
|
||||
template <class <a href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>>
|
||||
template <class <a href="http://www.boost.org/sgi/stl/Predicate.html">Predicate</a>>
|
||||
void remove_edge_if(Predicate predicate, adjacency_list& g)
|
||||
</pre>
|
||||
Removes all edges from the graph that satisfy
|
||||
the <tt>predicate</tt>. That is, if the predicate returns true when
|
||||
applied to an edge descriptor, then the edge is removed.
|
||||
applied to an edge descriptor, then the edge is removed.
|
||||
<p>
|
||||
The affect on descriptor and iterator stability is the same as that of
|
||||
invoking <tt>remove_edge()</tt> on each of the removed edges.
|
||||
@@ -912,7 +935,7 @@ vertex_descriptor
|
||||
add_vertex(adjacency_list& g)
|
||||
</pre>
|
||||
Adds a vertex to the graph and returns the vertex descriptor for the
|
||||
new vertex.
|
||||
new vertex.
|
||||
</a>
|
||||
|
||||
<hr>
|
||||
@@ -975,7 +998,7 @@ void remove_vertex(vertex_descriptor u, adjacency_list& g)
|
||||
Remove vertex <i>u</i> from the vertex set of the graph. It is assumed
|
||||
that there are no edges to or from vertex <i>u</i> when it is removed.
|
||||
One way to make sure of this is to invoke <TT>clear_vertex()</TT>
|
||||
beforehand.
|
||||
beforehand.
|
||||
<p>
|
||||
If the <TT>VertexList</TT> template parameter of the
|
||||
<TT>adjacency_list</TT> was <TT>vecS</TT>, then all vertex
|
||||
@@ -1099,18 +1122,18 @@ Include <a href="../../../boost/graph/adj_list_serialize.hpp"><tt>boost/graph/ad
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
<!-- LocalWords: gif ALT OutEdgeList EdgeList VertexList html VertexProperties EdgeProperties
|
||||
-->
|
||||
<!-- LocalWords: GraphPropertyTag cpp enum ai cout endl VertexAndEdgeListGraph
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: Graph Traits</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -79,8 +79,8 @@ The selector type whether the graph is directed or undirected.
|
||||
<h3>Model of</h3>
|
||||
|
||||
<a
|
||||
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a> and
|
||||
<a href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>
|
||||
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">DefaultConstructible</a> and
|
||||
<a href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>
|
||||
|
||||
<h3>Type Requirements</h3>
|
||||
|
||||
@@ -144,15 +144,15 @@ parallel edges (<tt>disallow_parallel_edge_tag</tt>).
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+40
-40
@@ -1,23 +1,23 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Adjacency Matrix</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<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:adjacency-matrix-class"></A>
|
||||
<pre>
|
||||
adjacency_matrix<Directed, VertexProperty,
|
||||
adjacency_matrix<Directed, VertexProperty,
|
||||
EdgeProperty, GraphProperty,
|
||||
Allocator>
|
||||
</pre>
|
||||
@@ -32,7 +32,7 @@ href="#fig:adj-matrix-graph">Figure 1</a> shows the adjacency matrix
|
||||
representation of a graph.
|
||||
|
||||
<P></P>
|
||||
<DIV ALIGN="center"><A NAME="fig:adj-matrix-graph"></A><A NAME="1509"></A>
|
||||
<DIV ALIGN="center"><A NAME="fig:adj-matrix-graph"></A>
|
||||
<TABLE>
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1:</STRONG> Adjacency Matrix Representation of a Directed Graph.</CAPTION>
|
||||
<TR><TD><IMG SRC="./figs/adj-matrix-graph3.gif" width="386" height="284"></TD>
|
||||
@@ -61,7 +61,7 @@ href="adjacency_list.html"><tt>adjacency_list</tt></a>. These may be
|
||||
<a
|
||||
href="using_adjacency_list.html#sec:adjacency-list-properties">interior
|
||||
properties</a>. The types of all property values must be
|
||||
Copy Constructible, Assignable and Default Constructible.
|
||||
Copy Constructible, Assignable and Default Constructible.
|
||||
|
||||
In the case of an undirected graph, the
|
||||
<tt>adjacency_matrix</tt>. class does not use a full <i>V x V</i>
|
||||
@@ -72,9 +72,9 @@ href="#fig:undir-adj-matrix-graph">Figure 2</a> shows an adjacency
|
||||
matrix representation of an undirected graph.
|
||||
|
||||
<P></P>
|
||||
<DIV ALIGN="center"><A NAME="fig:undir-adj-matrix-graph"></A><A NAME="1509"></A>
|
||||
<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>
|
||||
@@ -83,11 +83,11 @@ matrix representation of an undirected graph.
|
||||
|
||||
<h3>Example</h3>
|
||||
|
||||
Creating the graph of <a href="#fig:adj-matrix-graph">Figure 1</a>.
|
||||
Creating the graph of <a href="#fig:adj-matrix-graph">Figure 1</a>.
|
||||
<pre>
|
||||
enum { A, B, C, D, E, F, N };
|
||||
const char* name = "ABCDEF";
|
||||
|
||||
|
||||
typedef boost::adjacency_matrix<boost::directedS> Graph;
|
||||
Graph g(N);
|
||||
add_edge(B, C, g);
|
||||
@@ -112,17 +112,17 @@ Creating the graph of <a href="#fig:adj-matrix-graph">Figure 1</a>.
|
||||
</pre>
|
||||
The output is:
|
||||
<pre>
|
||||
vertex set: A B C D E F
|
||||
vertex set: A B C D E F
|
||||
|
||||
edge set: (B,C) (B,F) (C,A) (C,C) (D,E) (E,D) (F,A)
|
||||
edge set: (B,C) (B,F) (C,A) (C,C) (D,E) (E,D) (F,A)
|
||||
|
||||
out-edges:
|
||||
A -->
|
||||
B --> C F
|
||||
C --> A C
|
||||
D --> E
|
||||
E --> D
|
||||
F --> A
|
||||
out-edges:
|
||||
A -->
|
||||
B --> C F
|
||||
C --> A C
|
||||
D --> E
|
||||
E --> D
|
||||
F --> A
|
||||
</pre>
|
||||
|
||||
Creating the graph of <a href="#fig:undir-adj-matrix-graph">Figure 2</a>.
|
||||
@@ -152,17 +152,17 @@ Creating the graph of <a href="#fig:undir-adj-matrix-graph">Figure 2</a>.
|
||||
</pre>
|
||||
The output is:
|
||||
<pre>
|
||||
vertex set: A B C D E F
|
||||
vertex set: A B C D E F
|
||||
|
||||
edge set: (C,A) (C,B) (E,D) (F,A) (F,B)
|
||||
edge set: (C,A) (C,B) (E,D) (F,A) (F,B)
|
||||
|
||||
incident edges:
|
||||
A <--> C F
|
||||
B <--> C F
|
||||
C <--> A B
|
||||
D <--> E
|
||||
E <--> D
|
||||
F <--> A B
|
||||
incident edges:
|
||||
A <--> C F
|
||||
B <--> C F
|
||||
C <--> A B
|
||||
D <--> E
|
||||
E <--> D
|
||||
F <--> A B
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ The output is:
|
||||
|
||||
<h3>Model Of</h3>
|
||||
|
||||
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>,
|
||||
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>,
|
||||
<a href="./IncidenceGraph.html">Incidence Graph</a>,
|
||||
<a href="./BidirectionalGraph.html">Bidirectional Graph</a>,
|
||||
<a
|
||||
@@ -215,7 +215,7 @@ href="./MutablePropertyGraph.html">MutablePropertyGraph</a>,
|
||||
and <a href="../../utility/Assignable.html">Assignable</a>.
|
||||
|
||||
|
||||
<h3>Associates Types</h3>
|
||||
<h3>Associated Types</h3>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -236,8 +236,8 @@ The type for the edge descriptors associated with the
|
||||
<hr>
|
||||
<tt>graph_traits<adjacency_matrix>::vertex_iterator</tt>
|
||||
<br><br>
|
||||
The type for the iterators returned by <tt>vertices()</tt>.
|
||||
The vertex iterator models <a href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>. <br>
|
||||
The type for the iterators returned by <tt>vertices()</tt>.
|
||||
The vertex iterator models <a href="http://www.boost.org/sgi/stl/RandomAccessIterator.html">RandomAccessIterator</a>. <br>
|
||||
(Required by <a href="VertexListGraph.html">VertexListGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -420,7 +420,7 @@ degree_size_type
|
||||
out_degree(vertex_descriptor u, const adjacency_matrix& g)
|
||||
</pre>
|
||||
Returns the number of edges leaving vertex <tt>u</tt>.<br>
|
||||
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
|
||||
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
|
||||
<hr>
|
||||
|
||||
<hr>
|
||||
@@ -440,7 +440,7 @@ degree_size_type
|
||||
in_degree(vertex_descriptor u, const adjacency_matrix& g)
|
||||
</pre>
|
||||
Returns the number of edges entering vertex <tt>u</tt>.<br>
|
||||
(Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
|
||||
(Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
|
||||
<hr>
|
||||
|
||||
<hr>
|
||||
|
||||
+12
-12
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) 2004 Kris Beevers
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) 2004 Kris Beevers
|
||||
|
||||
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: astar_heuristic</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -86,11 +86,11 @@ to a goal.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://www.cs.rpi.edu/~beevek/">Kristopher Beevers</A>,
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
|
||||
Rensselaer Polytechnic Institute (<A
|
||||
HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+162
-50
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) 2004 Kris Beevers
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) 2004 Kris Beevers
|
||||
|
||||
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: A* Heuristic Search</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -22,13 +22,40 @@
|
||||
|
||||
<P>
|
||||
<PRE>
|
||||
<i>// Named parameter interface</i>
|
||||
<i>// Named parameter interfaces</i>
|
||||
template <typename VertexListGraph,
|
||||
typename AStarHeuristic,
|
||||
typename P, typename T, typename R>
|
||||
void
|
||||
astar_search
|
||||
(VertexListGraph &g,
|
||||
(const VertexListGraph &g,
|
||||
typename graph_traits<VertexListGraph>::vertex_descriptor s,
|
||||
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params<P, T, R>& params);
|
||||
|
||||
template <typename VertexListGraph,
|
||||
typename AStarHeuristic,
|
||||
typename P, typename T, typename R>
|
||||
void
|
||||
astar_search_no_init
|
||||
(const IncidenceGraph &g,
|
||||
typename graph_traits<VertexListGraph>::vertex_descriptor s,
|
||||
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params<P, T, R>& params);
|
||||
|
||||
template <typename VertexListGraph,
|
||||
typename AStarHeuristic,
|
||||
typename P, typename T, typename R>
|
||||
void
|
||||
astar_search_tree
|
||||
(const VertexListGraph &g,
|
||||
typename graph_traits<VertexListGraph>::vertex_descriptor s,
|
||||
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params<P, T, R>& params);
|
||||
|
||||
template <typename VertexListGraph,
|
||||
typename AStarHeuristic,
|
||||
typename P, typename T, typename R>
|
||||
void
|
||||
astar_search_no_init_tree
|
||||
(const IncidenceGraph &g,
|
||||
typename graph_traits<VertexListGraph>::vertex_descriptor s,
|
||||
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params<P, T, R>& params);
|
||||
|
||||
@@ -38,11 +65,11 @@ template <typename VertexListGraph, typename AStarHeuristic,
|
||||
typename CostMap, typename DistanceMap,
|
||||
typename WeightMap, typename VertexIndexMap,
|
||||
typename ColorMap,
|
||||
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 <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
|
||||
typename CostInf, typename CostZero>
|
||||
inline void
|
||||
astar_search
|
||||
(VertexListGraph &g,
|
||||
(const VertexListGraph &g,
|
||||
typename graph_traits<VertexListGraph>::vertex_descriptor s,
|
||||
AStarHeuristic h, AStarVisitor vis,
|
||||
PredecessorMap predecessor, CostMap cost,
|
||||
@@ -50,6 +77,61 @@ astar_search
|
||||
VertexIndexMap index_map, ColorMap color,
|
||||
CompareFunction compare, CombineFunction combine,
|
||||
CostInf inf, CostZero zero);
|
||||
|
||||
template <typename VertexListGraph, typename AStarHeuristic,
|
||||
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
|
||||
typename CostMap, typename DistanceMap,
|
||||
typename WeightMap,
|
||||
typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
|
||||
typename CostInf, typename CostZero>
|
||||
inline void
|
||||
astar_search_tree
|
||||
(const VertexListGraph &g,
|
||||
typename graph_traits<VertexListGraph>::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 <typename IncidenceGraph, typename AStarHeuristic,
|
||||
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
|
||||
typename CostMap, typename DistanceMap,
|
||||
typename WeightMap, typename ColorMap,
|
||||
typename VertexIndexMap,
|
||||
typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
|
||||
typename CostInf, typename CostZero>
|
||||
inline void
|
||||
astar_search_no_init
|
||||
(const IncidenceGraph &g,
|
||||
typename graph_traits<IncidenceGraph>::vertex_descriptor s,
|
||||
AStarHeuristic h, AStarVisitor vis,
|
||||
PredecessorMap predecessor, CostMap cost,
|
||||
DistanceMap distance, WeightMap weight,
|
||||
ColorMap color, VertexIndexMap index_map,
|
||||
CompareFunction compare, CombineFunction combine,
|
||||
CostInf inf, CostZero zero);
|
||||
|
||||
<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 <typename IncidenceGraph, typename AStarHeuristic,
|
||||
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
|
||||
typename CostMap, typename DistanceMap,
|
||||
typename WeightMap,
|
||||
typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
|
||||
typename CostInf, typename CostZero>
|
||||
inline void
|
||||
astar_search_no_init_tree
|
||||
(const IncidenceGraph &g,
|
||||
typename graph_traits<IncidenceGraph>::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>
|
||||
@@ -88,16 +170,24 @@ A* is particularly useful for searching <i>implicit</i> graphs.
|
||||
Implicit graphs are graphs that are not completely known at the
|
||||
beginning of the search. Upon visiting a vertex, its neighbors are
|
||||
"generated" and added to the search. Implicit graphs are particularly
|
||||
useful for searching large state spaces -- in gameplaying scenarios
|
||||
useful for searching large state spaces -- in game-playing scenarios
|
||||
(e.g. chess), for example -- in which it may not be possible to store
|
||||
the entire graph. Implicit searches can be performed with this
|
||||
implementation of A* by creating special visitors that generate
|
||||
neighbors of newly-expanded vertices.
|
||||
neighbors of newly-expanded vertices. Please note that
|
||||
<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
|
||||
also require the graph type to model the <a
|
||||
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
|
||||
@@ -108,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>
|
||||
@@ -203,12 +297,21 @@ finish vertex <i>u</i>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
|
||||
IN: <tt>VertexListGraph& g</tt>
|
||||
IN: <tt>const VertexListGraph& g</tt>
|
||||
<blockquote>
|
||||
The graph object on which the algorithm will be applied. The type
|
||||
The graph object on which the algorithm will be applied for <tt>astar_search()</tt>. The type
|
||||
<tt>VertexListGraph</tt> must be a model of the <a
|
||||
href="VertexListGraph.html">
|
||||
Vertex List Graph</a> concept.
|
||||
Vertex List Graph</a> and <a href="IncidenceGraph.html">Incidence Graph</a>
|
||||
concepts.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>const IncidenceGraph& g</tt>
|
||||
<blockquote>
|
||||
The graph object on which the algorithm will be applied for <tt>astar_search_no_init()</tt>. The type
|
||||
<tt>IncidenceGraph</tt> must be a model of the
|
||||
<a href="IncidenceGraph.html">Incidence Graph</a>
|
||||
concept.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>vertex_descriptor s</tt>
|
||||
@@ -234,7 +337,7 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
|
||||
href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
|
||||
exception if one of the edges is negative. The type
|
||||
<tt>WeightMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadablePropertyMap.html"><tt>Readable
|
||||
href="../../property_map/doc/ReadablePropertyMap.html"><tt>Readable
|
||||
Property Map</tt></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
|
||||
@@ -245,10 +348,11 @@ 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/ReadablePropertyMap.html"><tt>Readable
|
||||
href="../../property_map/doc/ReadablePropertyMap.html"><tt>Readable
|
||||
Property Map</tt></a>. The value type of the map must be an integer
|
||||
type. The vertex descriptor type of the graph needs to be usable as
|
||||
the key type of the map.<br>
|
||||
@@ -256,7 +360,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>
|
||||
|
||||
@@ -269,7 +373,7 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
|
||||
<tt>p[u] = u</tt> then <tt>u</tt> is either the start vertex or a
|
||||
vertex that is not reachable from the start. The
|
||||
<tt>PredecessorMap</tt> type must be a <a
|
||||
href="../../property_map/ReadWritePropertyMap.html"><tt>Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html"><tt>Read/Write
|
||||
Property Map</tt></a> with key and vertex types the same as the
|
||||
vertex descriptor type of the graph.<br>
|
||||
|
||||
@@ -283,18 +387,21 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
|
||||
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/ReadWritePropertyMap.html"><tt>Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html"><tt>Read/Write
|
||||
Property Map</tt></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 is the element type of a <a
|
||||
href="./Monoid.html"><tt>Monoid</tt></a> formed with the
|
||||
<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>
|
||||
href="http://www.boost.org/sgi/stl/StrictWeakOrdering.html"><tt>StrictWeakOrdering</tt></a>
|
||||
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>iterator_property_map</tt> created from a
|
||||
<tt>std::vector</tt> with the same value type as the
|
||||
<b>Default:</b> <tt>shared_array_property_map</tt>
|
||||
with the same value type as the
|
||||
<tt>WeightMap</tt>, and of size <tt>num_vertices(g)</tt>, and using
|
||||
the <tt>i_map</tt> for the index map.
|
||||
</blockquote>
|
||||
@@ -307,28 +414,33 @@ UTIL/OUT: <tt>rank_map(CostMap c_map)</tt>
|
||||
the estimated cost (as returned by the heuristic function
|
||||
<tt>h</tt>) from the vertex to a goal. The type <tt>CostMap</tt>
|
||||
must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html"><tt>Read/Write
|
||||
Property Map</tt></a>. The vertex descriptor type of the graph
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html"><tt>Read/Write
|
||||
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
|
||||
<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>
|
||||
href="http://www.boost.org/sgi/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>iterator_property_map</tt> created from a
|
||||
<tt>std::vector</tt> with the same value type as the
|
||||
<tt>WeightMap</tt>, and of size <tt>num_vertices(g)</tt>, and using
|
||||
<b>Default:</b> <tt>shared_array_property_map</tt>
|
||||
with the same value type as the
|
||||
<tt>DistanceMap</tt>, and of size <tt>num_vertices(g)</tt>, and using
|
||||
the <tt>i_map</tt> for the index map.
|
||||
</blockquote>
|
||||
|
||||
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
|
||||
@@ -336,15 +448,15 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
|
||||
reachable from the source vertex will have been colored black. All
|
||||
other vertices will still be white. The type <tt>ColorMap</tt> must
|
||||
be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html"><tt>Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html"><tt>Read/Write
|
||||
Property Map</tt></a>. A vertex descriptor must be usable as the
|
||||
key type of the map, and the value type of the map must be a model
|
||||
of <a href="./ColorValue.html"><tt>Color Value</tt></a>.<br>
|
||||
|
||||
<b>Default:</b> <tt>iterator_property_map</tt> created from a
|
||||
<tt>std::vector</tt> of value type <tt>default_color_type</tt>, with
|
||||
size <tt>num_vertices(g)</tt>, and using the <tt>i_map</tt> for the
|
||||
index map.
|
||||
<b>Default:</b> <tt>shared_array_property_map</tt>
|
||||
of value type <tt>default_color_type</tt>, with size
|
||||
<tt>num_vertices(g)</tt>, and using
|
||||
the <tt>i_map</tt> for the index map.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_compare(CompareFunction cmp)</tt>
|
||||
@@ -354,7 +466,7 @@ IN: <tt>distance_compare(CompareFunction cmp)</tt>
|
||||
is closer to the start vertex, and to compare <i>f</i>-values to
|
||||
determine which vertex on the OPEN list to examine next. The
|
||||
<tt>CompareFunction</tt> type must be a model of <a
|
||||
href="http://www.sgi.com/tech/stl/BinaryPredicate.html"><tt>Binary
|
||||
href="http://www.boost.org/sgi/stl/BinaryPredicate.html"><tt>Binary
|
||||
Predicate</tt></a> and have argument types that match the value type
|
||||
of the <tt>DistanceMap</tt> property map.<br>
|
||||
|
||||
@@ -369,7 +481,7 @@ IN: <tt>distance_combine(CombineFunction cmb)</tt>
|
||||
of a path, and to combine distance and heuristic values to compute
|
||||
the <i>f</i>-value of a vertex. The <tt>CombineFunction</tt> type
|
||||
must be a model of <a
|
||||
href="http://www.sgi.com/tech/stl/BinaryFunction.html"><tt>Binary
|
||||
href="http://www.boost.org/sgi/stl/BinaryFunction.html"><tt>Binary
|
||||
Function</tt></a>. Both argument types of the binary function must
|
||||
match the value type of the <tt>DistanceMap</tt> property map (which
|
||||
is the same as that of the <tt>WeightMap</tt> and <tt>CostMap</tt>
|
||||
@@ -436,7 +548,7 @@ The time complexity is <i>O((E + V) log V)</i>.
|
||||
is invoked on each out-edge of a vertex immediately after it is
|
||||
examined.
|
||||
<li><b><tt>vis.edge_relaxed(e, g)</tt></b>
|
||||
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
|
||||
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
|
||||
<li><b><tt>vis.edge_not_relaxed(e, g)</tt></b>
|
||||
is invoked if the edge is not relaxed (see above).
|
||||
<li><b><tt>vis.black_target(e, g)</tt></b>
|
||||
@@ -467,11 +579,11 @@ this state by pointer or reference.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://www.cs.rpi.edu/~beevek/">Kristopher Beevers</A>,
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
|
||||
Rensselaer Polytechnic Institute (<A
|
||||
HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+12
-12
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) 2004 Kris Beevers
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) 2004 Kris Beevers
|
||||
|
||||
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: astar_visitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -98,11 +98,11 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://www.cs.rpi.edu/~beevek/">Kristopher Beevers</A>,
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
|
||||
Rensselaer Polytechnic Institute (<A
|
||||
HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+13
-13
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Bandwidth</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -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>
|
||||
@@ -85,9 +85,9 @@ of the i-th bandwidths <i>B<sub>i</sub>(G)</i>.<br>
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+19
-19
@@ -1,10 +1,10 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<!--
|
||||
-- Copyright (c) 2004 Trustees of Indiana University
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) 2004 Trustees of Indiana University
|
||||
|
||||
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)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
|
||||
<IMG SRC="../../../boost.png"
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<h1><img src="figs/python.gif" alt="(Python)"/><span class="refentrytitle">Function
|
||||
@@ -36,23 +36,23 @@ clustering based on edge betweenness centrality.</p>
|
||||
<span class="bold"><b>template</b></span><<span class=
|
||||
"bold"><b>typename</b></span> MutableGraph, <span class=
|
||||
"bold"><b>typename</b></span> Done, <span class=
|
||||
"bold"><b>typename</b></span> EdgeCentralityMap,
|
||||
"bold"><b>typename</b></span> EdgeCentralityMap,
|
||||
<span class=
|
||||
"bold"><b>typename</b></span> VertexIndexMap>
|
||||
"bold"><b>typename</b></span> VertexIndexMap>
|
||||
<span class="type"><span class=
|
||||
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph & g, Done done,
|
||||
EdgeCentralityMap edge_centrality,
|
||||
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph & g, Done done,
|
||||
EdgeCentralityMap edge_centrality,
|
||||
VertexIndexMap vertex_index);
|
||||
<span class="bold"><b>template</b></span><<span class=
|
||||
"bold"><b>typename</b></span> MutableGraph, <span class=
|
||||
"bold"><b>typename</b></span> Done, <span class=
|
||||
"bold"><b>typename</b></span> EdgeCentralityMap>
|
||||
"bold"><b>typename</b></span> EdgeCentralityMap>
|
||||
<span class="type"><span class=
|
||||
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph & g, Done done,
|
||||
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph & g, Done done,
|
||||
EdgeCentralityMap edge_centrality);
|
||||
<span class="bold"><b>template</b></span><<span class=
|
||||
"bold"><b>typename</b></span> MutableGraph, <span class=
|
||||
"bold"><b>typename</b></span> Done>
|
||||
"bold"><b>typename</b></span> Done>
|
||||
<span class="type"><span class=
|
||||
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph & g, Done done);
|
||||
</pre></div>
|
||||
@@ -61,7 +61,7 @@ clustering based on edge betweenness centrality.</p>
|
||||
<h2>Description</h2>
|
||||
<p>This algorithm implements graph clustering based on edge
|
||||
betweenness centrality. It is an iterative algorithm, where in each
|
||||
step it compute the edge betweenness centrality (via <a href=
|
||||
step it computes the edge betweenness centrality (via <a href=
|
||||
"betweenness_centrality.html">brandes_betweenness_centrality</a>) and
|
||||
removes the edge with the maximum betweenness centrality. The
|
||||
<tt class="computeroutput">done</tt> function object determines
|
||||
@@ -96,7 +96,7 @@ OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
|
||||
This property map is used to accumulate the betweenness centrality
|
||||
of each edge, and is a secondary form of output for the
|
||||
algorithm. The type <tt>EdgeCentralityMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a>, with the graph's edge descriptor type as its key
|
||||
type. The value type of this property map should be the same as the
|
||||
value type of the <tt>CentralityMap</tt> property map.<br>
|
||||
@@ -108,19 +108,19 @@ OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
|
||||
<b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt>
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>VertexIndexMap vertex_index</tt>
|
||||
IN: <tt>VertexIndexMap vertex_index</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 the
|
||||
heap data structure when an edge is relaxed. The type
|
||||
<tt>VertexIndexMap</tt> must be a model of
|
||||
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
|
||||
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
|
||||
integer type. The vertex descriptor type of the graph needs to be
|
||||
usable as the key type of the map.<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.<br>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
@@ -142,7 +142,7 @@ IN: <tt>VertexIndexMap vertex_index</tt>
|
||||
<td nowrap>Copyright © 2004</td>
|
||||
<td><a href="http://www.boost.org/people/doug_gregor.html">Douglas Gregor</a>,
|
||||
Indiana University (dgregor@cs.indiana.edu)<br>
|
||||
<a href="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</a>, Indiana
|
||||
<a href="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</a>, Indiana
|
||||
University (<a href=
|
||||
"mailto:lums@osl.iu.edu">lums@osl.iu.edu</a>)</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Bellman Ford Shortest Paths</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<PRE>
|
||||
<i>// named paramter version</i>
|
||||
template <class <a href="./EdgeListGraph.html">EdgeListGraph</a>, class Size, class P, class T, class R>
|
||||
bool bellman_ford_shortest_paths(const EdgeListGraph& g, Size N,
|
||||
bool bellman_ford_shortest_paths(const EdgeListGraph& g, Size N,
|
||||
const bgl_named_params<P, T, R>& params = <i>all defaults</i>);
|
||||
|
||||
template <class <a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>, class P, class T, class R>
|
||||
@@ -34,10 +34,10 @@ bool bellman_ford_shortest_paths(const VertexAndEdgeListGraph& g,
|
||||
<i>// non-named parameter version</i>
|
||||
template <class <a href="./EdgeListGraph.html">EdgeListGraph</a>, class Size, class WeightMap,
|
||||
class PredecessorMap, class DistanceMap,
|
||||
class <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">BinaryFunction</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>,
|
||||
class <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">BinaryFunction</a>, class <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>,
|
||||
class <a href="./BellmanFordVisitor.html">BellmanFordVisitor</a>>
|
||||
bool bellman_ford_shortest_paths(EdgeListGraph& g, Size N,
|
||||
WeightMap weight, PredecessorMap pred, DistanceMap distance,
|
||||
bool bellman_ford_shortest_paths(EdgeListGraph& g, Size N,
|
||||
WeightMap weight, PredecessorMap pred, DistanceMap distance,
|
||||
BinaryFunction combine, BinaryPredicate compare, BellmanFordVisitor v)
|
||||
</PRE>
|
||||
|
||||
@@ -51,7 +51,7 @@ shortest paths problem for a graph with both positive and negative
|
||||
edge weights. For the definition of the shortest paths problem see
|
||||
Section <A
|
||||
HREF="./graph_theory_review.html#sec:shortest-paths-algorithms">Shortest-Paths
|
||||
Algorithms</A>.
|
||||
Algorithms</A>.
|
||||
If you only need to solve the shortest paths problem for positive edge
|
||||
weights, Dijkstra's algorithm provides a more efficient
|
||||
alternative. If all the edge weights are all equal to one then breadth-first
|
||||
@@ -77,7 +77,7 @@ ultimately be the parent in the shortest paths tree
|
||||
<td valign="top">
|
||||
<pre>
|
||||
RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>)
|
||||
<b>if</b> (<i>w(u,v) + d[u] < d[v]</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>
|
||||
<b>else</b>
|
||||
@@ -91,7 +91,7 @@ RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>)
|
||||
relax edge <i>(u,v)</i>
|
||||
|
||||
|
||||
edge <i>(u,v)</i> is not relaxed
|
||||
edge <i>(u,v)</i> is not relaxed
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -115,19 +115,19 @@ otherwise.
|
||||
<pre>
|
||||
BELLMAN-FORD(<i>G</i>)
|
||||
<i>// Optional initialization</i>
|
||||
<b>for</b> each vertex <i>u in V</i>
|
||||
<b>for</b> each vertex <i>u in V</i>
|
||||
<i>d[u] := infinity</i>
|
||||
<i>p[u] := u</i>
|
||||
<i>p[u] := u</i>
|
||||
<b>end for</b>
|
||||
<b>for</b> <i>i := 1</i> <b>to</b> <i>|V|-1</i>
|
||||
<b>for</b> each edge <i>(u,v) in E</i>
|
||||
<b>for</b> <i>i := 1</i> <b>to</b> <i>|V|-1</i>
|
||||
<b>for</b> each edge <i>(u,v) in E</i>
|
||||
RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>)
|
||||
<b>end for</b>
|
||||
<b>end for</b>
|
||||
<b>for</b> each edge <i>(u,v) in E</i>
|
||||
<b>for</b> each edge <i>(u,v) in E</i>
|
||||
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
|
||||
<b>return</b> (false, , )
|
||||
<b>else</b>
|
||||
<b>else</b>
|
||||
...
|
||||
<b>end for</b>
|
||||
<b>return</b> (true, <i>p</i>, <i>d</i>)
|
||||
@@ -148,9 +148,9 @@ examine edge <i>(u,v)</i>
|
||||
|
||||
|
||||
|
||||
edge <i>(u,v)</i> was not minimized
|
||||
edge <i>(u,v)</i> was not minimized
|
||||
|
||||
edge <i>(u,v)</i> was minimized
|
||||
edge <i>(u,v)</i> was minimized
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -175,7 +175,7 @@ algorithm's event points.
|
||||
<h3>Parameters</h3>
|
||||
|
||||
|
||||
IN: <tt>EdgeListGraph& g</tt>
|
||||
IN: <tt>EdgeListGraph& g</tt>
|
||||
<blockquote>
|
||||
A directed or undirected graph whose type must be a model of
|
||||
<a href="./EdgeListGraph.html">Edge List Graph</a>. If a root vertex is
|
||||
@@ -201,7 +201,7 @@ 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/ReadablePropertyMap.html">Readable Property
|
||||
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>
|
||||
@@ -211,7 +211,7 @@ IN: <tt>weight_map(WeightMap w)</tt>
|
||||
<b>Python default</b>: <tt>graph.get_edge_double_map("weight")</tt>
|
||||
</blockquote>
|
||||
|
||||
OUT: <tt>predecessor_map(PredecessorMap p_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>
|
||||
@@ -219,7 +219,7 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
|
||||
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
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a> which key and vertex types the same as the vertex
|
||||
descriptor type of the graph.<br>
|
||||
<b>Default:</b> <tt>dummy_property_map</tt><br>
|
||||
@@ -227,16 +227,16 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
|
||||
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
|
||||
</blockquote>
|
||||
|
||||
IN/OUT: <tt>distance_map(DistanceMap d)</tt>
|
||||
IN/OUT: <tt>distance_map(DistanceMap d)</tt>
|
||||
<blockquote>
|
||||
The shortest path weight from the source vertex to each vertex in
|
||||
the graph <tt>g</tt> is recorded in this property map. The type
|
||||
<tt>DistanceMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a>. The key type of the property map must be the
|
||||
vertex descriptor type of the graph, and the value type of the
|
||||
distance map must be <a
|
||||
href="http://www.sgi.com/tech/stl/LessThanComparable.html"> Less
|
||||
href="http://www.boost.org/sgi/stl/LessThanComparable.html"> Less
|
||||
Than Comparable</a>.<br> <b>Default:</b> <tt>get(vertex_distance,
|
||||
g)</tt><br>
|
||||
<b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph.<br>
|
||||
@@ -307,11 +307,11 @@ The time complexity is <i>O(V E)</i>.
|
||||
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every edge in
|
||||
the graph <i>|V|</i> times.
|
||||
<li><b><tt>vis.edge_relaxed(e, g)</tt></b> is invoked when the distance
|
||||
label for the target vertex is decreased. The edge <i>(u,v)</i> that
|
||||
label for the target vertex is decreased. The edge <i>(u,v)</i> that
|
||||
participated in the last relaxation for vertex <i>v</i> is an edge in the
|
||||
shortest paths tree.
|
||||
shortest paths tree.
|
||||
<li><b><tt>vis.edge_not_relaxed(e, g)</tt></b> is invoked if the distance label
|
||||
for the target vertex is not decreased.
|
||||
for the target vertex is not decreased.
|
||||
<li><b><tt>vis.edge_minimized(e, g)</tt></b> is invoked during the
|
||||
second stage of the algorithm, during the test of whether each edge
|
||||
was minimized. If the edge is minimized then this function
|
||||
@@ -330,7 +330,7 @@ href="../example/bellman-example.cpp"><TT>examples/bellman-example.cpp</TT></a>.
|
||||
|
||||
<h3>Notes</h3>
|
||||
|
||||
<p><a name="1">[1]</a>
|
||||
<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
|
||||
@@ -346,4 +346,4 @@ href="../example/bellman-example.cpp"><TT>examples/bellman-example.cpp</TT></a>.
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+14
-14
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: bellman_visitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -22,7 +22,7 @@ bellman_visitor<EventVisitorList>
|
||||
</H1>
|
||||
|
||||
This class is an adapter that converts a list of <a
|
||||
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
|
||||
href="./EventVisitor.html">EventVisitor</a>s (constructed using
|
||||
<tt>std::pair</tt>) into a <a
|
||||
href="./BellmanFordVisitor.html">BellmanFordVisitor</a>.
|
||||
|
||||
@@ -63,7 +63,7 @@ with <tt>std::pair</tt>.
|
||||
This class implements all of the member functions required by <a
|
||||
href="./BellmanFordVisitor.html">BellmanFordVisitor</a>. In each function the
|
||||
appropriate event is dispatched to the <a
|
||||
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
|
||||
href="./EventVisitor.html">EventVisitor</a> in the EventVisitorList.
|
||||
|
||||
<h3>Non-Member Functions</h3>
|
||||
|
||||
@@ -97,15 +97,15 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -1,65 +1,65 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<!--
|
||||
-- Copyright (c) 2004 Trustees of Indiana University
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) 2004 Trustees of Indiana University
|
||||
|
||||
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: Brandes' Betweenness Centrality</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<h1><img src="figs/python.gif" alt="(Python)"/><tt>brandes_betweenness_centrality</tt></h1>
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
<em>// named parameter versions</em>
|
||||
template<typename Graph, typename Param, typename Tag, typename Rest>
|
||||
void
|
||||
void
|
||||
brandes_betweenness_centrality(const Graph& g,
|
||||
const bgl_named_params<Param,Tag,Rest>& params);
|
||||
|
||||
template<typename Graph, typename CentralityMap>
|
||||
void
|
||||
void
|
||||
brandes_betweenness_centrality(const Graph& g, CentralityMap centrality_map);
|
||||
|
||||
template<typename Graph, typename CentralityMap, typename EdgeCentralityMap>
|
||||
void
|
||||
void
|
||||
brandes_betweenness_centrality(const Graph& g, CentralityMap centrality_map,
|
||||
EdgeCentralityMap edge_centrality);
|
||||
|
||||
<em>// non-named parameter versions</em>
|
||||
template<typename Graph, typename CentralityMap, typename EdgeCentralityMap,
|
||||
typename IncomingMap, typename DistanceMap, typename DependencyMap,
|
||||
typename IncomingMap, typename DistanceMap, typename DependencyMap,
|
||||
typename PathCountMap, typename VertexIndexMap>
|
||||
void
|
||||
void
|
||||
brandes_betweenness_centrality(const Graph& g, CentralityMap centrality_map,
|
||||
EdgeCentralityMap edge_centrality,
|
||||
IncomingMap incoming,
|
||||
DistanceMap distance, DependencyMap dependency,
|
||||
PathCountMap path_count,
|
||||
PathCountMap path_count,
|
||||
VertexIndexMap vertex_index);
|
||||
|
||||
template<typename Graph, typename CentralityMap, typename EdgeCentralityMap,
|
||||
typename IncomingMap, typename DistanceMap, typename DependencyMap,
|
||||
typename PathCountMap, typename VertexIndexMap, typename WeightMap>
|
||||
void
|
||||
typename IncomingMap, typename DistanceMap, typename DependencyMap,
|
||||
typename PathCountMap, typename VertexIndexMap, typename WeightMap>
|
||||
void
|
||||
brandes_betweenness_centrality(const Graph& g, CentralityMap centrality_map,
|
||||
EdgeCentralityMap edge_centrality,
|
||||
IncomingMap incoming,
|
||||
IncomingMap incoming,
|
||||
DistanceMap distance, DependencyMap dependency,
|
||||
PathCountMap path_count,
|
||||
PathCountMap path_count,
|
||||
VertexIndexMap vertex_index,
|
||||
WeightMap weight_map);
|
||||
|
||||
<em>// helper functions</em>
|
||||
template<typename Graph, typename CentralityMap>
|
||||
void
|
||||
void
|
||||
relative_betweenness_centrality(const Graph& g, CentralityMap centrality_map);
|
||||
|
||||
template<typename Graph, typename CentralityMap>
|
||||
@@ -137,17 +137,17 @@ IN: <tt>const Graph& g</tt>
|
||||
|
||||
<b>Python</b>: The parameter is named <tt>graph</tt>.
|
||||
</blockquote>
|
||||
|
||||
UTIL: <tt>IncomingMap incoming</tt>
|
||||
|
||||
UTIL: <tt>IncomingMap incoming</tt>
|
||||
<blockquote>
|
||||
This property map records the set of edges incoming to each vertex that comprise a shortest path from a particular source vertex through this vertex, and is used internally by the algorithm.The <tt>IncomingMap</tt> type must be a <a
|
||||
href="../../property_map/LvaluePropertyMap.html">Lvalue Property
|
||||
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
|
||||
Map</a> whose key type is the same as the vertex descriptor type of
|
||||
the graph and whose value type is a Sequence (e.g., an
|
||||
<tt>std::vector</tt>) containing edge descriptors.<br>
|
||||
|
||||
<b>Default:</b> <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
<tt>iterator_property_map</tt></a> created from a
|
||||
<tt>std::vector</tt> of <tt>std::vector<Edge></tt>, where
|
||||
<tt>Edge</tt> is the edge descriptor type of the graph.<br>
|
||||
@@ -155,20 +155,20 @@ UTIL: <tt>IncomingMap incoming</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
UTIL: <tt>DistanceMap distance_map</tt>
|
||||
UTIL: <tt>DistanceMap distance_map</tt>
|
||||
<blockquote>
|
||||
The shortest path weight from each source vertex <tt>s</tt> to each
|
||||
vertex in the graph <tt>g</tt> is recorded in this property map, but
|
||||
the result is only used internally. The type <tt>DistanceMap</tt>
|
||||
must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
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 is the element type of a <a
|
||||
href="./Monoid.html">Monoid</a>.<br>
|
||||
|
||||
<b>Default:</b> <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
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 (or the
|
||||
<tt>vertices_size_type</tt> of the graph when no weight map exists)
|
||||
@@ -178,18 +178,18 @@ UTIL: <tt>DistanceMap distance_map</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
UTIL: <tt>DependencyMap dependency</tt>
|
||||
UTIL: <tt>DependencyMap dependency</tt>
|
||||
<blockquote>
|
||||
Property map used internally to accumulate partial betweenness
|
||||
centrality results. The type <tt>DependencyMap</tt> must be a model
|
||||
of <a href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
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 dependency map. The value type of
|
||||
the dependency map must be compatible with the value type of the
|
||||
centrality map.<br>
|
||||
|
||||
<b>Default:</b> <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
<tt>iterator_property_map</tt></a> created from a
|
||||
<tt>std::vector</tt> of the <tt>CentralityMap</tt>'s value type of
|
||||
size <tt>num_vertices(g)</tt> and using the <tt>vertex_index</tt>
|
||||
@@ -198,19 +198,19 @@ UTIL: <tt>DependencyMap dependency</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
UTIL: <tt>PathCountMap path_count</tt>
|
||||
UTIL: <tt>PathCountMap path_count</tt>
|
||||
<blockquote>
|
||||
Property map used internally to accumulate the number of paths that
|
||||
pass through each particular vertex. The type <tt>PathCountMap</tt>
|
||||
must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
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 dependency map. The value type of
|
||||
the dependency map must be an integral type large enough to store
|
||||
the number of paths in the graph.<br>
|
||||
|
||||
<b>Default:</b> <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
<tt>iterator_property_map</tt></a> created from a
|
||||
<tt>std::vector</tt> of the <tt>degree_size_type</tt> of the graph of
|
||||
size <tt>num_vertices(g)</tt> and using the <tt>vertex_index</tt>
|
||||
@@ -225,7 +225,7 @@ OUT/UTIL: <tt>CentralityMap centrality_map</tt>
|
||||
This property map is used to accumulate the betweenness centrality
|
||||
of each vertex, and is the primary output of the algorithm. The type
|
||||
<tt>CentralityMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a>, with the graph's vertex descriptor type as its key
|
||||
type. The value type of this property map should be a floating-point
|
||||
or rational type.<br>
|
||||
@@ -242,7 +242,7 @@ OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
|
||||
This property map is used to accumulate the betweenness centrality
|
||||
of each edge, and is a secondary form of output for the
|
||||
algorithm. The type <tt>EdgeCentralityMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a>, with the graph's edge descriptor type as its key
|
||||
type. The value type of this property map should be the same as the
|
||||
value type of the <tt>CentralityMap</tt> property map.<br>
|
||||
@@ -254,31 +254,31 @@ OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
|
||||
<b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt>
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>vertex_index_map(VertexIndexMap vertex_index)</tt>
|
||||
IN: <tt>vertex_index_map(VertexIndexMap vertex_index)</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 the
|
||||
heap data structure when an edge is relaxed. The type
|
||||
<tt>VertexIndexMap</tt> must be a model of
|
||||
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
|
||||
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
|
||||
integer type. The vertex descriptor type of the graph needs to be
|
||||
usable as the key type of the map.<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.<br>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>weight_map(WeightMap w_map)</tt>
|
||||
IN: <tt>weight_map(WeightMap w_map)</tt>
|
||||
<blockquote>
|
||||
The weight or ``length'' of each edge in the graph. The weights
|
||||
must all be non-negative, and the algorithm will throw a
|
||||
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
|
||||
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
|
||||
exception is one of the edges is negative.
|
||||
The type <tt>WeightMap</tt> must be a model of
|
||||
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type 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>
|
||||
@@ -286,7 +286,7 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
|
||||
<b>Python</b>: If supplied, must be an <tt>edge_double_map</tt> for the graph.
|
||||
</blockquote>
|
||||
|
||||
<h3>Complexity</h3>
|
||||
<h3>Complexity</h3>
|
||||
The time complexity is <em>O(VE)</em> for unweighted graphs and
|
||||
<em>O(VE + V(V+E) log V)</em> for weighted graphs. The space complexity
|
||||
is <em>O(VE)</em>.
|
||||
@@ -295,9 +295,9 @@ is <em>O(VE)</em>.
|
||||
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://www.boost.org/people/doug_gregor.html">Douglas Gregor</A>, Indiana University (dgregor@cs.indiana.edu</A>)<br>
|
||||
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
+16
-16
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: bfs_visitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -22,7 +22,7 @@ bfs_visitor<EventVisitorList>
|
||||
</H1>
|
||||
|
||||
This class is an adapter that converts a list of <a
|
||||
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
|
||||
href="./EventVisitor.html">EventVisitor</a>s (constructed using
|
||||
<tt>std::pair</tt>) into a <a href="./BFSVisitor.html">BFSVisitor</a>.
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@ visitor.
|
||||
<pre>
|
||||
// Construct graph G and obtain the source vertex s ...
|
||||
|
||||
boost::breadth_first_search(G, s,
|
||||
boost::breadth_first_search(G, s,
|
||||
boost::make_bfs_visitor(
|
||||
std::make_pair(boost::record_distances(d, boost::on_tree_edge()),
|
||||
std::make_pair(boost::record_predecessors(p.begin(),
|
||||
std::make_pair(boost::record_predecessors(p.begin(),
|
||||
boost::on_tree_edge()),
|
||||
copy_graph(G_copy, boost::on_examine_edge())))) );
|
||||
</pre>
|
||||
@@ -80,7 +80,7 @@ with <tt>std::pair</tt>.
|
||||
This class implements all of the member functions required by <a
|
||||
href="./BFSVisitor.html">BFSVisitor</a>. In each function the
|
||||
appropriate event is dispatched to the <a
|
||||
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
|
||||
href="./EventVisitor.html">EventVisitor</a> in the EventVisitorList.
|
||||
|
||||
<h3>Non-Member Functions</h3>
|
||||
|
||||
@@ -114,15 +114,15 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+14
-14
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Named Parameters</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -38,7 +38,7 @@ reasons:
|
||||
he or she has to resort to providing all the parameters.
|
||||
|
||||
<li>Since the list of parameters is long, it is easy to forget
|
||||
the ordering.
|
||||
the ordering.
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
@@ -54,7 +54,7 @@ indicates which parameter the argument is for. Each of the named
|
||||
parameters is separated by a <b>period</b>, not a comma.
|
||||
|
||||
<pre>
|
||||
bool r = boost::bellman_ford_shortest_paths(g, int(N),
|
||||
bool r = boost::bellman_ford_shortest_paths(g, int(N),
|
||||
boost::weight_map(weight).
|
||||
distance_map(&distance[0]).
|
||||
predecessor_map(&parent[0]));
|
||||
@@ -66,7 +66,7 @@ an call to <tt>bellman_ford_shortest_paths</tt> that is equivalent to
|
||||
the one above.
|
||||
|
||||
<pre>
|
||||
bool r = boost::bellman_ford_shortest_paths(g, int(N),
|
||||
bool r = boost::bellman_ford_shortest_paths(g, int(N),
|
||||
boost::predecessor_map(&parent[0]).
|
||||
distance_map(&distance[0]).
|
||||
weight_map(weight));
|
||||
@@ -82,12 +82,12 @@ like <tt>boost::weight_map</tt> that create an instance of
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
+39
-18
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Bibliography</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -148,7 +148,7 @@ J. W. H. Liu.
|
||||
|
||||
<P></P><DT><A NAME="mehlhorn99:_leda">22</A>
|
||||
<DD>
|
||||
K. Mehlhorn and S. Näher.
|
||||
K. Mehlhorn and S. Näher.
|
||||
<BR><EM>The LEDA Platform of Combinatorial and Geometric Computing</EM>.
|
||||
<BR>Cambridge University Press, 1999.
|
||||
|
||||
@@ -264,7 +264,7 @@ SIAM Journal on Computing, 1(2):146-160, 1972
|
||||
<P></P><DT><A NAME="eppstein97:dynamic_graph">42</a>
|
||||
<DD>David Eppstein, Zvi Galil, and Giuseppe F. Italiano<BR>
|
||||
<EM>Dynamic Graph Algorithms.</EM><br>
|
||||
Chapter 22, CRC Handbook of Algorithms and Theory of Computation, 1997.
|
||||
Chapter 22, CRC Handbook of Algorithms and Theory of Computation, 1997.
|
||||
|
||||
<P></P><DT><A NAME="cuthill69:reducing_bandwith">43</a>
|
||||
<DD>E. Cuthill and J. McKee<BR>
|
||||
@@ -330,7 +330,7 @@ BIT, 10, 1970, pp. 76-94.
|
||||
|
||||
<p></p><dt><a name="brandes01">54</a>
|
||||
<dd>Ulrik Brandes<br>
|
||||
<em><a href="http://ella.slis.indiana.edu/~katy/L579/brandes.pdf">A
|
||||
<em><a href="http://ella.slis.indiana.edu/~katy/L579/brandes.pdf">A
|
||||
Faster Algorithm for Betweenness Centrality</a></em><br>
|
||||
Journal of Mathematical Sociology 25 (2):163-177, 2001.
|
||||
|
||||
@@ -347,12 +347,12 @@ Technical Report BN9/71, Stichting Mahtematisch Centrum, Amsterdam, 1971.
|
||||
<p></p><dt><a name="kamada89">57</a>
|
||||
<dd>T. Kamada and S. Kawai<br>
|
||||
<em>An algorithm for drawing general undirected graphs.</em><br>
|
||||
Information Processing Letters, 31, pp. 7-15, 1989.
|
||||
Information Processing Letters, 31, pp. 7-15, 1989.
|
||||
|
||||
<p></p><dt><a name="fruchterman91">58</a>
|
||||
<dd>T. Fruchterman and E. Reingold<br>
|
||||
<em>Graph drawing by force-directed placement.</em><br>
|
||||
Software--Practice & Experience, 21 (11), pp. 1129-1164, 1991.
|
||||
Software--Practice & Experience, 21 (11), pp. 1129-1164, 1991.
|
||||
|
||||
<p></p><dt><a name="coleman83">59</a>
|
||||
<dd>Thomas F. Coleman and Jorge J. More<br>
|
||||
@@ -409,7 +409,7 @@ PhD thesis, Cornell University, September 2003.
|
||||
<p></p><dt><a name="boykov-kolmogorov04">69</a>
|
||||
<dd>Yuri Boykov and Vladimir Kolmogorov<br>
|
||||
<em><a href="http://www.csd.uwo.ca/faculty/yuri/Abstracts/pami04-abs.html">An Experimental Comparison of Min-Cut/Max-Flow Algorithms for Energy Minimization in Vision</a></em><br>
|
||||
In IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 26, no. 9, pp. 1124-1137, Sept. 2004.
|
||||
In <em>IEEE Transactions on Pattern Analysis and Machine Intelligence</em>, vol. 26, no. 9, pp. 1124-1137, Sept. 2004.
|
||||
|
||||
<p></p><dt><a name="boyermyrvold04">70</a>
|
||||
<dd>John M. Boyer and Wendy J. Myrvold<br>
|
||||
@@ -432,15 +432,36 @@ How to Draw a Planar Graph on a Grid
|
||||
</em><br>
|
||||
Combinatorica 10: 41-51, 1990.
|
||||
|
||||
<P></P><DT><A NAME="wilson96generating">73</A>
|
||||
<DD>
|
||||
David Bruce Wilson
|
||||
<BR><em>Generating random spanning trees more quickly than the cover time</em>.
|
||||
ACM Symposium on the Theory of Computing, pp. 296-303, 1996.
|
||||
|
||||
<p></p><dt><a name="edmonds65:_max_weighted_match">74</a>
|
||||
<dd>J. Edmonds<br>
|
||||
<em>Maximum Matching and a Polyhedron with 0, 1-Vertices</em><br>
|
||||
Journal of Research of the National Bureau of Standards B 69, pp. 125-130, 1965.
|
||||
|
||||
<p></p><dt><a name="gabow76">75</a>
|
||||
<dd>Harold N. Gabow<br>
|
||||
<em>An Efficient Implementation of Edmonds' Algorithm for Maximum Matching on Graphs</em><br>
|
||||
Journal of the ACM (JACM), 23(2): 221-234, 1976.
|
||||
|
||||
<p></p><dt><a name="gabow90">76</a>
|
||||
<dd>Harold N. Gabow<br>
|
||||
<em>Data Structures for Weighted Matching and Nearest Common Ancestors with Linking</em><br>
|
||||
Proceedings of the First Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 434-443, 1990.
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
<br>
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright 2001-2004 The Trustees of Indiana University.
|
||||
--
|
||||
-- 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: Douglas Gregor
|
||||
-- Jeremy Siek
|
||||
-- Andrew Lumsdaine
|
||||
Copyright 2001-2004 The Trustees of Indiana University.
|
||||
|
||||
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: Douglas Gregor
|
||||
Jeremy Siek
|
||||
Andrew Lumsdaine
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Biconnected Components and Articulation Points</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<A NAME="sec:biconnected-components">biconnected_components
|
||||
</A>
|
||||
</TT>
|
||||
and
|
||||
and
|
||||
<tt>articulation_points</tt>
|
||||
</h1>
|
||||
|
||||
@@ -34,25 +34,25 @@ and
|
||||
template <typename Graph, typename ComponentMap, typename OutputIterator,
|
||||
typename P, typename T, typename R>
|
||||
std::pair<std::size_t, OutputIterator>
|
||||
biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out,
|
||||
biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out,
|
||||
const bgl_named_params<P, T, R>& params)
|
||||
|
||||
template <typename Graph, typename ComponentMap,
|
||||
typename P, typename T, typename R>
|
||||
std::size_t
|
||||
biconnected_components(const Graph& g, ComponentMap comp,
|
||||
biconnected_components(const Graph& g, ComponentMap comp,
|
||||
const bgl_named_params<P, T, R>& params)
|
||||
|
||||
template <typename Graph, typename OutputIterator,
|
||||
template <typename Graph, typename OutputIterator,
|
||||
typename P, typename T, typename R>
|
||||
OutputIterator articulation_points(const Graph& g, OutputIterator out,
|
||||
OutputIterator articulation_points(const Graph& g, OutputIterator out,
|
||||
const bgl_named_params<P, T, R>& params)
|
||||
|
||||
<i>// non-named parameter version</i>
|
||||
template <typename Graph, typename ComponentMap, typename OutputIterator,
|
||||
typename DiscoverTimeMap, typename LowPointMap>
|
||||
std::pair<std::size_t, OutputIterator>
|
||||
biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out,
|
||||
biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out,
|
||||
DiscoverTimeMap discover_time, LowPointMap lowpt);
|
||||
|
||||
template <typename Graph, typename ComponentMap, typename OutputIterator>
|
||||
@@ -120,8 +120,8 @@ and assigning each component an integer label. The algorithm then
|
||||
records which component each edge in the graph belongs to by
|
||||
recording the component number in the component property map. The
|
||||
<tt>ComponentMap</tt> type must be a model of <a
|
||||
href="../../property_map/WritablePropertyMap.html">Writable Property
|
||||
Map</a>. The value type shouch be an integer type, preferably the same
|
||||
href="../../property_map/doc/WritablePropertyMap.html">Writable Property
|
||||
Map</a>. The value type should be an integer type, preferably the same
|
||||
as the <tt>edges_size_type</tt> of the graph. The key type must be
|
||||
the graph's edge descriptor type.<br>
|
||||
<b>Default</b>: <tt>dummy_property_map</tt>.<br>
|
||||
@@ -142,12 +142,12 @@ points.
|
||||
|
||||
<h3>Named Parameters</h3>
|
||||
|
||||
IN: <tt>vertex_index_map(VertexIndexMap i_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>. The type
|
||||
num_vertices(g))</tt>. The type
|
||||
<tt>VertexIndexMap</tt> must be a model of
|
||||
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
|
||||
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
|
||||
integer type. The vertex descriptor type of the graph needs to be
|
||||
usable as the key type of the map.<br>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt><br>
|
||||
@@ -159,12 +159,12 @@ UTIL/OUT: <tt>discover_time_map(DiscoverTimeMap discover_time)</tt>
|
||||
<blockquote>
|
||||
The discovery time of each vertex in the depth-first search. The
|
||||
type <tt>DiscoverTimeMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a>. The value type of the map must be an integer
|
||||
type. The vertex descriptor type of the graph needs to be usable as
|
||||
the key type of the map.<br>
|
||||
<b>Default</b>: an <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
</tt>iterator_property_map</tt></a> created from a
|
||||
<tt>std::vector</tt> of <tt>vertices_size_type</tt> of size
|
||||
<tt>num_vertices(g)</tt> and using <tt>get(vertex_index, g)</tt> for
|
||||
@@ -178,12 +178,12 @@ UTIL/OUT: <tt>lowpoint_map(LowPointMap lowpt)</tt>
|
||||
The low point of each vertex in the depth-first search, which is the
|
||||
smallest vertex reachable from a given vertex with at most one back
|
||||
edge. The type <tt>LowPointMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a>. The value type of the map must be an integer
|
||||
type. The vertex descriptor type of the graph needs to be usable as
|
||||
the key type of the map.<br>
|
||||
<b>Default</b>: an <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
</tt>iterator_property_map</tt></a> created from a
|
||||
<tt>std::vector</tt> of <tt>vertices_size_type</tt> of size
|
||||
<tt>num_vertices(g)</tt> and using <tt>get(vertex_index, g)</tt> for
|
||||
@@ -192,16 +192,16 @@ UTIL/OUT: <tt>lowpoint_map(LowPointMap lowpt)</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
UTIL/OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
|
||||
UTIL/OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
|
||||
<blockquote>
|
||||
The predecessor map records the depth first search tree.
|
||||
The predecessor map records the depth first search tree.
|
||||
The <tt>PredecessorMap</tt> type
|
||||
must be a <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a> whose key and value types are the same as the vertex
|
||||
descriptor type of the graph.<br>
|
||||
<b>Default:</b> an <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
</tt>iterator_property_map</tt></a> created from a
|
||||
<tt>std::vector</tt> of <tt>vertex_descriptor</tt> of size
|
||||
<tt>num_vertices(g)</tt> and using <tt>get(vertex_index, g)</tt> for
|
||||
@@ -239,11 +239,20 @@ href="../example/biconnected_components.cpp"><tt>examples/biconnected_components
|
||||
contains an example of calculating the biconnected components and
|
||||
articulation points of an undirected graph.
|
||||
|
||||
<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.
|
||||
|
||||
<br>
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2004</TD><TD>
|
||||
<TD nowrap>Copyright © 2000-2004</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>
|
||||
@@ -251,4 +260,4 @@ HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
\usepackage{amsfonts}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{amsthm}
|
||||
\usepackage{latexsym}
|
||||
\usepackage{latexsym}
|
||||
\usepackage{jweb}
|
||||
\usepackage{times}
|
||||
\usepackage{graphicx}
|
||||
@@ -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
|
||||
@@ -285,7 +285,8 @@ S.pop();
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/graph/graph_concepts.hpp>
|
||||
#include <boost/property_map.hpp>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
#include <boost/concept/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
@<Biconnected Components Algorithm@>
|
||||
@@ -357,7 +358,7 @@ int main()
|
||||
|
||||
|
||||
|
||||
% \paragraph{Definition.} A \emph{palm tree} $P$ is a directed graph that
|
||||
% \paragraph{Definition.} A \emph{palm tree} $P$ is a directed graph that
|
||||
% consists of two disjoint sets of edges, denoted by $v \rightarrow w$
|
||||
% and $v \backedge w$ respectively, with the following properties:
|
||||
|
||||
|
||||
+98
-98
@@ -1,39 +1,39 @@
|
||||
<HTML>
|
||||
<!-- Copyright 2007 Aaron Windsor
|
||||
--
|
||||
-- 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)
|
||||
--
|
||||
|
||||
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: Boyer-Myrvold Planarity Testing/Embedding</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<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>Boyer-Myrvold Planarity Testing/Embedding</H1>
|
||||
|
||||
<p>
|
||||
A graph is <a href="./planar_graphs.html#planar"><i>planar</i></a> if it can
|
||||
be drawn in two-dimensional space without any of its edges crossing. Such a
|
||||
drawing of a planar graph is called a
|
||||
<a href="./planar_graphs.html#plane_drawing"><i>plane drawing</i></a>. Each
|
||||
A graph is <a href="./planar_graphs.html#planar"><i>planar</i></a> if it can
|
||||
be drawn in two-dimensional space without any of its edges crossing. Such a
|
||||
drawing of a planar graph is called a
|
||||
<a href="./planar_graphs.html#plane_drawing"><i>plane drawing</i></a>. Each
|
||||
plane drawing belongs to an equivalence class called a <i>planar embedding</i>
|
||||
<a href="#1">[1]</a> that is defined by the clockwise ordering of adjacent
|
||||
edges around each vertex in the graph. A planar embedding is a convenient
|
||||
intermediate representation of an actual drawing of a planar graph, and many
|
||||
planar graph drawing algorithms are formulated as functions mapping a planar
|
||||
<a href="#1">[1]</a> that is defined by the clockwise ordering of adjacent
|
||||
edges around each vertex in the graph. A planar embedding is a convenient
|
||||
intermediate representation of an actual drawing of a planar graph, and many
|
||||
planar graph drawing algorithms are formulated as functions mapping a planar
|
||||
embedding to a plane drawing.
|
||||
<br>
|
||||
<br>
|
||||
<table align="center" class="image">
|
||||
<caption align="bottom"><h5>A planar graph (top left), along with a planar
|
||||
embedding of that graph (bottom left) can be used to create a plane drawing
|
||||
(right) by embedding edges around each vertex in the order in which they
|
||||
<caption align="bottom"><h5>A planar graph (top left), along with a planar
|
||||
embedding of that graph (bottom left) can be used to create a plane drawing
|
||||
(right) by embedding edges around each vertex in the order in which they
|
||||
appear in the planar embedding.
|
||||
</h5></caption>
|
||||
<tr><td>
|
||||
@@ -44,16 +44,16 @@ appear in the planar embedding.
|
||||
</table>
|
||||
<br>
|
||||
<p>
|
||||
The function <tt>boyer_myrvold_planarity_test</tt> implements the planarity
|
||||
testing/embedding algorithm of Boyer and Myrvold
|
||||
The function <tt>boyer_myrvold_planarity_test</tt> implements the planarity
|
||||
testing/embedding algorithm of Boyer and Myrvold
|
||||
[<a href="./bibliography.html#boyermyrvold04">70</a>].
|
||||
<tt>boyer_myrvold_planarity_test</tt> returns <tt>true</tt> if the input graph
|
||||
<tt>boyer_myrvold_planarity_test</tt> returns <tt>true</tt> if the input graph
|
||||
is planar and <tt>false</tt> otherwise. As a side-effect of this test, a planar
|
||||
embedding can be constructed if the graph is planar or a minimal set of edges
|
||||
that form a <a href = "./planar_graphs.html#kuratowskisubgraphs">Kuratowski
|
||||
embedding can be constructed if the graph is planar or a minimal set of edges
|
||||
that form a <a href = "./planar_graphs.html#kuratowskisubgraphs">Kuratowski
|
||||
subgraph</a> can be found if the graph is not planar.
|
||||
<tt>boyer_myrvold_planarity_test</tt> uses named parameter arguments (courtesy
|
||||
of the <a href="../../parameter/doc/html/index.html">Boost.Parameter</a>
|
||||
<tt>boyer_myrvold_planarity_test</tt> uses named parameter arguments (courtesy
|
||||
of the <a href="../../parameter/doc/html/index.html">Boost.Parameter</a>
|
||||
library) to specify what the function actually does. Some examples are:
|
||||
|
||||
<ul>
|
||||
@@ -65,8 +65,8 @@ bool is_planar = boyer_myrvold_planarity_test(g);
|
||||
<li>Computing a planar embedding for a graph if it is planar, otherwise finding
|
||||
a set of edges that forms an obstructing Kuratowski subgraph:
|
||||
<pre>
|
||||
if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
|
||||
boyer_myrvold_params::embedding = embedding_pmap,
|
||||
if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
|
||||
boyer_myrvold_params::embedding = embedding_pmap,
|
||||
boyer_myrvold_params::kuratowski_subgraph = out_itr
|
||||
)
|
||||
)
|
||||
@@ -81,81 +81,81 @@ else
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
The parameters passed to <tt>boyer_myrvold_planarity_test</tt> in the examples
|
||||
above do more than just carry the data structures used for input and output -
|
||||
the algorithm is optimized at compile time based on which parameters are
|
||||
present. A complete list of parameters accepted and their interactions are
|
||||
described below.
|
||||
The parameters passed to <tt>boyer_myrvold_planarity_test</tt> in the examples
|
||||
above do more than just carry the data structures used for input and output -
|
||||
the algorithm is optimized at compile time based on which parameters are
|
||||
present. A complete list of parameters accepted and their interactions are
|
||||
described below.
|
||||
<p>
|
||||
<tt>boyer_myrvold_planarity_test</tt> accepts as input any undirected graph,
|
||||
even those with self-loops and multiple edges.
|
||||
However, many planar graph drawing algorithms make additional restrictions
|
||||
on the structure of the input graph - for example, requiring that the input
|
||||
However, many planar graph drawing algorithms make additional restrictions
|
||||
on the structure of the input graph - for example, requiring that the input
|
||||
graph is connected, biconnected, or even maximal planar (triangulated.)
|
||||
Fortunately, any planar graph on <i>n</i> vertices that lacks one of these
|
||||
properties can be augmented with additional edges so that it satisfies that
|
||||
property in <i>O(n)</i> time - the functions
|
||||
Fortunately, any planar graph on <i>n</i> vertices that lacks one of these
|
||||
properties can be augmented with additional edges so that it satisfies that
|
||||
property in <i>O(n)</i> time - the functions
|
||||
<tt><a href="./make_connected.html">make_connected</a></tt>,
|
||||
<tt><a href="./make_biconnected_planar.html">make_biconnected_planar</a></tt>,
|
||||
and <tt><a href="./make_maximal_planar.html">make_maximal_planar</a></tt>
|
||||
exist for this purpose. If the graph drawing algorithm you're using requires,
|
||||
say, a biconnected graph, then you must make your input graph biconnected
|
||||
<tt><a href="./make_biconnected_planar.html">make_biconnected_planar</a></tt>,
|
||||
and <tt><a href="./make_maximal_planar.html">make_maximal_planar</a></tt>
|
||||
exist for this purpose. If the graph drawing algorithm you're using requires,
|
||||
say, a biconnected graph, then you must make your input graph biconnected
|
||||
<i>before</i> passing it into <tt>boyer_myrvold_planarity_test</tt> so that the
|
||||
computed planar embedding includes these additional edges. This may require
|
||||
more than one call to <tt>boyer_myrvold_planarity_test</tt> depending on the
|
||||
structure of the graph you begin with, since both
|
||||
<tt>make_biconnected_planar</tt> and <tt>make_maximal_planar</tt> require a
|
||||
computed planar embedding includes these additional edges. This may require
|
||||
more than one call to <tt>boyer_myrvold_planarity_test</tt> depending on the
|
||||
structure of the graph you begin with, since both
|
||||
<tt>make_biconnected_planar</tt> and <tt>make_maximal_planar</tt> require a
|
||||
planar embedding of the existing graph as an input parameter.
|
||||
|
||||
<p><p>
|
||||
The named parameters accepted by <tt>boyer_myrvold_planarity_test</tt> are:
|
||||
|
||||
<ul>
|
||||
<li><b><tt>graph</tt></b> : The input graph - this is the only required
|
||||
<li><b><tt>graph</tt></b> : The input graph - this is the only required
|
||||
parameter.
|
||||
<li><b><tt>vertex_index_map</tt></b> : A mapping from vertices of the input
|
||||
graph to indexes in the range <tt>[0..num_vertices(g))</tt>. If this parameter
|
||||
<li><b><tt>vertex_index_map</tt></b> : A mapping from vertices of the input
|
||||
graph to indexes in the range <tt>[0..num_vertices(g))</tt>. If this parameter
|
||||
is not provided, the vertex index map is assumed to be available as an interior
|
||||
property of the graph, accessible by calling <tt>get(vertex_index, g)</tt>.
|
||||
<li><b><tt>edge_index_map</tt></b>: A mapping from the edges of the input graph
|
||||
to indexes in the range <tt>[0..num_edges(g))</tt>. This parameter is only
|
||||
needed if the <tt>kuratowski_subgraph</tt> argument is provided. If the
|
||||
to indexes in the range <tt>[0..num_edges(g))</tt>. This parameter is only
|
||||
needed if the <tt>kuratowski_subgraph</tt> argument is provided. If the
|
||||
<tt>kuratowski_subgraph</tt> argument is provided and this parameter is not
|
||||
provided, the EdgeIndexMap is assumed to be available as an interior property
|
||||
provided, the EdgeIndexMap is assumed to be available as an interior property
|
||||
accessible by calling <tt>get(edge_index, g)</tt>.
|
||||
<li><b><tt>embedding</tt></b> : If the graph is planar, this will be populated
|
||||
with a mapping from vertices to the clockwise order of neighbors in the planar
|
||||
<li><b><tt>embedding</tt></b> : If the graph is planar, this will be populated
|
||||
with a mapping from vertices to the clockwise order of neighbors in the planar
|
||||
embedding.
|
||||
<li><b><tt>kuratowski_subgraph</tt></b> : If the graph is not planar, a minimal
|
||||
set of edges that form the obstructing Kuratowski subgraph will be written to
|
||||
set of edges that form the obstructing Kuratowski subgraph will be written to
|
||||
this iterator.
|
||||
</ul>
|
||||
|
||||
These named parameters all belong to the namespace
|
||||
<tt>boyer_myrvold_params</tt>. See below for more information on the concepts
|
||||
required for these arguments.
|
||||
These named parameters all belong to the namespace
|
||||
<tt>boyer_myrvold_params</tt>. See below for more information on the concepts
|
||||
required for these arguments.
|
||||
|
||||
<H3>Verifying the output</H3>
|
||||
|
||||
Whether or not the input graph is planar, <tt>boyer_myrvold_planarity_test</tt>
|
||||
can produce a certificate that can be automatically checked to verify that the
|
||||
function is working properly.
|
||||
can produce a certificate that can be automatically checked to verify that the
|
||||
function is working properly.
|
||||
<p>
|
||||
If the graph is planar, a planar embedding can be produced. The
|
||||
planar embedding can be verified by passing it to a plane drawing routine
|
||||
planar embedding can be verified by passing it to a plane drawing routine
|
||||
(such as <tt><a href="straight_line_drawing.html">
|
||||
chrobak_payne_straight_line_drawing</a></tt>) and using the function
|
||||
<tt><a href="is_straight_line_drawing.html">is_straight_line_drawing</a></tt>
|
||||
chrobak_payne_straight_line_drawing</a></tt>) and using the function
|
||||
<tt><a href="is_straight_line_drawing.html">is_straight_line_drawing</a></tt>
|
||||
to verify that the resulting graph is planar.
|
||||
<p>
|
||||
If the graph is not planar, a set of edges that forms a Kuratowski subgraph in
|
||||
the original graph can be produced. This set of edges can be passed to the
|
||||
If the graph is not planar, a set of edges that forms a Kuratowski subgraph in
|
||||
the original graph can be produced. This set of edges can be passed to the
|
||||
function <tt><a href="is_kuratowski_subgraph.html">is_kuratowski_subgraph</a>
|
||||
</tt> to verify that they can be contracted into a <i>K<sub>5</sub></i> or
|
||||
<i>K<sub>3,3</sub></i>. <tt>boyer_myrvold_planarity_test</tt> chooses the set
|
||||
of edges forming the Kuratowski subgraph in such a way that the contraction to
|
||||
a <i>K<sub>5</sub></i> or <i>K<sub>3,3</sub></i> can be done by a simple
|
||||
deterministic process which is described in the documentation to
|
||||
</tt> to verify that they can be contracted into a <i>K<sub>5</sub></i> or
|
||||
<i>K<sub>3,3</sub></i>. <tt>boyer_myrvold_planarity_test</tt> chooses the set
|
||||
of edges forming the Kuratowski subgraph in such a way that the contraction to
|
||||
a <i>K<sub>5</sub></i> or <i>K<sub>3,3</sub></i> can be done by a simple
|
||||
deterministic process which is described in the documentation to
|
||||
<tt>is_kuratowski_subgraph</tt>.
|
||||
|
||||
<H3>Where Defined</H3>
|
||||
@@ -170,8 +170,8 @@ deterministic process which is described in the documentation to
|
||||
IN: <tt>Graph& g</tt>
|
||||
|
||||
<blockquote>
|
||||
Any undirected graph. The graph type must be a model of
|
||||
<a href="VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a> and
|
||||
Any undirected graph. The graph type must be a model of
|
||||
<a href="VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a> and
|
||||
<a href="IncidenceGraph.html">IncidenceGraph</a>.
|
||||
</blockquote>
|
||||
|
||||
@@ -184,15 +184,15 @@ Must model the <a href="PlanarEmbedding.html">PlanarEmbedding</a> concept.
|
||||
IN <tt>OutputIterator kuratowski_subgraph</tt>
|
||||
|
||||
<blockquote>
|
||||
An OutputIterator which accepts values of the type
|
||||
An OutputIterator which accepts values of the type
|
||||
<tt>graph_traits<Graph>::edge_descriptor</tt>
|
||||
</blockquote>
|
||||
|
||||
IN <tt>VertexIndexMap vm</tt>
|
||||
|
||||
<blockquote>
|
||||
A <a href="../../property_map/ReadablePropertyMap.html">Readable Property Map
|
||||
</a> that maps vertices from <tt>g</tt> to distinct integers in the range
|
||||
A <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map
|
||||
</a> that maps vertices from <tt>g</tt> to distinct integers in the range
|
||||
<tt>[0, num_vertices(g) )</tt><br>
|
||||
<b>Default</b>: <tt>get(vertex_index,g)</tt><br>
|
||||
</blockquote>
|
||||
@@ -200,22 +200,22 @@ A <a href="../../property_map/ReadablePropertyMap.html">Readable Property Map
|
||||
IN <tt>EdgeIndexMap em</tt>
|
||||
|
||||
<blockquote>
|
||||
A <a href="../../property_map/ReadablePropertyMap.html">Readable Property Map
|
||||
</a> that maps edges from <tt>g</tt> to distinct integers in the range
|
||||
A <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map
|
||||
</a> that maps edges from <tt>g</tt> to distinct integers in the range
|
||||
<tt>[0, num_edges(g) )</tt><br>
|
||||
<b>Default</b>: <tt>get(edge_index,g)</tt>, but this parameter is only used if
|
||||
<b>Default</b>: <tt>get(edge_index,g)</tt>, but this parameter is only used if
|
||||
the <tt>kuratowski_subgraph_iterator</tt> is provided.<br>
|
||||
</blockquote>
|
||||
|
||||
<H3>Complexity</H3>
|
||||
|
||||
Assuming that both the vertex index and edge index supplied take time
|
||||
<i>O(1)</i> to return an index and there are <i>O(n)</i>
|
||||
total self-loops and parallel edges in the graph, most combinations of
|
||||
arguments given to
|
||||
<tt>boyer_myrvold_planarity_test</tt> result in an algorithm that runs in time
|
||||
<i>O(n)</i> for a graph with <i>n</i> vertices and <i>m</i> edges. The only
|
||||
exception is when Kuratowski subgraph isolation is requested for a dense graph
|
||||
Assuming that both the vertex index and edge index supplied take time
|
||||
<i>O(1)</i> to return an index and there are <i>O(n)</i>
|
||||
total self-loops and parallel edges in the graph, most combinations of
|
||||
arguments given to
|
||||
<tt>boyer_myrvold_planarity_test</tt> result in an algorithm that runs in time
|
||||
<i>O(n)</i> for a graph with <i>n</i> vertices and <i>m</i> edges. The only
|
||||
exception is when Kuratowski subgraph isolation is requested for a dense graph
|
||||
(a graph with <i>n = o(m)</i>) - the running time will be <i>O(n+m)</i>
|
||||
<a href = "#2">[2]</a>.
|
||||
|
||||
@@ -224,9 +224,9 @@ exception is when Kuratowski subgraph isolation is requested for a dense graph
|
||||
<P>
|
||||
<ul>
|
||||
<li><a href="../example/simple_planarity_test.cpp">A simple planarity test</a>
|
||||
<li><a href="../example/kuratowski_subgraph.cpp">Isolating a Kuratowski
|
||||
<li><a href="../example/kuratowski_subgraph.cpp">Isolating a Kuratowski
|
||||
Subgraph</a>
|
||||
<li><a href="../example/straight_line_drawing.cpp">Using a planar embedding to
|
||||
<li><a href="../example/straight_line_drawing.cpp">Using a planar embedding to
|
||||
create a straight line drawing</a>
|
||||
</ul>
|
||||
|
||||
@@ -237,23 +237,23 @@ create a straight line drawing</a>
|
||||
|
||||
<h3>Notes</h3>
|
||||
|
||||
<p><a name="1">[1] A planar embedding is also called a <i>combinatorial
|
||||
<p><a name="1">[1] A planar embedding is also called a <i>combinatorial
|
||||
embedding</i>.
|
||||
|
||||
<p><a name="2">[2] The algorithm can still be made to run in time <i>O(n)</i>
|
||||
for this case, if needed. <a href="planar_graphs.html#EulersFormula">Euler's
|
||||
<p><a name="2">[2] The algorithm can still be made to run in time <i>O(n)</i>
|
||||
for this case, if needed. <a href="planar_graphs.html#EulersFormula">Euler's
|
||||
formula</a> implies that a planar graph with <i>n</i> vertices can have no more
|
||||
than <i>3n - 6</i> edges, which means that any non-planar graph on <i>n</i>
|
||||
vertices has a subgraph of only <i>3n - 5</i> edges that contains a Kuratowski
|
||||
subgraph. So, if you need to find a Kuratowski subgraph of a graph with more
|
||||
than <i>3n - 5</i> edges in time <i>O(n)</i>, you can create a subgraph of the
|
||||
original graph consisting of any arbitrary <i>3n - 5</i> edges and pass that
|
||||
than <i>3n - 6</i> edges, which means that any non-planar graph on <i>n</i>
|
||||
vertices has a subgraph of only <i>3n - 5</i> edges that contains a Kuratowski
|
||||
subgraph. So, if you need to find a Kuratowski subgraph of a graph with more
|
||||
than <i>3n - 5</i> edges in time <i>O(n)</i>, you can create a subgraph of the
|
||||
original graph consisting of any arbitrary <i>3n - 5</i> edges and pass that
|
||||
graph to <tt>boyer_myrvold_planarity_test</tt>.
|
||||
|
||||
|
||||
<br>
|
||||
<HR>
|
||||
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
|
||||
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
|
||||
aaron.windsor@gmail.com</a>)
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-15">
|
||||
<TITLE>Boost Graph Library: Kolmogorov Maximum Flow</TITLE>
|
||||
<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
|
||||
// Copyright (c) 2006 Stephan Diederich
|
||||
//
|
||||
// This documentation may be used under either of the following two licences:
|
||||
//
|
||||
@@ -55,12 +55,12 @@
|
||||
<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>
|
||||
<H1><A NAME="sec:kolmogorov_max_flow"></A><TT>kolmogorov_max_flow</TT>
|
||||
<H1><A NAME="sec:boykov_kolmogorov_max_flow"></A><TT>boykov_kolmogorov_max_flow</TT>
|
||||
</H1>
|
||||
<PRE><I>// named parameter version</I>
|
||||
template <class Graph, class P, class T, class R>
|
||||
typename property_traits<typename property_map<Graph, edge_capacity_t>::const_type>::value_type
|
||||
kolmogorov_max_flow(Graph& g,
|
||||
boykov_kolmogorov_max_flow(Graph& g,
|
||||
typename graph_traits<Graph>::vertex_descriptor src,
|
||||
typename graph_traits<Graph>::vertex_descriptor sink,
|
||||
const bgl_named_params<P, T, R>& params = <I>all defaults</I>)
|
||||
@@ -69,7 +69,7 @@ kolmogorov_max_flow(Graph& g,
|
||||
template <class Graph, class CapacityEdgeMap, class ResidualCapacityEdgeMap, class ReverseEdgeMap,
|
||||
class PredecessorMap, class ColorMap, class DistanceMap, class IndexMap>
|
||||
typename property_traits<CapacityEdgeMap>::value_type
|
||||
kolmogorov_max_flow(Graph& g,
|
||||
boykov_kolmogorov_max_flow(Graph& g,
|
||||
CapacityEdgeMap cap,
|
||||
ResidualCapacityEdgeMap res_cap,
|
||||
ReverseEdgeMap rev_map,
|
||||
@@ -82,37 +82,41 @@ kolmogorov_max_flow(Graph& g,
|
||||
<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
|
||||
<P>The <TT>boykov_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>.
|
||||
<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) -> (v,u)</I> for all <I>(u,v)</I> in <I>E</I>.
|
||||
<I>(u,v) -> (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>
|
||||
noticeably increase the performance.</P>
|
||||
|
||||
<P>
|
||||
<B>Algorithm description:</B><BR>The Boykov-Kolmogorov max-flow (or often
|
||||
BK max-flow) 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 subtracting 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, the Boykov-Kolmogorov algorithm 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
|
||||
@@ -133,7 +137,7 @@ 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
|
||||
from this path by subtracting 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
|
||||
@@ -151,11 +155,11 @@ 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>
|
||||
<P><IMG SRC="figs/bk_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.
|
||||
corresponding terminal was calculated.
|
||||
</P>
|
||||
<UL>
|
||||
<LI><P>This distance is used and gets calculated in the
|
||||
@@ -182,162 +186,167 @@ no more orphans.</P>
|
||||
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>
|
||||
<P>The algorithm is mainly implemented as described by Boykov and Kolmogorov in
|
||||
[<a href="bibliography.html#boykov-kolmogorov04">69</a>]. An extended version
|
||||
can be found in the PhD Thesis of Kolmogorov [<A HREF="bibliography.html#kolmogorov03">68</a>].
|
||||
The following changes are made to improve performance:</P>
|
||||
<UL>
|
||||
<LI><P>initialization: the algorithm first augments all paths from
|
||||
<LI>initialization: the algorithm first augments all paths from
|
||||
source->sink and all paths from source->VERTEX->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
|
||||
to the active vertex list and so the source is not.</LI>
|
||||
<LI>active vertices: Boykov-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
|
||||
second. This implementation uses just one list.</LI>
|
||||
<LI>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>
|
||||
same one as during the last grow-phase.</LI>
|
||||
</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><TT><A HREF="../../../boost/graph/boykov_kolmogorov_max_flow.hpp">boost/graph/boykov_kolmogorov_max_flow.hpp</A></TT>
|
||||
</P>
|
||||
<H3>Parameters</H3>
|
||||
<P>IN: <TT>Graph& g</TT>
|
||||
<P>IN: <TT>Graph& 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.
|
||||
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>IN: <TT>vertex_descriptor src</TT>
|
||||
</P>
|
||||
<BLOCKQUOTE>The source vertex for the flow network graph.
|
||||
<BLOCKQUOTE>The source vertex for the flow network graph.
|
||||
</BLOCKQUOTE>
|
||||
<P>IN: <TT>vertex_descriptor sink</TT>
|
||||
<P>IN: <TT>vertex_descriptor sink</TT>
|
||||
</P>
|
||||
<BLOCKQUOTE>The sink vertex for the flow network graph.
|
||||
<BLOCKQUOTE>The sink vertex for the flow network graph.
|
||||
</BLOCKQUOTE>
|
||||
<H3>Named Parameters</H3>
|
||||
<P>IN: <TT>capacity_map(EdgeCapacityMap cap)</TT>
|
||||
<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/LvaluePropertyMap.html">Lvalue
|
||||
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>
|
||||
descriptor type.<BR><B>Default:</B> <TT>get(edge_capacity, g)</TT>
|
||||
</BLOCKQUOTE>
|
||||
<P>OUT: <TT>residual_capacity_map(ResidualCapacityEdgeMap res)</TT>
|
||||
<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/LvaluePropertyMap.html">Lvalue
|
||||
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>
|
||||
g)</TT>
|
||||
</BLOCKQUOTE>
|
||||
<P>IN: <TT>reverse_edge_map(ReverseEdgeMap rev)</TT>
|
||||
<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/LvaluePropertyMap.html">Lvalue
|
||||
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>
|
||||
descriptor type.<BR><B>Default:</B> <TT>get(edge_reverse, g)</TT>
|
||||
</BLOCKQUOTE>
|
||||
<P>UTIL: <TT>vertex_predecessor(PredecessorMap pre_map)</TT>
|
||||
<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/LvaluePropertyMap.html">Lvalue
|
||||
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>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/LvaluePropertyMap.html">Lvalue Property
|
||||
<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>
|
||||
descriptor type.<BR><B>Default:</B> <TT>get(vertex_color, g)</TT>
|
||||
</BLOCKQUOTE>
|
||||
<P>UTIL: <TT>vertex_distance(DistanceMap dist)</TT>
|
||||
<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/LvaluePropertyMap.html">Lvalue
|
||||
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>
|
||||
descriptor type.<BR><B>Default:</B> <TT>get(vertex_distance, g)</TT>
|
||||
</BLOCKQUOTE>
|
||||
<P>IN: <TT>vertex_index_map(VertexIndexMap index_map)</TT>
|
||||
<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/LvaluePropertyMap.html">LvaluePropertyMap</A>.
|
||||
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>
|
||||
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/kolmogorov-eg.cpp">example/kolmogorov-eg.cpp</A></TT>.
|
||||
<TT><A HREF="../example/boykov_kolmogorov-eg.cpp">example/boykov_kolmogorov-eg.cpp</A></TT>.
|
||||
</P>
|
||||
<PRE>#include <boost/config.hpp>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <boost/graph/kolmogorov_map_flow.hpp>
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <boost/graph/boykov_kolmogorov_max_flow.hpp>
|
||||
#include <boost/graph/read_dimacs.hpp>
|
||||
#include <boost/graph/graph_utility.hpp>
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
using namespace boost;
|
||||
|
||||
typedef adjacency_list_traits<vecS, vecS, directedS> Traits;
|
||||
typedef adjacency_list<vecS, vecS, directedS,
|
||||
property<vertex_name_t, std::string>,
|
||||
property<edge_capacity_t, long,
|
||||
property<edge_residual_capacity_t, long,
|
||||
property<edge_reverse_t, Traits::edge_descriptor> > >
|
||||
> Graph;
|
||||
typedef adjacency_list_traits < vecS, vecS, directedS > Traits;
|
||||
typedef adjacency_list < vecS, vecS, directedS,
|
||||
property < vertex_name_t, std::string,
|
||||
property < vertex_index_t, long,
|
||||
property < vertex_color_t, boost::default_color_type,
|
||||
property < vertex_distance_t, long,
|
||||
property < vertex_predecessor_t, Traits::edge_descriptor > > > > >,
|
||||
|
||||
property < edge_capacity_t, long,
|
||||
property < edge_residual_capacity_t, long,
|
||||
property < edge_reverse_t, Traits::edge_descriptor > > > > Graph;
|
||||
|
||||
Graph g;
|
||||
long flow;
|
||||
|
||||
property_map<Graph, edge_capacity_t>::type
|
||||
capacity = get(edge_capacity, g);
|
||||
property_map<Graph, edge_reverse_t>::type
|
||||
rev = get(edge_reverse, g);
|
||||
property_map<Graph, edge_residual_capacity_t>::type
|
||||
residual_capacity = get(edge_residual_capacity, g);
|
||||
|
||||
property_map < Graph, edge_capacity_t >::type
|
||||
capacity = get(edge_capacity, g);
|
||||
property_map < Graph, edge_residual_capacity_t >::type
|
||||
residual_capacity = get(edge_residual_capacity, g);
|
||||
property_map < Graph, edge_reverse_t >::type rev = get(edge_reverse, g);
|
||||
Traits::vertex_descriptor s, t;
|
||||
read_dimacs_max_flow(g, capacity, rev, s, t);
|
||||
|
||||
flow = kolmogorov_max_flow(g, s, t);
|
||||
std::vector<default_color_type> color(num_vertices(g));
|
||||
std::vector<long> distance(num_vertices(g));
|
||||
long flow = boykov_kolmogorov_max_flow(g ,s, t);
|
||||
|
||||
std::cout << "c The total flow:" << std::endl;
|
||||
std::cout << "s " << flow << std::endl << std::endl;
|
||||
std::cout << "c The total flow:" << std::endl;
|
||||
std::cout << "s " << flow << std::endl << std::endl;
|
||||
|
||||
std::cout << "c flow values:" << std::endl;
|
||||
graph_traits<Graph>::vertex_iterator u_iter, u_end;
|
||||
graph_traits<Graph>::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)
|
||||
std::cout << "c flow values:" << std::endl;
|
||||
graph_traits < Graph >::vertex_iterator u_iter, u_end;
|
||||
graph_traits < Graph >::out_edge_iterator ei, e_end;
|
||||
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] > 0)
|
||||
std::cout << "f " << *u_iter << " " << target(*ei, g) << " "
|
||||
<< (capacity[*ei] - residual_capacity[*ei]) << std::endl;
|
||||
return 0;
|
||||
std::cout << "f " << *u_iter << " " << target(*ei, g) << " "
|
||||
<< (capacity[*ei] - residual_capacity[*ei]) << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}</PRE><P>
|
||||
The output is:
|
||||
The output is:
|
||||
</P>
|
||||
<PRE>c The total flow:
|
||||
s 13
|
||||
@@ -364,7 +373,9 @@ 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="edmunds_karp_max_flow.html">edmunds_karp_max_flow()</A></TT>,<BR><TT><A HREF="push_relabel_max_flow.html">push_relabel_max_flow()</A></TT>.
|
||||
<P STYLE="margin-bottom: 0cm">
|
||||
<TT><A HREF="edmonds_karp_max_flow.html">edmonds_karp_max_flow()</A></TT>,
|
||||
<TT><A HREF="push_relabel_max_flow.html">push_relabel_max_flow()</A></TT>.
|
||||
</P>
|
||||
<HR>
|
||||
<TABLE CELLPADDING=2 CELLSPACING=2>
|
||||
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) Jeremy Siek 2000, 2001
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) Jeremy Siek 2000, 2001
|
||||
|
||||
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: Breadth-First Search</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -24,15 +24,15 @@
|
||||
<PRE>
|
||||
<i>// named parameter version</i>
|
||||
template <class Graph, class P, class T, class R>
|
||||
void breadth_first_search(Graph& G,
|
||||
typename graph_traits<Graph>::vertex_descriptor s,
|
||||
void breadth_first_search(Graph& G,
|
||||
typename graph_traits<Graph>::vertex_descriptor s,
|
||||
const bgl_named_params<P, T, R>& params);
|
||||
|
||||
<i>// non-named parameter version</i>
|
||||
template <class Graph, class Buffer, class BFSVisitor,
|
||||
template <class Graph, class Buffer, class BFSVisitor,
|
||||
class ColorMap>
|
||||
void breadth_first_search(const Graph& g,
|
||||
typename graph_traits<Graph>::vertex_descriptor s,
|
||||
void breadth_first_search(const Graph& g,
|
||||
typename graph_traits<Graph>::vertex_descriptor s,
|
||||
Buffer& Q, BFSVisitor vis, ColorMap color);
|
||||
</PRE>
|
||||
|
||||
@@ -70,25 +70,25 @@ BFS algorithm is a listed below.
|
||||
<pre>
|
||||
BFS(<i>G</i>, <i>s</i>)
|
||||
<b>for</b> each vertex <i>u in V[G]</i>
|
||||
<i>color[u] :=</i> WHITE
|
||||
<i>d[u] := infinity</i>
|
||||
<i>p[u] := u</i>
|
||||
<i>color[u] :=</i> WHITE
|
||||
<i>d[u] := infinity</i>
|
||||
<i>p[u] := u</i>
|
||||
<b>end for</b>
|
||||
<i>color[s] :=</i> GRAY
|
||||
<i>d[s] := 0</i>
|
||||
<i>color[s] :=</i> GRAY
|
||||
<i>d[s] := 0</i>
|
||||
ENQUEUE(<i>Q</i>, <i>s</i>)
|
||||
<b>while</b> (<i>Q != Ø</i>)
|
||||
<b>while</b> (<i>Q != Ø</i>)
|
||||
<i>u :=</i> DEQUEUE(Q)
|
||||
<b>for</b> each vertex <i>v in Adj[u]</i>
|
||||
<b>if</b> (<i>color[v] =</i> WHITE)
|
||||
<i>color[v] :=</i> GRAY
|
||||
<i>d[v] := d[u] + 1</i>
|
||||
<i>p[v] := u</i>
|
||||
<i>color[v] :=</i> GRAY
|
||||
<i>d[v] := d[u] + 1</i>
|
||||
<i>p[v] := u</i>
|
||||
ENQUEUE(<i>Q</i>, <i>v</i>)
|
||||
<b>else</b>
|
||||
<b>if</b> (<i>color[v] =</i> GRAY)
|
||||
<b>if</b> (<i>color[v] =</i> GRAY)
|
||||
...
|
||||
<b>else</b>
|
||||
<b>else</b>
|
||||
...
|
||||
<b>end for</b>
|
||||
<i>color[u] :=</i> BLACK
|
||||
@@ -99,29 +99,29 @@ BFS(<i>G</i>, <i>s</i>)
|
||||
<td valign="top">
|
||||
<pre>
|
||||
|
||||
initialize vertex <i>u</i>
|
||||
initialize vertex <i>u</i>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
discover vertex <i>s</i>
|
||||
discover vertex <i>s</i>
|
||||
|
||||
examine vertex <i>u</i>
|
||||
examine vertex <i>u</i>
|
||||
examine edge <i>(u,v)</i>
|
||||
<i>(u,v)</i> is a tree edge
|
||||
<i>(u,v)</i> is a tree edge
|
||||
|
||||
|
||||
|
||||
discover vertex <i>v</i>
|
||||
discover vertex <i>v</i>
|
||||
<i>(u,v)</i> is a non-tree edge
|
||||
|
||||
<i>(u,v)</i> has a gray target
|
||||
<i>(u,v)</i> has a gray target
|
||||
|
||||
<i>(u,v)</i> has a black target
|
||||
<i>(u,v)</i> has a black target
|
||||
|
||||
finish vertex <i>u</i>
|
||||
finish vertex <i>u</i>
|
||||
</pre>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -194,12 +194,12 @@ UTIL/OUT: <tt>color_map(ColorMap color)</tt>
|
||||
function and do your own color initialization.
|
||||
|
||||
<p>The type <tt>ColorMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a> and its key type must be the graph's vertex
|
||||
descriptor type and the value type of the color map must model
|
||||
<a href="./ColorValue.html">ColorValue</a>.<br>
|
||||
<b>Default:</b> an <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
</tt>iterator_property_map</tt></a> created from a
|
||||
<tt>std::vector</tt> of <tt>default_color_type</tt> of size
|
||||
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
|
||||
@@ -215,7 +215,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
num_vertices(g))</tt>. This parameter is only necessary when the
|
||||
default color property map is used. The type <tt>VertexIndexMap</tt>
|
||||
must be a model of <a
|
||||
href="../../property_map/ReadablePropertyMap.html">Readable Property
|
||||
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
|
||||
Map</a>. The value type of the map must be an integer type. The
|
||||
vertex descriptor type of the graph needs to be usable as the key
|
||||
type of the map.<br>
|
||||
@@ -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.
|
||||
@@ -244,7 +244,7 @@ UTIL: <tt>buffer(Buffer& Q)</tt>
|
||||
<b>Python</b>: The buffer must derive from the <a
|
||||
href="./Buffer.html">Buffer</a> type for the graph.
|
||||
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<H3><A NAME="SECTION001330300000000000000">
|
||||
@@ -252,7 +252,7 @@ Complexity</A>
|
||||
</H3>
|
||||
|
||||
<P>
|
||||
The time complexity is <i>O(E + V)</i>.
|
||||
The time complexity is <i>O(E + V)</i>.
|
||||
|
||||
<P>
|
||||
|
||||
@@ -260,13 +260,13 @@ The time complexity is <i>O(E + V)</i>.
|
||||
|
||||
<ul>
|
||||
<li><b><tt>vis.initialize_vertex(v, g)</tt></b> is invoked on every vertex
|
||||
before the start of the search.
|
||||
before the start of the search.
|
||||
|
||||
<li><b><tt>vis.examine_vertex(u, g)</tt></b>r is invoked in each
|
||||
vertex as it is removed from the queue.
|
||||
|
||||
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge
|
||||
of each vertex immediately after the vertex is removed from the queue.
|
||||
of each vertex immediately after the vertex is removed from the queue.
|
||||
|
||||
<li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked (in addition to
|
||||
<tt>examine_edge()</tt>) if the edge is a tree edge. The
|
||||
@@ -275,20 +275,20 @@ The time complexity is <i>O(E + V)</i>.
|
||||
<li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked the first time the
|
||||
algorithm encounters vertex <i>u</i>. All vertices closer to the
|
||||
source vertex have been discovered, and vertices further from the
|
||||
source have not yet been discovered.
|
||||
source have not yet been discovered.
|
||||
|
||||
<li><b><tt>vis.non_tree_edge(e, g)</tt></b> is invoked (in addition to
|
||||
<tt>examine_edge()</tt>) if the edge is not a tree edge.
|
||||
<tt>examine_edge()</tt>) if the edge is not a tree edge.
|
||||
|
||||
<li><b><tt>vis.gray_target(e, g)</tt></b> is invoked (in addition to
|
||||
<tt>non_tree_edge()</tt>) if the target vertex is colored gray at the
|
||||
time of examination. The color gray indicates that
|
||||
the vertex is currently in the queue.
|
||||
the vertex is currently in the queue.
|
||||
|
||||
<li><b><tt>vis.black_target(e, g)</tt></b> is invoked (in addition to
|
||||
<tt>non_tree_edge()</tt>) if the target vertex is colored black at the
|
||||
time of examination. The color black indicates that the
|
||||
vertex is no longer in the queue.
|
||||
vertex is no longer in the queue.
|
||||
|
||||
<li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked after all of the out
|
||||
edges of <i>u</i> have been examined and all of the adjacent vertices
|
||||
@@ -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
|
||||
@@ -319,7 +319,7 @@ to <tt>listS</tt>.
|
||||
|
||||
<h3>Notes</h3>
|
||||
|
||||
<p><a name="1">[1]</a>
|
||||
<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
|
||||
@@ -330,9 +330,9 @@ to <tt>listS</tt>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) Jeremy Siek 2000, 2001
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) Jeremy Siek 2000, 2001
|
||||
|
||||
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: Breadth-First Visit</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
<P>
|
||||
<PRE>
|
||||
template <class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class P, class T, class R>
|
||||
void breadth_first_visit(IncidenceGraph& G,
|
||||
typename graph_traits<IncidenceGraph>::vertex_descriptor s,
|
||||
void breadth_first_visit(IncidenceGraph& G,
|
||||
typename graph_traits<IncidenceGraph>::vertex_descriptor s,
|
||||
const bgl_named_params<P, T, R>& params);
|
||||
|
||||
template <class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./Buffer.html">Buffer</a>, class <a href="./BFSVisitor.html">BFSVisitor</a>, class ColorMap>
|
||||
void breadth_first_visit
|
||||
(const IncidenceGraph& g,
|
||||
typename graph_traits<IncidenceGraph>::vertex_descriptor s,
|
||||
(const IncidenceGraph& g,
|
||||
typename graph_traits<IncidenceGraph>::vertex_descriptor s,
|
||||
Buffer& Q, BFSVisitor vis, ColorMap color)
|
||||
</PRE>
|
||||
|
||||
@@ -87,7 +87,7 @@ UTIL/OUT: <tt>color_map(ColorMap color)</tt>
|
||||
<blockquote>
|
||||
This is used by the algorithm to keep track of its progress through
|
||||
the graph. The type <tt>ColorMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a> and its key type must be the graph's vertex
|
||||
descriptor type and the value type of the color map must model
|
||||
<a href="./ColorValue.html">ColorValue</a>.<br>
|
||||
@@ -110,7 +110,7 @@ UTIL: <tt>buffer(Buffer& Q)</tt>
|
||||
|
||||
<b>Python</b>: The buffer must derive from the <a
|
||||
href="./Buffer.html">Buffer</a> type for the graph.
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<H3><A NAME="SECTION001330300000000000000">
|
||||
@@ -118,7 +118,7 @@ Complexity</A>
|
||||
</H3>
|
||||
|
||||
<P>
|
||||
The time complexity is <i>O(E)</i>.
|
||||
The time complexity is <i>O(E)</i>.
|
||||
|
||||
<P>
|
||||
|
||||
@@ -129,7 +129,7 @@ The time complexity is <i>O(E)</i>.
|
||||
vertex as it is removed from the queue.
|
||||
|
||||
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge
|
||||
of each vertex immediately after the vertex is removed from the queue.
|
||||
of each vertex immediately after the vertex is removed from the queue.
|
||||
|
||||
<li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked (in addition to
|
||||
<tt>examine_edge()</tt>) if the edge is a tree edge. The
|
||||
@@ -138,20 +138,20 @@ The time complexity is <i>O(E)</i>.
|
||||
<li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked the first time the
|
||||
algorithm encounters vertex <i>u</i>. All vertices closer to the
|
||||
source vertex have been discovered, and vertices further from the
|
||||
source have not yet been discovered.
|
||||
source have not yet been discovered.
|
||||
|
||||
<li><b><tt>vis.non_tree_edge(e, g)</tt></b> is invoked (in addition to
|
||||
<tt>examine_edge()</tt>) if the edge is not a tree edge.
|
||||
<tt>examine_edge()</tt>) if the edge is not a tree edge.
|
||||
|
||||
<li><b><tt>vis.gray_target(e, g)</tt></b> is invoked (in addition to
|
||||
<tt>non_tree_edge()</tt>) if the target vertex is colored gray at the
|
||||
time of examination. The color gray indicates that
|
||||
the vertex is currently in the queue.
|
||||
the vertex is currently in the queue.
|
||||
|
||||
<li><b><tt>vis.black_target(e, g)</tt></b> is invoked (in addition to
|
||||
<tt>non_tree_edge()</tt>) if the target vertex is colored black at the
|
||||
time of examination. The color black indicates that the
|
||||
vertex is no longer in the queue.
|
||||
vertex is no longer in the queue.
|
||||
|
||||
<li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked after all of the out
|
||||
edges of <i>u</i> have been examined and all of the adjacent vertices
|
||||
@@ -167,7 +167,7 @@ The time complexity is <i>O(E)</i>.
|
||||
|
||||
<h3>Notes</h3>
|
||||
|
||||
<p><a name="1">[1]</a>
|
||||
<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
|
||||
@@ -178,9 +178,9 @@ The time complexity is <i>O(E)</i>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+155
-105
@@ -1,64 +1,66 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<!--
|
||||
-- Copyright Doug Gregor 2004. 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)
|
||||
Copyright Doug Gregor 2004. 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)
|
||||
|
||||
-- For more information, see http://www.boost.org
|
||||
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<int> 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<
|
||||
boost::listS, boost::vecS, boost::bidirectionalS,
|
||||
City, Highway>
|
||||
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<
|
||||
boost::listS, boost::vecS, boost::bidirectionalS,
|
||||
// Vertex properties
|
||||
boost::property<boost::vertex_name_t, std::string,
|
||||
boost::property<boost::vertex_name_t, std::string,
|
||||
boost::property<population_t, int,
|
||||
boost::property<zipcodes_t, std::vector<int> > > >,
|
||||
// Edge properties
|
||||
boost::property<boost::edge_name_t, std::string,
|
||||
boost::property<boost::edge_length_t, double,
|
||||
boost::property<boost::edge_weight_t, double,
|
||||
boost::property<edge_speed_limit_t, int,
|
||||
boost::property<edge_lanes_t, int,
|
||||
boost::property<edge_divided, bool> > > > > >
|
||||
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<
|
||||
boost::listS, boost::vecS, boost::bidirectionalS,
|
||||
City, Highway> Map;
|
||||
</pre>
|
||||
City, Highway, Country>
|
||||
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<double> 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<double> distances(num_vertices(map));
|
||||
dijkstra_shortest_paths(map, from,
|
||||
weight_map(get(<font color="#ff0000">&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<Map, int Highway::*>::type</code>
|
||||
or <code>property_map<Map, int Highway::*>::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/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<Map, double Highway::*>::type</code>
|
||||
or <code>property_map<Map, double Highway::*>::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<Graph>::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<Graph>::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<Graph>::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<Graph>::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 © 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>
|
||||
|
||||
+18
-18
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Challenge</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -37,18 +37,18 @@ review. The pending items are:</li>
|
||||
<tt>mutable_queue.hpp</tt>, <tt>fibonacci_heap.hpp</tt>.
|
||||
Somehow merge implementation with Dietmer's heaps and queues.</li>
|
||||
|
||||
<li><tt>disjoint_sets</tt> </li>
|
||||
<li><tt>disjoint_sets</tt> (see <a href="disjoint_sets.html">)</li>
|
||||
</ul>
|
||||
|
||||
<li>Construct a set of planar graph algorithms.</li>
|
||||
<ul>
|
||||
<li> Is the graph planar?</li>
|
||||
<li> "Walk around the block" and similar open and closed neighborhood
|
||||
traversals. Note that edge traversals need to resolve to particular ends
|
||||
<li> "Walk around the block" and similar open and closed neighborhood
|
||||
traversals. Note that edge traversals need to resolve to particular ends
|
||||
and sides (see below), not just to the edge as a whole.</li>
|
||||
<li> Given a point, find the nearest vertex, edge, or bounded polygon.
|
||||
<li> Given a point, find the nearest vertex, edge, or bounded polygon.
|
||||
Again, edges are viewed as having left and right sides.</li>
|
||||
<li> Given a line segment, find intersecting vertices, edges, or bounded
|
||||
<li> Given a line segment, find intersecting vertices, edges, or bounded
|
||||
polygons.</li>
|
||||
<li> Given a polygon, find intersecting whatever...</li>
|
||||
<li> Various minimum bounding rectangle and clipping problems.</li>
|
||||
@@ -61,12 +61,12 @@ polygons.</li>
|
||||
<li>Rewrite the Qhull algorithm using the Boost Graph Library (this is
|
||||
high difficulty challenge). Or, for a more manageable challenge,
|
||||
write an interface for Qhull with the BGL. <a
|
||||
href="http://www.geom.umn.edu/locate/qhull">Qhull</a> computes the
|
||||
href="http://www.qhull.org/">Qhull</a> computes the
|
||||
convex hull, Delaunay triangulation, Voronoi diagram, and halfspace
|
||||
intersection about a point. Qhull runs in 2-d, 3-d, 4-d, and higher
|
||||
dimensions. Qhull is used for collision detection, animation, plate
|
||||
tectonics, 3-d modeling, robot motion planning, and other <a
|
||||
href="http://www.geom.umn.edu/~bradb/qhull-news.html#use">applications</a>.
|
||||
href="http://www.qhull.org/news/qhull-news.html#users">applications</a>.
|
||||
It is currently difficult to use from a C++ program.
|
||||
|
||||
</li>
|
||||
@@ -112,9 +112,9 @@ It is currently difficult to use from a C++ program.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+11
-11
@@ -1,14 +1,14 @@
|
||||
<html><!--
|
||||
-- Copyright (c) 2004 Trustees of Indiana University
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) 2004 Trustees of Indiana University
|
||||
|
||||
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><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Function template circle_graph_layout</title></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table cellpadding="2" width="100%"><td valign="top"><img src="../../../boost.png" alt="boost.png (6897 bytes)" width="277" height="86"></td><td align="center"><a href="../../../index.htm">Home</a></td><td align="center"><a href="../../libraries.htm">Libraries</a></td><td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td><td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td><td align="center"><a href="../../../more/index.htm">More</a></td></table><hr><div class="refentry" lang="en"><a name="id103562-bb"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><img src="figs/python.gif" alt="(Python)"/><span class="refentrytitle">Function template circle_graph_layout</span></h2><p>boost::circle_graph_layout — Layout the graph with the vertices at the points of a regular n-polygon. </p></div><h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2><div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><b>template</b></span><<span class="bold"><b>typename</b></span> VertexListGraph, <span class="bold"><b>typename</b></span> PositionMap, <span class="bold"><b>typename</b></span> Radius>
|
||||
<span class="type"><span class="bold"><b>void</b></span></span> circle_graph_layout(<span class="bold"><b>const</b></span> VertexListGraph & g, PositionMap position,
|
||||
Radius radius);</pre></div><div class="refsect1" lang="en"><a name="id821794"></a><h2>Where Defined</h2><a href="../../../boost/graph/circle_layout.hpp">boost/graph/circle_layout.hpp</a><h2>Description</h2><p>The distance from the center of the polygon to each point is determined by the <tt class="computeroutput">radius</tt> parameter. The <tt class="computeroutput">position</tt> parameter must be an Lvalue Property Map whose value type is a class type containing <tt class="computeroutput">x</tt> and <tt class="computeroutput">y</tt> members that will be set to the <tt class="computeroutput">x</tt> and <tt class="computeroutput">y</tt> coordinates.
|
||||
<span class="bold"><b>template</b></span><<span class="bold"><b>typename</b></span> VertexListGraph, <span class="bold"><b>typename</b></span> PositionMap, <span class="bold"><b>typename</b></span> Radius>
|
||||
<span class="type"><span class="bold"><b>void</b></span></span> circle_graph_layout(<span class="bold"><b>const</b></span> VertexListGraph & g, PositionMap position,
|
||||
Radius radius);</pre></div><div class="refsect1" lang="en"><a name="id821794"></a><h2>Where Defined</h2><a href="../../../boost/graph/circle_layout.hpp">boost/graph/circle_layout.hpp</a><h2>Description</h2><p>The distance from the center of the polygon to each point is determined by the <tt class="computeroutput">radius</tt> parameter. The <tt class="computeroutput">position</tt> parameter must be an Lvalue Property Map whose value type is a class type containing <tt class="computeroutput">x</tt> and <tt class="computeroutput">y</tt> members that will be set to the <tt class="computeroutput">x</tt> and <tt class="computeroutput">y</tt> coordinates.
|
||||
|
||||
<h2>Parameters</h2>
|
||||
IN: <tt>const VertexListGraph& g</tt>
|
||||
@@ -23,7 +23,7 @@ OUT: <tt>PositionMap position</tt>
|
||||
<blockquote>
|
||||
This property map is used to store the position of each vertex. The
|
||||
type <tt>PositionMap</tt> must be a model of <a
|
||||
href="../../property_map/WritablePropertyMap.html">Writable Property
|
||||
href="../../property_map/doc/WritablePropertyMap.html">Writable Property
|
||||
Map</a>, with the graph's edge descriptor type as its key type. The
|
||||
value type of this property map should be assignable from the
|
||||
type <tt>Radius</tt>. <br>
|
||||
@@ -43,9 +43,9 @@ IN: <tt>Radius radius</tt>
|
||||
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<TD nowrap>Copyright © 2004</TD><TD>
|
||||
<A HREF="http://www.boost.org/people/doug_gregor.html">Douglas Gregor</A>, Indiana University (dgregor -at- cs.indiana.edu</A>)<br>
|
||||
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (lums -at- osl.iu.edu)
|
||||
</TD></TR></TABLE>
|
||||
</body></html>
|
||||
|
||||
Executable → Regular
+339
-88
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<!--
|
||||
-- Copyright (c) 2005 Trustees of Indiana University
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) 2005-2009 Trustees of Indiana University
|
||||
|
||||
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>Compressed Sparse Row Graph</title>
|
||||
@@ -32,22 +32,23 @@ function address(host, user) {
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<IMG SRC="../../../boost.png"
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86"></img>
|
||||
<h1>Compressed Sparse Row Graph</h1>
|
||||
|
||||
|
||||
<p>The class template <code>compressed_sparse_row_graph</code> is
|
||||
a graph class that uses the compact Compressed Sparse Row (CSR)
|
||||
format to store directed graphs. While CSR graphs have much less
|
||||
format to store directed (and bidirectional) graphs. While CSR graphs have
|
||||
much less
|
||||
overhead than many other graph formats (e.g., <a
|
||||
href="adjacency_list.html"><code>adjacency_list</code></a>), they
|
||||
do not provide any mutability: one cannot add or remove vertices
|
||||
or edges from a CSR graph. Use this format in high-performance
|
||||
applications or for very large graphs that you do not need to
|
||||
change.</p>
|
||||
|
||||
|
||||
<p>The CSR format stores vertices and edges in separate arrays,
|
||||
with the indices into these arrays corresponding to the identifier
|
||||
for the vertex or edge, respectively. The edge array is sorted by
|
||||
@@ -56,14 +57,20 @@ function address(host, user) {
|
||||
providing the offset of the first edge outgoing from each
|
||||
vertex. Iteration over the out-edges for the <i>i</i><sup>th</sup>
|
||||
vertex in the graph is achieved by
|
||||
visiting <tt>edge_array[vertex_array[i]]</tt>, <tt>edge_array[vertex_array[i]+1]</tt>,
|
||||
visiting <tt>edge_array[vertex_array[i]]</tt>,
|
||||
<tt>edge_array[vertex_array[i]+1]</tt>,
|
||||
..., <tt>edge_array[vertex_array[i+1]]</tt>. This format minimizes
|
||||
memory use to <i>O(n + m)</i>, where <i>n</i> and <i>m</i> are the
|
||||
number of vertices and edges, respectively. The constants
|
||||
multiplied by <i>n</i> and <i>m</i> are based on the size of the
|
||||
integers needed to represent indices into the edge and vertex
|
||||
arrays, respectively, which can be controlled using
|
||||
the <a href="#template-parms">template parameters</a>.</p>
|
||||
the <a href="#template-parms">template parameters</a>. The
|
||||
<tt>Directed</tt> template parameter controls whether one edge direction
|
||||
(the default) or both directions are stored. A directed CSR graph has
|
||||
<tt>Directed</tt> = <tt>directedS</tt> and a bidirectional CSR graph (with
|
||||
a limited set of constructors)
|
||||
has <tt>Directed</tt> = <tt>bidirectionalS</tt>.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="#synopsis">Synopsis</a></li>
|
||||
@@ -94,8 +101,8 @@ function address(host, user) {
|
||||
<pre>
|
||||
namespace boost {
|
||||
|
||||
template<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<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>
|
||||
class compressed_sparse_row_graph
|
||||
{
|
||||
@@ -103,23 +110,70 @@ public:
|
||||
<i>// <a href="#constructors">Graph constructors</a></i>
|
||||
<a href="#default-const">compressed_sparse_row_graph</a>();
|
||||
|
||||
<i>// Unsorted edge list constructors </i>
|
||||
template<typename InputIterator>
|
||||
<a href="#edge-const">compressed_sparse_row_graph</a>(InputIterator edge_begin, InputIterator edge_end,
|
||||
<a href="#edge-const">compressed_sparse_row_graph</a>(edges_are_unsorted_t,
|
||||
InputIterator edge_begin, InputIterator edge_end,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
|
||||
template<typename InputIterator, typename EdgePropertyIterator>
|
||||
<a href="#edge-prop-const">compressed_sparse_row_graph</a>(edges_are_unsorted_t,
|
||||
InputIterator edge_begin, InputIterator edge_end,
|
||||
EdgePropertyIterator ep_iter,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
|
||||
template<typename MultiPassInputIterator>
|
||||
<a href="#edge-multi-const">compressed_sparse_row_graph</a>(edges_are_unsorted_multi_pass_t,
|
||||
MultiPassInputIterator edge_begin, MultiPassInputIterator edge_end,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
|
||||
template<typename MultiPassInputIterator, typename EdgePropertyIterator>
|
||||
<a href="#edge-multi-prop-const">compressed_sparse_row_graph</a>(edges_are_unsorted_multi_pass_t,
|
||||
MultiPassInputIterator edge_begin, MultiPassInputIterator edge_end,
|
||||
EdgePropertyIterator ep_iter,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
|
||||
<i>// New sorted edge list constructors <b>(directed only)</b></i>
|
||||
template<typename InputIterator>
|
||||
<a href="#edge-sorted-const">compressed_sparse_row_graph</a>(edges_are_sorted_t,
|
||||
InputIterator edge_begin, InputIterator edge_end,
|
||||
vertices_size_type numverts,
|
||||
edges_size_type numedges = 0,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
|
||||
template<typename InputIterator, typename EdgePropertyIterator>
|
||||
<a href="#edge-prop-const">compressed_sparse_row_graph</a>(InputIterator edge_begin, InputIterator edge_end,
|
||||
<a href="#edge-sorted-prop-const">compressed_sparse_row_graph</a>(edges_are_sorted_t,
|
||||
InputIterator edge_begin, InputIterator edge_end,
|
||||
EdgePropertyIterator ep_iter,
|
||||
vertices_size_type numverts,
|
||||
edges_size_type numedges = 0,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
|
||||
<i>// In-place unsorted edge list constructors <b>(directed only)</b></i>
|
||||
template<typename InputIterator>
|
||||
<a href="#edge-inplace-const">compressed_sparse_row_graph</a>(construct_inplace_from_sources_and_targets_t,
|
||||
std::vector<vertex_descriptor>& sources,
|
||||
std::vector<vertex_descriptor>& targets,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
|
||||
template<typename InputIterator>
|
||||
<a href="#edge-inplace-prop-const">compressed_sparse_row_graph</a>(construct_inplace_from_sources_and_targets_t,
|
||||
std::vector<vertex_descriptor>& sources,
|
||||
std::vector<vertex_descriptor>& targets,
|
||||
std::vector<EdgeProperty>& edge_props,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
|
||||
<i>// Miscellaneous constructors <b>(directed only)</b></i>
|
||||
template<typename Graph, typename VertexIndexMap>
|
||||
<a href="#graph-const">compressed_sparse_row_graph</a>(const Graph& g, const VertexIndexMap& vi,
|
||||
vertices_size_type numverts,
|
||||
edges_size_type numedges);
|
||||
edges_size_type numedges);
|
||||
|
||||
template<typename Graph, typename VertexIndexMap>
|
||||
compressed_sparse_row_graph(const Graph& g, const VertexIndexMap& vi);
|
||||
@@ -127,7 +181,7 @@ public:
|
||||
template<typename Graph>
|
||||
explicit <a href="#graph-const">compressed_sparse_row_graph</a>(const Graph& g);
|
||||
|
||||
<i>// <a href="#mutators">Graph mutators</a></i>
|
||||
<i>// <a href="#mutators">Graph mutators <b>(directed only)</b></a></i>
|
||||
template<typename Graph, typename VertexIndexMap>
|
||||
void <a href="#assign">assign</a>(const Graph& g, const VertexIndexMap& vi,
|
||||
vertices_size_type numverts, edges_size_type numedges);
|
||||
@@ -148,12 +202,17 @@ public:
|
||||
<i>// <a href="IncidenceGraph.html">Incidence Graph requirements</a></i>
|
||||
vertex_descriptor source(edge_descriptor, const compressed_sparse_row_graph&);
|
||||
vertex_descriptor target(edge_descriptor, const compressed_sparse_row_graph&);
|
||||
std::pair<out_edge_iterator, out_edge_iterator>
|
||||
std::pair<out_edge_iterator, out_edge_iterator>
|
||||
out_edges(vertex_descriptor, const compressed_sparse_row_graph&);
|
||||
degree_size_type out_degree(vertex_descriptor v, const compressed_sparse_row_graph&);
|
||||
|
||||
<i>// <a href="BidirectionalGraph.html">Bidirectional Graph requirements <b>(bidirectional only)</b></a></i>
|
||||
std::pair<in_edge_iterator, in_edge_iterator>
|
||||
in_edges(vertex_descriptor, const compressed_sparse_row_graph&);
|
||||
degree_size_type in_degree(vertex_descriptor v, const compressed_sparse_row_graph&);
|
||||
|
||||
<i>// <a href="AdjacencyGraph.html">Adjacency Graph requirements</a></i>
|
||||
std::pair<adjacency_iterator, adjacency_iterator>
|
||||
std::pair<adjacency_iterator, adjacency_iterator>
|
||||
adjacent_vertices(vertex_descriptor, const compressed_sparse_row_graph&);
|
||||
|
||||
<i>// <a href="VertexListGraph.html">Vertex List Graph requirements</a></i>
|
||||
@@ -165,12 +224,10 @@ std::pair<edge_iterator, edge_iterator> edges(const compressed_sparse_row_
|
||||
edges_size_type num_edges(const compressed_sparse_row_graph&);
|
||||
|
||||
<i>// <a href="#vertex-access">Vertex access</a></i>
|
||||
vertex_descriptor <a href="#vertex">vertex</a>(vertices_size_type i, const compressed_sparse_row_graph&);
|
||||
vertex_descriptor <a href="#vertex-lookup">vertex</a>(vertices_size_type i, const compressed_sparse_row_graph&);
|
||||
|
||||
<i>// <a href="#edge-access">Edge access</a></i>
|
||||
std::pair<out_edge_iterator, out_edge_iterator>
|
||||
<a href="#edge_range">edge_range</a>(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&);
|
||||
std::pair<edge_descriptor, bool>
|
||||
std::pair<edge_descriptor, bool>
|
||||
<a href="#edge">edge</a>(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&);
|
||||
edge_descriptor <a href="#edge_from_index">edge_from_index</a>(edges_size_type i, const compressed_sparse_row_graph&);
|
||||
|
||||
@@ -184,7 +241,7 @@ property_map<compressed_sparse_row_graph, Tag>::const_type
|
||||
<a href="#get">get</a>(PropertyTag, const compressed_sparse_row_graph& g)
|
||||
|
||||
template<typename <a href="./PropertyTag.html">PropertyTag</a>, class X>
|
||||
typename property_traits<property_map<compressed_sparse_row_graph, PropertyTag>::const_type>::value_type
|
||||
typename property_traits<property_map<compressed_sparse_row_graph, PropertyTag>::const_type>::value_type
|
||||
<a href="#get-x">get</a>(PropertyTag, const compressed_sparse_row_graph& g, X x)
|
||||
|
||||
template<typename <a href="./PropertyTag.html">PropertyTag</a>, class X, class Value>
|
||||
@@ -203,14 +260,21 @@ void <a href="#set_property">set_property</a>(const compressed_sparse_row_graph&
|
||||
const typename graph_property<compressed_sparse_row_graph, GraphPropertyTag>::type& value);
|
||||
|
||||
<i>// <a href="#incremental-construction-functions">Incremental construction functions</a></i>
|
||||
template<typename Graph>
|
||||
vertex_descriptor <a href=#add_vertex">add_vertex</a>(compressed_sparse_row_graph& g);
|
||||
<b>(directed only)</b>
|
||||
template<typename InputIterator, typename Graph>
|
||||
void <a href="#add_edges">add_edges</a>(InputIterator first, InputIterator last, compressed_sparse_row_graph& g);
|
||||
|
||||
template<typename Graph>
|
||||
vertex_descriptor <a href=#add_vertices">add_vertices</a>(vertices_size_type count, compressed_sparse_row_graph& g);
|
||||
<b>(directed only)</b>
|
||||
template<typename InputIterator, typename EPIter, typename Graph>
|
||||
void <a href="#add_edges_prop">add_edges</a>(InputIterator first, InputIterator last, EPIter ep_first, EPIter ep_last, compressed_sparse_row_graph& g);
|
||||
|
||||
template<typename Graph>
|
||||
edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, vertex_descriptor tgt, compressed_sparse_row_graph& g);
|
||||
<b>(directed only)</b>
|
||||
template<typename BidirectionalIterator, typename Graph>
|
||||
void <a href="#add_edges_sorted">add_edges_sorted</a>(BidirectionalIterator first, BidirectionalIterator last, compressed_sparse_row_graph& g);
|
||||
|
||||
<b>(directed only)</b>
|
||||
template<typename BidirectionalIterator, typename EPIter, typename Graph>
|
||||
void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator first, BidirectionalIterator last, EPIter ep_iter, compressed_sparse_row_graph& g);
|
||||
|
||||
} <i>// end namespace boost</i>
|
||||
</pre>
|
||||
@@ -219,7 +283,7 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
<p><code><<a href="../../../boost/graph/compressed_sparse_row_graph.hpp">boost/graph/compressed_sparse_row_graph.hpp</a>></code></p>
|
||||
|
||||
<a name="models"></a><h2>Models</h2>
|
||||
|
||||
|
||||
<p>The <tt>compressed_sparse_row_graph</tt> class template models
|
||||
(i.e., implements the requirements of) many of the
|
||||
BGL <a href="graph_concepts.html">graph concepts</a>, allowing it
|
||||
@@ -253,8 +317,9 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
<blockquote>
|
||||
A selector that determines whether the graph will be directed,
|
||||
bidirectional or undirected. At this time, the CSR graph type
|
||||
only supports directed graphs, so this value must
|
||||
be <code>boost::directedS</code>.<br>
|
||||
only supports directed and bidirectional graphs, so this value must
|
||||
be either <code>boost::directedS</code> or
|
||||
<code>boost::bidirectionalS</code>.<br>
|
||||
<b>Default</b>: <code>boost::directedS</code>
|
||||
</blockquote>
|
||||
|
||||
@@ -340,9 +405,9 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
|
||||
<pre><a name="edge-const"></a>
|
||||
template<typename InputIterator>
|
||||
compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
|
||||
compressed_sparse_row_graph(edges_are_unsorted_t,
|
||||
InputIterator edge_begin, InputIterator edge_end,
|
||||
vertices_size_type numverts,
|
||||
edges_size_type numedges = 0,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
</pre>
|
||||
|
||||
@@ -351,13 +416,129 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
edges are specified by the iterator range <code>[edge_begin,
|
||||
edge_end)</code>. The <tt>InputIterator</tt> must be a model of
|
||||
<a
|
||||
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
|
||||
whose <code>value_type</code> is an <code>std::pair</code> of
|
||||
integer values. These integer values are the source and target
|
||||
vertices for the edges, and must fall within the range <code>[0,
|
||||
numverts)</code>. The edges in <code>[edge_begin,
|
||||
edge_end)</code> do not need to be sorted. This constructor uses extra
|
||||
memory to save the edge information before adding it to the graph,
|
||||
avoiding the requirement for the iterator to have multi-pass capability.
|
||||
</p>
|
||||
|
||||
<p class="indent">
|
||||
The value <code>prop</code> will be used to initialize the graph
|
||||
property.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="edge-prop-const"></a>
|
||||
template<typename InputIterator, typename EdgePropertyIterator>
|
||||
compressed_sparse_row_graph(edges_are_unsorted_t,
|
||||
InputIterator edge_begin, InputIterator edge_end,
|
||||
EdgePropertyIterator ep_iter,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
</pre>
|
||||
<p class="indent">
|
||||
This constructor constructs a graph with <code>numverts</code>
|
||||
vertices and the edges provided in the iterator range
|
||||
<code>[edge_begin, edge_end)</code>. Its semantics are identical
|
||||
to the <a href="#edge-const">edge range constructor</a>, except
|
||||
that edge properties are also initialized. The type
|
||||
<tt>EdgePropertyIterator</tt> must be a model of the <a
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
|
||||
concept whose <tt>value_type</tt> is convertible to
|
||||
<tt>EdgeProperty</tt>. The iterator range <tt>[ep_iter, ep_ter +
|
||||
m)</tt> will be used to initialize the properties on the edges
|
||||
of the graph, where <tt>m</tt> is distance from
|
||||
<tt>edge_begin</tt> to <tt>edge_end</tt>. This constructor uses extra
|
||||
memory to save the edge information before adding it to the graph,
|
||||
avoiding the requirement for the iterator to have multi-pass capability.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="edge-multi-const"></a>
|
||||
template<typename MultiPassInputIterator>
|
||||
compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t,
|
||||
MultiPassInputIterator edge_begin, MultiPassInputIterator edge_end,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
</pre>
|
||||
|
||||
<p class="indent">
|
||||
Constructs a graph with <code>numverts</code> vertices whose
|
||||
edges are specified by the iterator range <code>[edge_begin,
|
||||
edge_end)</code>. The <tt>MultiPassInputIterator</tt> must be a model of
|
||||
<a
|
||||
href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>
|
||||
whose <code>value_type</code> is an <code>std::pair</code> of
|
||||
integer values. These integer values are the source and target
|
||||
vertices for the edges, and must fall within the range <code>[0,
|
||||
numverts)</code>. The edges in <code>[edge_begin,
|
||||
edge_end)</code> do not need to be sorted. Multiple passes will be made
|
||||
over the edge range.
|
||||
</p>
|
||||
|
||||
<p class="indent">
|
||||
The value <code>prop</code> will be used to initialize the graph
|
||||
property.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="edge-multi-prop-const"></a>
|
||||
template<typename MultiPassInputIterator, typename EdgePropertyIterator>
|
||||
compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t,
|
||||
MultiPassInputIterator edge_begin, MultiPassInputIterator edge_end,
|
||||
EdgePropertyIterator ep_iter,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
</pre>
|
||||
<p class="indent">
|
||||
This constructor constructs a graph with <code>numverts</code>
|
||||
vertices and the edges provided in the iterator range
|
||||
<code>[edge_begin, edge_end)</code>. Its semantics are identical
|
||||
to the <a href="#edge-const">edge range constructor</a>, except
|
||||
that edge properties are also initialized. The type
|
||||
<tt>EdgePropertyIterator</tt> must be a model of the <a
|
||||
href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>
|
||||
concept whose <tt>value_type</tt> is convertible to
|
||||
<tt>EdgeProperty</tt>. The iterator range <tt>[ep_iter, ep_ter +
|
||||
m)</tt> will be used to initialize the properties on the edges
|
||||
of the graph, where <tt>m</tt> is distance from
|
||||
<tt>edge_begin</tt> to <tt>edge_end</tt>. Multiple passes will be made
|
||||
over the edge and property ranges.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="edge-sorted-const"></a>
|
||||
template<typename InputIterator>
|
||||
compressed_sparse_row_graph(edges_are_sorted_t,
|
||||
InputIterator edge_begin, InputIterator edge_end,
|
||||
vertices_size_type numverts,
|
||||
edges_size_type numedges = 0,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
</pre>
|
||||
|
||||
<p class="indent">
|
||||
Constructs a graph with <code>numverts</code> vertices whose
|
||||
edges are specified by the iterator range <code>[edge_begin,
|
||||
edge_end)</code>. The argument of type <code>edges_are_sorted_t</code> is
|
||||
a tag used to distinguish this constructor; the value
|
||||
<code>edges_are_sorted</code> can be used to initialize this parameter.
|
||||
The <tt>InputIterator</tt> must be a model of
|
||||
<a
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
|
||||
whose <code>value_type</code> is an <code>std::pair</code> of
|
||||
integer values. These integer values are the source and target
|
||||
vertices for the edges, and must fall within the range <code>[0,
|
||||
numverts)</code>. The edges in <code>[edge_begin,
|
||||
edge_end)</code> must be sorted so that all edges originating
|
||||
from vertex <i>i</i> preceed any edges originating from all
|
||||
from vertex <i>i</i> precede any edges originating from all
|
||||
vertices <i>j</i> where <i>j > i</i>.
|
||||
</p>
|
||||
|
||||
@@ -375,9 +556,10 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="edge-prop-const"></a>
|
||||
<pre><a name="edge-sorted-prop-const"></a>
|
||||
template<typename InputIterator, typename EdgePropertyIterator>
|
||||
compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
|
||||
compressed_sparse_row_graph(edges_are_sorted_t,
|
||||
InputIterator edge_begin, InputIterator edge_end,
|
||||
EdgePropertyIterator ep_iter,
|
||||
vertices_size_type numverts,
|
||||
edges_size_type numedges = 0,
|
||||
@@ -390,7 +572,7 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
to the <a href="#edge-const">edge range constructor</a>, except
|
||||
that edge properties are also initialized. The type
|
||||
<tt>EdgePropertyIterator</tt> must be a model of the <a
|
||||
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
|
||||
concept whose <tt>value_type</tt> is convertible to
|
||||
<tt>EdgeProperty</tt>. The iterator range <tt>[ep_iter, ep_ter +
|
||||
m)</tt> will be used to initialize the properties on the edges
|
||||
@@ -400,11 +582,53 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="#graph-const"></a>
|
||||
<pre><a name="edge-inplace-const"></a>
|
||||
template<typename InputIterator>
|
||||
compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_t,
|
||||
std::vector<vertex_descriptor>& sources,
|
||||
std::vector<vertex_descriptor>& targets,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
</pre>
|
||||
<p class="indent">
|
||||
This constructor constructs a graph with <code>numverts</code> vertices
|
||||
and the edges provided in the two vectors <code>sources</code> and
|
||||
<code>targets</code>. The two vectors are mutated in-place to sort them
|
||||
by source vertex. They are returned with unspecified values, but do not
|
||||
share storage with the constructed graph (and so are safe to destroy).
|
||||
The parameter <code>prop</code>, if provided, is used to initialize the
|
||||
graph property.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="edge-inplace-prop-const"></a>
|
||||
template<typename InputIterator>
|
||||
compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_t,
|
||||
std::vector<vertex_descriptor>& sources,
|
||||
std::vector<vertex_descriptor>& targets,
|
||||
std::vector<EdgeProperty>& edge_props,
|
||||
vertices_size_type numverts,
|
||||
const GraphProperty& prop = GraphProperty());
|
||||
</pre>
|
||||
<p class="indent">
|
||||
This constructor constructs a graph with <code>numverts</code> vertices
|
||||
and the edges provided in the two vectors <code>sources</code> and
|
||||
<code>targets</code>. Edge properties are initialized from the vector
|
||||
<code>edge_props</code>. The three vectors are mutated in-place to sort
|
||||
them by source vertex. They are returned with unspecified values, but do
|
||||
not share storage with the constructed graph (and so are safe to
|
||||
destroy). The parameter <code>prop</code>, if provided, is used to
|
||||
initialize the graph property.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="graph-const"></a>
|
||||
template<typename Graph, typename VertexIndexMap>
|
||||
compressed_sparse_row_graph(const Graph& g, const VertexIndexMap& vi,
|
||||
vertices_size_type numverts,
|
||||
edges_size_type numedges);
|
||||
edges_size_type numedges);
|
||||
|
||||
template<typename Graph, typename VertexIndexMap>
|
||||
compressed_sparse_row_graph(const Graph& g, const VertexIndexMap& vi);
|
||||
@@ -436,22 +660,20 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
<p class="indent">
|
||||
Clears the CSR graph and builds a CSR graph in place from the
|
||||
structure of another graph. The graph type <tt>Graph</tt> must
|
||||
be a model of <a href="IncidenceGraph.html">IncidenceGraph</a>
|
||||
and have a <tt>vertex(i, g)</tt> function that retrieves the
|
||||
<i>i</i><sup>th</sup> vertex in the graph.
|
||||
be a model of <a href="IncidenceGraph.html">IncidenceGraph</a>.
|
||||
|
||||
<br><b>Parameters</b>
|
||||
|
||||
<ul>
|
||||
<li><tt>g</tt>: The incoming graph.</li>
|
||||
|
||||
|
||||
<li><tt>vi</tt>: A map from vertices to indices. If not
|
||||
provided, <tt>get(vertex_index, g)</tt> will be used.</li>
|
||||
|
||||
|
||||
<li><tt>numverts</tt>: The number of vertices in the graph
|
||||
<tt>g</tt>. If not provided, <tt>Graph</tt> must be a model of
|
||||
<a href="VertexListGraph.html">VertexListGraph</a>.</li>
|
||||
|
||||
|
||||
<li><tt>numedges</tt>: The number of edges in the graph
|
||||
<tt>g</tt>. If not provided, <tt>Graph</tt> must be a model of
|
||||
<a href="EdgeListGraph.html">EdgeListGraph</a>.</li>
|
||||
@@ -491,7 +713,7 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
|
||||
<a name="vertex-access"></a><h3>Vertex access</h3>
|
||||
|
||||
<pre><a name="vertex"></a>
|
||||
<pre><a name="vertex-lookup"></a>
|
||||
vertex_descriptor vertex(vertices_size_type i, const compressed_sparse_row_graph&);
|
||||
</pre>
|
||||
<p class="indent">
|
||||
@@ -502,20 +724,9 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
<hr></hr>
|
||||
|
||||
<a name="edge-access"></a><h3>Edge access</h3>
|
||||
<pre><a name="edge_range"></a>
|
||||
std::pair<out_edge_iterator, out_edge_iterator>
|
||||
edge_range(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&);
|
||||
</pre>
|
||||
|
||||
<p class="indent">
|
||||
Returns all edges from <tt>u</tt> to <tt>v</tt>. Requires time
|
||||
linear in the number of edges outgoing from <tt>u</tt>.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="edge"></a>
|
||||
std::pair<edge_descriptor, bool>
|
||||
std::pair<edge_descriptor, bool>
|
||||
edge(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&);
|
||||
</pre>
|
||||
|
||||
@@ -524,8 +735,11 @@ edge_descriptor <a href=#add_edge">add_vertices</a>(vertex_descriptor src, verte
|
||||
descriptor for that edge and <tt>true</tt>; otherwise, the
|
||||
second value in the pair will be <tt>false</tt>. If multiple
|
||||
edges exist from <tt>u</tt> to <tt>v</tt>, the first edge will
|
||||
be returned; use <a href="#edge_range"><tt>edge_range</tt></a>
|
||||
to retrieve all edges.
|
||||
be returned; use <a href="IncidenceGraph.html"><tt>out_edges</tt></a> and a
|
||||
conditional statement
|
||||
to retrieve all edges to a given target. This function requires linear
|
||||
time in the
|
||||
number of edges outgoing from <tt>u</tt>.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
@@ -552,7 +766,7 @@ template<typename <a href="./PropertyTag.html">PropertyTag</a>>
|
||||
property_map<compressed_sparse_row_graph, Tag>::const_type
|
||||
get(PropertyTag, const compressed_sparse_row_graph& g)
|
||||
</pre>
|
||||
|
||||
|
||||
<p class="indent">
|
||||
Returns the property map object for the vertex property
|
||||
specified by <TT>PropertyTag</TT>. The <TT>PropertyTag</TT> must
|
||||
@@ -602,7 +816,7 @@ get_property(const compressed_sparse_row_graph& g, GraphPropertyTag);
|
||||
|
||||
<p class="indent">
|
||||
Return the property specified by <tt>GraphPropertyTag</tt> that
|
||||
is attached to the graph object <tt>g</tt>.
|
||||
is attached to the graph object <tt>g</tt>.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
@@ -622,40 +836,77 @@ void set_property(const compressed_sparse_row_graph& g, GraphPropertyTag,
|
||||
|
||||
<h3><a name="incremental-construction-functions">Incremental construction functions</a></h3>
|
||||
|
||||
<pre><a name="add_vertex"></a>
|
||||
vertex_descriptor add_vertex(compressed_sparse_row_graph& g)
|
||||
<pre><a name="add_edges"></a>
|
||||
template<typename InputIterator>
|
||||
void add_edges(InputIterator first, InputIterator last, compressed_sparse_row_graph& g)
|
||||
</pre>
|
||||
|
||||
|
||||
<p class="indent">
|
||||
Add a new vertex to the end of the graph <tt>g</tt>, and return a
|
||||
descriptor for that vertex. The new vertex will be greater than any of
|
||||
the previous vertices in <tt>g</tt>.
|
||||
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph.
|
||||
The <tt>InputIterator</tt> must be a model of <a
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
|
||||
whose <code>value_type</code> is an <code>std::pair</code> of integer
|
||||
values. These integer values are the source and target vertices of the
|
||||
new edges. The edges do not need to be sorted.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="add_vertices"></a>
|
||||
vertex_descriptor add_vertices(vertices_size_type count, compressed_sparse_row_graph& g)
|
||||
<pre><a name="add_edges_prop"></a>
|
||||
template<typename InputIterator, typename EPIter>
|
||||
void add_edges(InputIterator first, InputIterator last, EPIter ep_first, EPIter ep_last, compressed_sparse_row_graph& g)
|
||||
</pre>
|
||||
|
||||
|
||||
<p class="indent">
|
||||
Add <tt>count</tt> new vertices to the end of the graph <tt>g</tt>, and
|
||||
return a descriptor for the smallest new vertex. The new vertices will
|
||||
be greater than any of the previous vertices in <tt>g</tt>.
|
||||
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) with
|
||||
corresponding edge properties (from <tt>ep_first</tt> to
|
||||
<tt>ep_last</tt>) to the graph. The <tt>InputIterator</tt> and
|
||||
<tt>EPIter</tt> must be models of <a
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>;
|
||||
the <code>value_type</code> of <tt>InputIterator</tt> must be an
|
||||
<code>std::pair</code> of integer values, and the <code>value_type</code>
|
||||
of <tt>EPIter</tt> must be the edge property type of the graph. The
|
||||
integer values produced by the <tt>InputIterator</tt> are the source and
|
||||
target vertices of the new edges. The edges do not need to be sorted.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="add_edge"></a>
|
||||
edge_descriptor add_edge(vertex_descriptor src, vertex_descriptor tgt, compressed_sparse_row_graph& g)
|
||||
<pre><a name="add_edges_sorted"></a>
|
||||
template<typename BidirectionalIterator>
|
||||
void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, compressed_sparse_row_graph& g)
|
||||
</pre>
|
||||
|
||||
|
||||
<p class="indent">
|
||||
Add a new edge from <tt>src</tt> to <tt>tgt</tt> in the graph <tt>g</tt>,
|
||||
and return a descriptor for it. There must not be an edge in <tt>g</tt>
|
||||
whose source vertex is greater than <tt>src</tt>. If the vertex
|
||||
<tt>src</tt> has out edges before this operation is called, there must be
|
||||
none whose target is larger than <tt>tgt</tt>.
|
||||
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph.
|
||||
The <tt>BidirectionalIterator</tt> must be a model of <a
|
||||
href="http://www.boost.org/sgi/stl/BidirectionalIterator.html">BidirectionalIterator</a>
|
||||
whose <code>value_type</code> is an <code>std::pair</code> of integer
|
||||
values. These integer values are the source and target vertices of the
|
||||
new edges. The edges must be sorted in increasing order by source vertex
|
||||
index.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<pre><a name="add_edges_sorted_prop"></a>
|
||||
template<typename BidirectionalIterator, typename EPIter>
|
||||
void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, EPIter ep_iter, compressed_sparse_row_graph& g)
|
||||
</pre>
|
||||
|
||||
<p class="indent">
|
||||
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph.
|
||||
The <tt>BidirectionalIterator</tt> and <tt>EPIter</tt> must be models of
|
||||
<a
|
||||
href="http://www.boost.org/sgi/stl/BidirectionalIterator.html">BidirectionalIterator</a>.
|
||||
The <code>value_type</code> of the <tt>BidirectionalIterator</tt> must be
|
||||
an <code>std::pair</code> of integer
|
||||
values. These integer values are the source and target vertices of the
|
||||
new edges.
|
||||
The <code>value_type</code> of the <tt>EPIter</tt> must be the edge
|
||||
property type of the graph.
|
||||
The edges must be sorted in increasing order by source vertex
|
||||
index.
|
||||
</p>
|
||||
|
||||
<hr></hr>
|
||||
@@ -699,7 +950,7 @@ BGL_FORALL_VERTICES(v, g, WebGraph)
|
||||
// Output each of the links
|
||||
std::cout << "The web graph:" << std::endl;
|
||||
BGL_FORALL_EDGES(e, g, WebGraph)
|
||||
std::cout << " " << g[source(e, g)].url << " -> " << g[target(e, g)].url
|
||||
std::cout << " " << g[source(e, g)].url << " -> " << g[target(e, g)].url
|
||||
<< std::endl;
|
||||
</pre>
|
||||
|
||||
@@ -713,7 +964,7 @@ BGL_FORALL_EDGES(e, g, WebGraph)
|
||||
<TD nowrap>Copyright © 2005</TD><TD>
|
||||
<A HREF="http://www.boost.org/people/doug_gregor.html">Doug Gregor</A>, Indiana University (<script language="Javascript">address("cs.indiana.edu", "dgregor")</script>)<br>
|
||||
Jeremiah Willcock, Indiana University (<script language="Javascript">address("osl.iu.edu", "jewillco")</script>)<br>
|
||||
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<script language="Javascript">address("osl.iu.edu", "lums")</script>)
|
||||
</TD></TR></TABLE>
|
||||
</body>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) Jeremy Siek 2000-2001
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) Jeremy Siek 2000-2001
|
||||
|
||||
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: Connected Components</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -74,8 +74,8 @@ and assigning each component an integer label. The algorithm then
|
||||
records which component each vertex in the graph belongs to by
|
||||
recording the component number in the component property map. The
|
||||
<tt>ComponentMap</tt> type must be a model of <a
|
||||
href="../../property_map/WritablePropertyMap.html">Writable Property
|
||||
Map</a>. The value type shouch be an integer type, preferably the same
|
||||
href="../../property_map/doc/WritablePropertyMap.html">Writable Property
|
||||
Map</a>. The value type should be an integer type, preferably the same
|
||||
as the <tt>vertices_size_type</tt> of the graph. The key type must be
|
||||
the graph's vertex descriptor type.<br>
|
||||
|
||||
@@ -89,12 +89,12 @@ UTIL: <tt>color_map(ColorMap color)</tt>
|
||||
<blockquote>
|
||||
This is used by the algorithm to keep track of its progress through
|
||||
the graph. The type <tt>ColorMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a> and its key type must be the graph's vertex
|
||||
descriptor type and the value type of the color map must model
|
||||
<a href="./ColorValue.html">ColorValue</a>.<br>
|
||||
<b>Default:</b> an <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
</tt>iterator_property_map</tt></a> created from a
|
||||
<tt>std::vector</tt> of <tt>default_color_type</tt> of size
|
||||
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
|
||||
@@ -109,7 +109,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
num_vertices(g))</tt>. This parameter is only necessary when the
|
||||
default color property map is used. The type <tt>VertexIndexMap</tt>
|
||||
must be a model of <a
|
||||
href="../../property_map/ReadablePropertyMap.html">Readable Property
|
||||
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
|
||||
Map</a>. The value type of the map must be an integer type. The
|
||||
vertex descriptor type of the graph needs to be usable as the key
|
||||
type of the map.<br>
|
||||
@@ -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.
|
||||
@@ -149,9 +149,9 @@ undirected graph.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: Constructing Graph Algorithms</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -91,12 +91,12 @@ use the propery map interface. This gives the user of the
|
||||
algorithm the ability to decide how they want to store the properties.
|
||||
Since we will need to both read and write the colors we specify the
|
||||
requirements as <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. The
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. The
|
||||
<TT>key_type</TT> of the color map must be the
|
||||
<TT>vertex_descriptor</TT> from the graph, and the <TT>value_type</TT>
|
||||
must be some kind of integer. We also specify the interface for the
|
||||
<TT>order</TT> parameter as a property map, in this case a <a
|
||||
href="../../property_map/ReadablePropertyMap.html">ReadablePropertyMap</a>. For
|
||||
href="../../property_map/doc/ReadablePropertyMap.html">ReadablePropertyMap</a>. For
|
||||
order, the <TT>key_type</TT> is an integer offset and the
|
||||
<TT>value_type</TT> is a <TT>vertex_descriptor</TT>. Again we enforce
|
||||
these requirements with concept checks. The return value of this
|
||||
@@ -106,14 +106,14 @@ 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>
|
||||
namespace boost {
|
||||
template <class VertexListGraph, class Order, class Color>
|
||||
typename graph_traits<VertexListGraph>::vertices_size_type
|
||||
sequential_vertex_color_ting(const VertexListGraph& G,
|
||||
sequential_vertex_color_ting(const VertexListGraph& G,
|
||||
Order order, Color color)
|
||||
{
|
||||
typedef graph_traits<VertexListGraph> GraphTraits;
|
||||
@@ -122,32 +122,32 @@ namespace boost {
|
||||
typedef typename property_traits<Color>::value_type ColorType;
|
||||
typedef typename property_traits<Order>::value_type OrderType;
|
||||
|
||||
function_requires< VertexListGraphConcept<VertexListGraph> >();
|
||||
function_requires< ReadWritePropertyMapConcept<Color, vertex_descriptor> >();
|
||||
function_requires< IntegerConcept<ColorType> >();
|
||||
function_requires< size_type, ReadablePropertyMapConcept<Order> >();
|
||||
typedef typename same_type<OrderType, vertex_descriptor>::type req_same;
|
||||
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<VertexListGraph> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<Color, vertex_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( IntegerConcept<ColorType> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<Order, size_type> ));
|
||||
BOOST_STATIC_ASSERT((is_same<OrderType, vertex_descriptor>::value));
|
||||
|
||||
size_type max_color = 0;
|
||||
const size_type V = num_vertices(G);
|
||||
std::vector<size_type>
|
||||
std::vector<size_type>
|
||||
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 < V; i++) {
|
||||
vertex_descriptor current = order[i];
|
||||
|
||||
// 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)
|
||||
mark[color[*ai]] = i;
|
||||
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
|
||||
size_type smallest_color = 0;
|
||||
while (smallest_color < max_color && mark[smallest_color] == i)
|
||||
while (smallest_color < max_color && mark[smallest_color] == i)
|
||||
++smallest_color;
|
||||
|
||||
// if all the colors are used up, increase the number of colors
|
||||
@@ -169,15 +169,15 @@ namespace boost {
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+17
-17
@@ -1,24 +1,24 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Copy Graph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<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><TT>copy_graph</TT></H1>
|
||||
|
||||
<PRE>
|
||||
template <class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./MutableGraph.html">MutableGraph</a>>
|
||||
template <class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./MutableGraph.html">MutableGraph</a>>
|
||||
void copy_graph(const VertexListGraph& G, MutableGraph& G_copy,
|
||||
const bgl_named_params<P, T, R>& params = <i>all defaults</i>)
|
||||
</PRE>
|
||||
@@ -52,7 +52,7 @@ href="./MutableGraph.html">Mutable Graph</a>.
|
||||
|
||||
IN: <tt>vertex_copy(VertexCopier vc)</tt>
|
||||
<blockquote>
|
||||
This is a <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">Binary Function</a> that copies the properties of a vertex in the original graph
|
||||
This is a <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">Binary Function</a> that copies the properties of a vertex in the original graph
|
||||
into the corresponding vertex in the copy.<br>
|
||||
|
||||
<b>Default:</b> <tt>vertex_copier<VertexListGraph, MutableGraph></tt>
|
||||
@@ -62,7 +62,7 @@ map from the graph.
|
||||
|
||||
IN: <tt>edge_copy(EdgeCopier ec)</tt>
|
||||
<blockquote>
|
||||
This is a <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">Binary Function</a> that copies the properties of an edge in the original graph
|
||||
This is a <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">Binary Function</a> that copies the properties of an edge in the original graph
|
||||
into the corresponding edge in the copy.<br>
|
||||
|
||||
<b>Default:</b> <tt>edge_copier<VertexListGraph, MutableGraph></tt>
|
||||
@@ -73,14 +73,14 @@ map from the graph.
|
||||
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<blockquote>
|
||||
The vertex index map type must be a model of <a
|
||||
href="../../property_map/ReadablePropertyMap.html">Readable Property
|
||||
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
|
||||
Map</a> and must map the vertex descriptors of <tt>G</tt> to the
|
||||
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>
|
||||
|
||||
@@ -90,7 +90,7 @@ UTIL/OUT: <tt>orig_to_copy(Orig2CopyMap c)</tt>
|
||||
This maps vertices in the original graph to vertices in the copy.
|
||||
|
||||
<b>Default:</b> an <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
</tt>iterator_property_map</tt></a> created from a
|
||||
<tt>std::vector</tt> of the output graph's vertex descriptor type of size
|
||||
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
|
||||
@@ -108,9 +108,9 @@ The time complexity is <i>O(V + E)</i>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
<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)
|
||||
<!-- Copyright (c) Jeremy Siek 2000
|
||||
|
||||
<Head>
|
||||
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: Cuthill-Mckee Ordering</Title>
|
||||
</Head>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -44,34 +45,34 @@
|
||||
class ColorMap, class DegreeMap>
|
||||
OutputIterator
|
||||
cuthill_mckee_ordering(const IncidenceGraph& g,
|
||||
typename graph_traits<Graph>::vertex_descriptor s,
|
||||
OutputIterator inverse_permutation,
|
||||
typename graph_traits<IncidenceGraph>::vertex_descriptor s,
|
||||
OutputIterator inverse_permutation,
|
||||
ColorMap color, DegreeMap degree)
|
||||
|
||||
(2)
|
||||
template <class VertexListGraph, class OutputIterator>
|
||||
OutputIterator
|
||||
cuthill_mckee_ordering(const VertexIndexMap& G, OutputIterator inverse_permutation);
|
||||
cuthill_mckee_ordering(const VertexListGraph& g, OutputIterator inverse_permutation);
|
||||
|
||||
template <class VertexListGraph, class OutputIterator, class VertexIndexMap>
|
||||
OutputIterator
|
||||
cuthill_mckee_ordering(const VertexIndexMap& G, OutputIterator inverse_permutation,
|
||||
VertexIndexMap index_map);
|
||||
|
||||
template <class VertexListGraph, class OutputIterator,
|
||||
cuthill_mckee_ordering(const VertexListGraph& g, OutputIterator inverse_permutation,
|
||||
VertexIndexMap index_map);
|
||||
|
||||
template <class VertexListGraph, class OutputIterator,
|
||||
class ColorMap, class DegreeMap>
|
||||
OutputIterator
|
||||
cuthill_mckee_ordering(const VertexListGraph& G, OutputIterator inverse_permutation,
|
||||
cuthill_mckee_ordering(const VertexListGraph& g, OutputIterator inverse_permutation,
|
||||
ColorMap color, DegreeMap degree)
|
||||
|
||||
|
||||
(3)
|
||||
template <class IncidenceGraph, class OutputIterator,
|
||||
class ColorMap, class DegreeMap>
|
||||
OutputIterator
|
||||
cuthill_mckee_ordering(const IncidenceGraph& g,
|
||||
std::deque< typename
|
||||
graph_traits<Graph>::vertex_descriptor > vertex_queue,
|
||||
OutputIterator inverse_permutation,
|
||||
graph_traits<IncidenceGraph>::vertex_descriptor > vertex_queue,
|
||||
OutputIterator inverse_permutation,
|
||||
ColorMap color, DegreeMap degree)
|
||||
</pre>
|
||||
|
||||
@@ -91,10 +92,10 @@ increasing degree.
|
||||
<p>
|
||||
Version 1 of the algorithm lets the user choose the ``starting
|
||||
vertex'', version 2 finds a good starting vertex using the
|
||||
pseudo-peripheral pair heuristic (among each component), while version 3
|
||||
contains the starting nodes for each vertex in the deque. The choice of the
|
||||
``starting vertex'' can have a significant effect on the quality of the
|
||||
ordering. For versions 2 and 3, <tt>find_starting_vertex</tt> will be called
|
||||
pseudo-peripheral pair heuristic (among each component), while version 3
|
||||
contains the starting nodes for each vertex in the deque. The choice of the
|
||||
``starting vertex'' can have a significant effect on the quality of the
|
||||
ordering. For versions 2 and 3, <tt>find_starting_vertex</tt> will be called
|
||||
for each component in the graph, increasing run time significantly.
|
||||
</p>
|
||||
|
||||
@@ -139,7 +140,7 @@ For version 1:
|
||||
|
||||
<ul>
|
||||
|
||||
<li> <tt>IncidenceGraph& g</tt> (IN) <br>
|
||||
<li> <tt>IncidenceGraph& g</tt> (IN) <br>
|
||||
An undirected graph. The graph's type must be a model of <a
|
||||
href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
|
||||
<b>Python</b>: The parameter is named <tt>graph</tt>.
|
||||
@@ -148,13 +149,13 @@ For version 1:
|
||||
The starting vertex.<br>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
|
||||
<li> <tt>OutputIterator inverse_permutation</tt>  (OUT) <br>
|
||||
<li> <tt>OutputIterator inverse_permutation</tt>  (OUT) <br>
|
||||
The new vertex ordering. The vertices are written to the <a
|
||||
href="http://www.sgi.com/tech/stl/OutputIterator.html">output
|
||||
href="http://www.boost.org/sgi/stl/OutputIterator.html">output
|
||||
iterator</a> in their new order.<br>
|
||||
<b>Python</b>: This parameter is unused in Python. The new vertex
|
||||
ordering is returned as a Python <tt>list</tt>.
|
||||
|
||||
|
||||
<li> <tt>ColorMap color_map</tt>  (WORK) <br>
|
||||
Used internally to keep track of the progress of the algorithm
|
||||
(to avoid visiting the same vertex twice).<br>
|
||||
@@ -170,13 +171,13 @@ For version 2:
|
||||
|
||||
<ul>
|
||||
|
||||
<li> <tt>VertexListGraph& g</tt> (IN) <br>
|
||||
<li> <tt>VertexListGraph& g</tt> (IN) <br>
|
||||
An undirected graph. The graph's type must be a model of <a
|
||||
href="./VertexListGraph.html">VertexListGraph</a>.<br>
|
||||
href="./VertexListGraph.html">VertexListGraph</a> and <a href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
|
||||
<b>Python</b>: The parameter is named <tt>graph</tt>.
|
||||
|
||||
<li> <tt><a href="http://www.sgi.com/tech/stl/OutputIterator.html">
|
||||
OutputIterator</a> inverse_permutation</tt>  (OUT) <br>
|
||||
<li> <tt><a href="http://www.boost.org/sgi/stl/OutputIterator.html">
|
||||
OutputIterator</a> inverse_permutation</tt>  (OUT) <br>
|
||||
The new vertex ordering. The vertices are written to the
|
||||
output iterator in their new order.<br>
|
||||
<b>Python</b>: This parameter is unused in Python. The new vertex
|
||||
@@ -197,7 +198,7 @@ For version 3:
|
||||
|
||||
<ul>
|
||||
|
||||
<li> <tt>IncidenceGraph& g</tt> (IN) <br>
|
||||
<li> <tt>IncidenceGraph& g</tt> (IN) <br>
|
||||
An undirected graph. The graph's type must be a model of <a
|
||||
href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
|
||||
<b>Python</b>: The parameter is named <tt>graph</tt>.
|
||||
@@ -206,13 +207,13 @@ For version 3:
|
||||
The deque containing the starting vertices for each component.<br>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
|
||||
<li> <tt>OutputIterator inverse_permutation</tt>  (OUT) <br>
|
||||
<li> <tt>OutputIterator inverse_permutation</tt>  (OUT) <br>
|
||||
The new vertex ordering. The vertices are written to the <a
|
||||
href="http://www.sgi.com/tech/stl/OutputIterator.html">output
|
||||
href="http://www.boost.org/sgi/stl/OutputIterator.html">output
|
||||
iterator</a> in their new order.<br>
|
||||
<b>Python</b>: This parameter is unused in Python. The new vertex
|
||||
ordering is returned as a Python <tt>list</tt>.
|
||||
|
||||
|
||||
<li> <tt>ColorMap color_map</tt>  (WORK) <br>
|
||||
Used internally to keep track of the progress of the algorithm
|
||||
(to avoid visiting the same vertex twice).<br>
|
||||
@@ -239,9 +240,9 @@ and <tt>degree_property_map</tt> in <tt>boost/graph/properties.hpp</tt>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -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 <class <a href="./Graph.html">Graph</a>, class P, class T, class R>
|
||||
void cycle_canceling(
|
||||
Graph &g,
|
||||
const bgl_named_params<P, T, R> & params = <i>all defaults</i>)
|
||||
|
||||
<i>// non-named parameter version</i>
|
||||
template <class <a href="./Graph.html">Graph</a>, class Pred, class Distance, class Reversed, class ResidualCapacity, class Weight>
|
||||
void cycle_canceling(const Graph & 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& 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 © 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 -->
|
||||
|
||||
+51
-51
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Directed Acyclic Graph Shortest Paths</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -30,21 +30,21 @@ void dag_shortest_paths(const VertexListGraph& g,
|
||||
const bgl_named_params<Param,Tag,Rest>& params)
|
||||
|
||||
<i>// non-named parameter version</i>
|
||||
template <class VertexListGraph, class DijkstraVisitor,
|
||||
class DistanceMap, class WeightMap, class ColorMap,
|
||||
template <class VertexListGraph, class DijkstraVisitor,
|
||||
class DistanceMap, class WeightMap, class ColorMap,
|
||||
class PredecessorMap,
|
||||
class Compare, class Combine,
|
||||
class Compare, class Combine,
|
||||
class DistInf, class DistZero>
|
||||
void dag_shortest_paths(const VertexListGraph& g,
|
||||
typename graph_traits<VertexListGraph>::vertex_descriptor s,
|
||||
typename graph_traits<VertexListGraph>::vertex_descriptor s,
|
||||
DistanceMap distance, WeightMap weight, ColorMap color,
|
||||
PredecessorMap pred, DijkstraVisitor vis,
|
||||
PredecessorMap pred, DijkstraVisitor vis,
|
||||
Compare compare, Combine combine, DistInf inf, DistZero zero)
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
This algorithm [<A HREF="bibliography.html#clr90">8</A>] solves
|
||||
the single-source shortest-paths problem on a weighted, directed
|
||||
the single-source shortest-paths problem on a weighted, directed
|
||||
acyclic graph (DAG). This algorithm is more efficient for DAG's
|
||||
than either the Dijkstra or Bellman-Ford algorithm.
|
||||
Use breadth-first search instead of this algorithm
|
||||
@@ -74,7 +74,7 @@ algorithm's event points.</P>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
|
||||
IN: <tt>const VertexListGraph& g</tt>
|
||||
IN: <tt>const VertexListGraph& g</tt>
|
||||
<blockquote>
|
||||
The graph object on which the algorithm will be applied.
|
||||
The type <tt>VertexListGraph</tt> must be a model of \concept{VertexListGraph}.<br>
|
||||
@@ -82,7 +82,7 @@ IN: <tt>const VertexListGraph& g</tt>
|
||||
<b>Python</b>: The parameter is named <tt>graph</tt>.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>vertex_descriptor s</tt>
|
||||
IN: <tt>vertex_descriptor s</tt>
|
||||
<blockquote>
|
||||
The source vertex. All distance will be calculated from this vertex,
|
||||
and the shortest paths tree will be rooted at this vertex.<br>
|
||||
@@ -92,11 +92,11 @@ IN: <tt>vertex_descriptor s</tt>
|
||||
|
||||
<h3>Named Parameters</h3>
|
||||
|
||||
IN: <tt>weight_map(WeightMap w_map)</tt>
|
||||
IN: <tt>weight_map(WeightMap w_map)</tt>
|
||||
<blockquote>
|
||||
The weight or ``length'' of each edge in the graph.
|
||||
The type <tt>WeightMap</tt> must be a model of
|
||||
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type 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>
|
||||
@@ -106,25 +106,25 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
|
||||
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>vertex_index_map(VertexIndexMap i_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 the
|
||||
heap data structure when an edge is relaxed. The type
|
||||
<tt>VertexIndexMap</tt> must be a model of
|
||||
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
|
||||
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
|
||||
integer type. The vertex descriptor type of the graph needs to be
|
||||
usable as the key type of the map.<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.<br>
|
||||
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
OUT: <tt>predecessor_map(PredecessorMap p_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>
|
||||
@@ -132,32 +132,32 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
|
||||
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
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a> which key and vertex types the same as the vertex
|
||||
descriptor type of the graph.<br>
|
||||
<b>Default:</b> <tt>dummy_property_map</tt><br>
|
||||
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
|
||||
</blockquote>
|
||||
|
||||
UTIL/OUT: <tt>distance_map(DistanceMap d_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
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
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.
|
||||
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">Monoid</tt> formed with the <tt>combine</tt>
|
||||
function object and the <tt>zero</tt> object for the identity
|
||||
element. Also the distance value type must have a <a
|
||||
href="http://www.sgi.com/tech/stl/StrictWeakOrdering.html">
|
||||
href="http://www.boost.org/sgi/stl/StrictWeakOrdering.html">
|
||||
StrictWeakOrdering</a> provided by the <tt>compare</tt> function
|
||||
object.<br>
|
||||
<b>Default:</b> <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
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
|
||||
@@ -166,12 +166,12 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
|
||||
<b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_compare(CompareFunction cmp)</tt>
|
||||
IN: <tt>distance_compare(CompareFunction cmp)</tt>
|
||||
<blockquote>
|
||||
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 <a
|
||||
href="http://www.sgi.com/tech/stl/BinaryPredicate.html">Binary
|
||||
href="http://www.boost.org/sgi/stl/BinaryPredicate.html">Binary
|
||||
Predicate</a> and have argument types that match the value type of
|
||||
the <tt>DistanceMap</tt> property map.<br>
|
||||
|
||||
@@ -182,11 +182,11 @@ IN: <tt>distance_compare(CompareFunction cmp)</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_combine(CombineFunction cmb)</tt>
|
||||
IN: <tt>distance_combine(CombineFunction cmb)</tt>
|
||||
<blockquote>
|
||||
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
|
||||
href="http://www.boost.org/sgi/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
|
||||
@@ -199,7 +199,7 @@ IN: <tt>distance_combine(CombineFunction cmb)</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_inf(D inf)</tt>
|
||||
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>.
|
||||
@@ -209,7 +209,7 @@ IN: <tt>distance_inf(D inf)</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_zero(D zero)</tt>
|
||||
IN: <tt>distance_zero(D zero)</tt>
|
||||
<blockquote>
|
||||
The <tt>zero</tt> value must be the identity element for the
|
||||
<a href="./Monoid.html">Monoid</a> formed by the distance values
|
||||
@@ -220,7 +220,7 @@ IN: <tt>distance_zero(D zero)</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
UTIL/OUT: <tt>color_map(ColorMap 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
|
||||
vertices. The vertices start out white and become gray when they are
|
||||
@@ -228,12 +228,12 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
|
||||
from the queue. At the end of the algorithm, vertices reachable from
|
||||
the source vertex will have been colored black. All other vertices
|
||||
will still be white. The type <tt>ColorMap</tt> must be a model of
|
||||
<a href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
<a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a>. A vertex descriptor must be usable as the key type
|
||||
of the map, and the value type of the map must be a model of
|
||||
<a href="./ColorValue.html">Color Value</a>.<br>
|
||||
<b>Default:</b> an <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
<tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
|
||||
of <tt>default_color_type</tt> of size <tt>num_vertices(g)</tt> and
|
||||
using the <tt>i_map</tt> for the index map.<br>
|
||||
@@ -242,13 +242,13 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
|
||||
the graph.
|
||||
|
||||
</blockquote>
|
||||
|
||||
OUT: <tt>visitor(DijkstraVisitor v)</tt>
|
||||
|
||||
OUT: <tt>visitor(DijkstraVisitor v)</tt>
|
||||
<blockquote>
|
||||
Use this to specify actions that you would like to happen
|
||||
during certain event points within the algorithm.
|
||||
The type <tt>DijkstraVisitor</tt> must be a model of the
|
||||
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
|
||||
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
|
||||
The visitor object is passed by value <a
|
||||
href="#1">[1]</a>.<br>
|
||||
<b>Default:</b> <tt>dijkstra_visitor<null_visitor></tt><br>
|
||||
@@ -272,21 +272,21 @@ The time complexity is <i>O(V + E)</i>.
|
||||
is invoked on each vertex in the graph before the start of the
|
||||
algorithm.
|
||||
<li><b><tt>vis.examine_vertex(u, g)</tt></b>
|
||||
is invoked on a vertex as it is added to set <i>S</i>.
|
||||
is invoked on a vertex as it is added to set <i>S</i>.
|
||||
At this point we know that <i>(p[u],u)</i>
|
||||
is a shortest-paths tree edge so
|
||||
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
|
||||
is a shortest-paths tree edge so
|
||||
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
|
||||
of the examined vertices is monotonically increasing
|
||||
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
|
||||
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
|
||||
<li><b><tt>vis.examine_edge(e, g)</tt></b>
|
||||
is invoked on each out-edge of a vertex immediately after it has
|
||||
been added to set <i>S</i>.
|
||||
been added to set <i>S</i>.
|
||||
<li><b><tt>vis.edge_relaxed(e, g)</tt></b>
|
||||
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
|
||||
The edge <i>(u,v)</i> that participated in the last
|
||||
relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
|
||||
relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
|
||||
<li><b><tt>vis.discover_vertex(v, g)</tt></b>
|
||||
is invoked on vertex <i>v</i> when the edge
|
||||
is invoked on vertex <i>v</i> when the edge
|
||||
<i>(u,v)</i> is examined and <i>v</i> is WHITE. Since
|
||||
a vertex is colored GRAY when it is discovered,
|
||||
each reacable vertex is discovered exactly once.
|
||||
@@ -306,7 +306,7 @@ algorithm.
|
||||
|
||||
<H3>Notes</H3>
|
||||
|
||||
<p><a name="1">[1]</a>
|
||||
<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
|
||||
@@ -317,10 +317,10 @@ algorithm.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
|
||||
Executable → Regular
-231
@@ -1,231 +0,0 @@
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:date: $Date$
|
||||
:version: $Revision$
|
||||
:copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
-- Copyright (c) 2005 Trustees of Indiana University
|
||||
|
||||
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)
|
||||
|
||||
*/
|
||||
|
||||
.first {
|
||||
margin-top: 0 }
|
||||
|
||||
.last {
|
||||
margin-bottom: 0 }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.attention, div.caution, div.danger, div.error, div.hint,
|
||||
div.important, div.note, div.tip, div.warning, div.admonition {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.hint p.admonition-title, div.important p.admonition-title,
|
||||
div.note p.admonition-title, div.tip p.admonition-title,
|
||||
div.admonition p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
font-size: smaller }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 0em 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr {
|
||||
width: 75% }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.option-argument {
|
||||
font-style: italic }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
table {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray ;
|
||||
padding-left: 0.5ex }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black ;
|
||||
padding-left: 0.5ex }
|
||||
|
||||
td, th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
th.docinfo-name, th.field-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap }
|
||||
|
||||
h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
|
||||
font-size: 100% }
|
||||
|
||||
tt {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
+39
-33
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: Depth-First Search</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -31,7 +31,7 @@ template <class Graph, class <a href="DFSVisitor.html">DFSVisitor</a>, class
|
||||
void depth_first_search(const Graph& g, DFSVisitor vis, ColorMap color)
|
||||
|
||||
template <class Graph, class <a href="DFSVisitor.html">DFSVisitor</a>, class ColorMap>
|
||||
void depth_first_search(const Graph& g, DFSVisitor vis, ColorMap color,
|
||||
void depth_first_search(const Graph& g, DFSVisitor vis, ColorMap color,
|
||||
typename graph_traits<Graph>::vertex_descriptor start)
|
||||
|
||||
</PRE>
|
||||
@@ -84,32 +84,33 @@ be used to do this.
|
||||
<td valign="top">
|
||||
<pre>
|
||||
DFS(<i>G</i>)
|
||||
<b>for</b> each vertex <i>u in V</i>
|
||||
<b>for</b> each vertex <i>u in V</i>
|
||||
<i>color[u] :=</i> WHITE
|
||||
<i>p[u] = u</i>
|
||||
<i>p[u] = u</i>
|
||||
<b>end for</b>
|
||||
<i>time := 0</i>
|
||||
<b>if</b> there is a starting vertex <i>s</i>
|
||||
<b>call</b> DFS-VISIT(<i>G</i>, <i>s</i>)
|
||||
<b>for</b> each vertex <i>u in V</i>
|
||||
<b>for</b> each vertex <i>u in V</i>
|
||||
<b>if</b> <i>color[u] =</i> WHITE
|
||||
<b>call</b> DFS-VISIT(<i>G</i>, <i>u</i>)
|
||||
<b>end for</b>
|
||||
return (<i>p</i>,<i>d_time</i>,<i>f_time</i>) <br>
|
||||
DFS-VISIT(<i>G</i>, <i>u</i>)
|
||||
DFS-VISIT(<i>G</i>, <i>u</i>)
|
||||
<i>color[u] :=</i> GRAY
|
||||
<i>d_time[u] := time := time + 1</i>
|
||||
<b>for</b> each <i>v in Adj[u]</i>
|
||||
<i>d_time[u] := time := time + 1</i>
|
||||
<b>for</b> each <i>v in Adj[u]</i>
|
||||
<b>if</b> (<i>color[v] =</i> WHITE)
|
||||
<i>p[v] = u</i>
|
||||
<i>p[v] = u</i>
|
||||
<b>call</b> DFS-VISIT(<i>G</i>, <i>v</i>)
|
||||
<b>else if</b> (<i>color[v] =</i> GRAY)
|
||||
<b>else if</b> (<i>color[v] =</i> GRAY)
|
||||
<i>...</i>
|
||||
<b>else if</b> (<i>color[v] =</i> BLACK)
|
||||
<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>
|
||||
<i>f_time[u] := time := time + 1</i>
|
||||
<pre>
|
||||
</td>
|
||||
<td valign="top">
|
||||
@@ -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>
|
||||
@@ -185,12 +188,12 @@ UTIL/OUT: <tt>color_map(ColorMap color)</tt>
|
||||
<blockquote>
|
||||
This is used by the algorithm to keep track of its progress through
|
||||
the graph. The type <tt>ColorMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a> and its key type must be the graph's vertex
|
||||
descriptor type and the value type of the color map must model
|
||||
<a href="./ColorValue.html">ColorValue</a>.<br>
|
||||
<b>Default:</b> an <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
</tt>iterator_property_map</tt></a> created from a
|
||||
<tt>std::vector</tt> of <tt>default_color_type</tt> of size
|
||||
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
|
||||
@@ -215,7 +218,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
num_vertices(g))</tt>. This parameter is only necessary when the
|
||||
default color property map is used. The type <tt>VertexIndexMap</tt>
|
||||
must be a model of <a
|
||||
href="../../property_map/ReadablePropertyMap.html">Readable Property
|
||||
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
|
||||
Map</a>. The value type of the map must be an integer type. The
|
||||
vertex descriptor type of the graph needs to be usable as the key
|
||||
type of the map.<br>
|
||||
@@ -223,7 +226,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.
|
||||
@@ -249,24 +252,27 @@ The time complexity is <i>O(E + V)</i>.
|
||||
|
||||
<li><b><tt>vis.start_vertex(s, g)</tt></b> is invoked on the source
|
||||
vertex once before the start of the search.
|
||||
|
||||
|
||||
<li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked when a vertex
|
||||
is encountered for the first time.
|
||||
|
||||
|
||||
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge
|
||||
of each vertex after it is discovered.
|
||||
|
||||
<li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked on each edge as it
|
||||
becomes a member of the edges that form the search tree. If you
|
||||
wish to record predecessors, do so at this event point.
|
||||
|
||||
|
||||
<li><b><tt>vis.back_edge(e, g)</tt></b> is invoked on the back edges in
|
||||
the graph.
|
||||
|
||||
|
||||
<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
|
||||
the adjacent vertices have been discovered (but before their
|
||||
@@ -289,7 +295,7 @@ The example in <a href="../example/dfs-example.cpp">
|
||||
|
||||
<h3>Notes</h3>
|
||||
|
||||
<p><a name="1">[1]</a>
|
||||
<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
|
||||
@@ -300,15 +306,15 @@ The example in <a href="../example/dfs-example.cpp">
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+17
-17
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Depth-First Visit</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
<PRE>
|
||||
template <class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class ColorMap>
|
||||
void depth_first_visit(IncidenceGraph& g,
|
||||
typename graph_traits<IncidenceGraph>::vertex_descriptor s,
|
||||
typename graph_traits<IncidenceGraph>::vertex_descriptor s,
|
||||
DFSVisitor& vis, ColorMap color)
|
||||
|
||||
template <class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class ColorMap,
|
||||
template <class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class ColorMap,
|
||||
class TerminatorFunc>
|
||||
void depth_first_visit(IncidenceGraph& g,
|
||||
typename graph_traits<IncidenceGraph>::vertex_descriptor s,
|
||||
typename graph_traits<IncidenceGraph>::vertex_descriptor s,
|
||||
DFSVisitor& vis, ColorMap color, TerminatorFunc func = TerminatorFunc())
|
||||
</PRE>
|
||||
|
||||
@@ -41,7 +41,7 @@ component as the source vertex <tt>s</tt>, using the <a
|
||||
href="./graph_theory_review.html#sec:dfs-algorithm">depth-first
|
||||
pattern</a>. The main purpose of the function is for the
|
||||
implementation of <TT>depth_first_search()</TT> though sometimes it is
|
||||
useful on its own.
|
||||
useful on its own.
|
||||
|
||||
<p>
|
||||
The <tt>DFSVisitor</tt> supplied by the user determines what
|
||||
@@ -96,7 +96,7 @@ UTIL: <tt>ColorMap color</tt>
|
||||
<blockquote>
|
||||
This is used by the algorithm to keep track of its progress through
|
||||
the graph. The type <tt>ColorMap</tt> must be a model of <a
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a> and its key type must be the graph's vertex
|
||||
descriptor type and the value type of the color map map must model
|
||||
<a href="./ColorValue.html">Color Value</a>.<br>
|
||||
@@ -124,7 +124,7 @@ Time complexity is <i>O(E)</i>.
|
||||
|
||||
<h3>Notes</h3>
|
||||
|
||||
<p><a name="1">[1]</a>
|
||||
<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
|
||||
@@ -136,9 +136,9 @@ Time complexity is <i>O(E)</i>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+14
-14
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: dfs_visitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -22,7 +22,7 @@ dfs_visitor<EventVisitorList>
|
||||
</H1>
|
||||
|
||||
This class is an adapter that converts a list of <a
|
||||
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
|
||||
href="./EventVisitor.html">EventVisitor</a>s (constructed using
|
||||
<tt>std::pair</tt>) into a <a href="./DFSVisitor.html">DFSVisitor</a>.
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ with <tt>std::pair</tt>.
|
||||
This class implements all of the member functions required by <a
|
||||
href="./DFSVisitor.html">DFSVisitor</a>. In each function the
|
||||
appropriate event is dispatched to the <a
|
||||
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
|
||||
href="./EventVisitor.html">EventVisitor</a> in the EventVisitorList.
|
||||
|
||||
<h3>Non-Member Functions</h3>
|
||||
|
||||
@@ -97,15 +97,15 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Dijkstra's Shortest Paths</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
<TT>dijkstra_shortest_paths</TT>
|
||||
</H1>
|
||||
|
||||
|
||||
<P>
|
||||
<PRE>
|
||||
<i>// named parameter version</i>
|
||||
@@ -30,17 +29,31 @@ dijkstra_shortest_paths(Graph& g,
|
||||
const bgl_named_params<P, T, R>& params);
|
||||
|
||||
<i>// non-named parameter version</i>
|
||||
template <typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
|
||||
template <typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
|
||||
typename PredecessorMap, typename DistanceMap,
|
||||
typename WeightMap, typename VertexIndexMap, 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 WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
|
||||
typename DistInf, typename DistZero, typename ColorMap = <i>default</i>>
|
||||
void dijkstra_shortest_paths
|
||||
(const Graph& g,
|
||||
typename graph_traits<Graph>::vertex_descriptor s,
|
||||
PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
|
||||
typename graph_traits<Graph>::vertex_descriptor s,
|
||||
PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
|
||||
VertexIndexMap index_map,
|
||||
CompareFunction compare, CombineFunction combine, DistInf inf, DistZero zero,
|
||||
DijkstraVisitor vis, ColorMap color = <i>default</i>)
|
||||
|
||||
<i>// version that does not initialize the property maps (except for the default color map)</i>
|
||||
template <class Graph, class DijkstraVisitor,
|
||||
class PredecessorMap, class DistanceMap,
|
||||
class WeightMap, class IndexMap, class Compare, class Combine,
|
||||
class DistZero, class ColorMap>
|
||||
void
|
||||
dijkstra_shortest_paths_no_init
|
||||
(const Graph& g,
|
||||
typename graph_traits<Graph>::vertex_descriptor s,
|
||||
PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
|
||||
IndexMap index_map,
|
||||
Compare compare, Combine combine, DistZero zero,
|
||||
DijkstraVisitor vis, ColorMap color = <i>default</i>);
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
@@ -66,8 +79,8 @@ record the shortest paths tree in a predecessor map: for each vertex
|
||||
<i>u in V</i>, <i>p[u]</i> will be the predecessor of <i>u</i> in
|
||||
the shortest paths tree (unless <i>p[u] = u</i>, in which case <i>u</i> is
|
||||
either the source or a vertex unreachable from the source). In
|
||||
addition to these two options, the user can provide there own
|
||||
custom-made visitor that can takes actions during any of the
|
||||
addition to these two options, the user can provide their own
|
||||
custom-made visitor that takes actions during any of the
|
||||
algorithm's event points.</P>
|
||||
|
||||
<P>
|
||||
@@ -92,7 +105,7 @@ track of which set each vertex is in. Vertices colored black are in
|
||||
<i>S</i>. Vertices colored white or gray are in <i>V-S</i>. White vertices have
|
||||
not yet been discovered and gray vertices are in the priority queue.
|
||||
By default, the algorithm will allocate an array to store a color
|
||||
marker for each vertex in the graph. You can provide you own storage
|
||||
marker for each vertex in the graph. You can provide your own storage
|
||||
and access for colors with the <tt>color_map()</tt> parameter.
|
||||
</P>
|
||||
<p>
|
||||
@@ -109,13 +122,13 @@ 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>
|
||||
<i>d[u] := infinity</i>
|
||||
<i>p[u] := u</i>
|
||||
<b>for</b> each vertex <i>u in V</i> <b>(This loop is not run in dijkstra_shortest_paths_no_init)</b>
|
||||
<i>d[u] := infinity</i>
|
||||
<i>p[u] := u</i>
|
||||
<i>color[u] :=</i> WHITE
|
||||
<b>end for</b>
|
||||
<i>color[s] := </i>GRAY
|
||||
<i>d[s] := 0</i>
|
||||
<i>color[s] := </i>GRAY
|
||||
<i>d[s] := 0</i>
|
||||
INSERT(<i>Q</i>, <i>s</i>)
|
||||
<b>while</b> (<i>Q != Ø</i>)
|
||||
<i>u :=</i> EXTRACT-MIN(<i>Q</i>)
|
||||
@@ -123,10 +136,10 @@ DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
|
||||
<b>for</b> each vertex <i>v in Adj[u]</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>
|
||||
<b>if</b> (<i>color[v] =</i> WHITE)
|
||||
<i>p[v] := u</i>
|
||||
<b>if</b> (<i>color[v] =</i> WHITE)
|
||||
<i>color[v] :=</i> GRAY
|
||||
INSERT(<i>Q</i>, <i>v</i>)
|
||||
INSERT(<i>Q</i>, <i>v</i>)
|
||||
<b>else if</b> (<i>color[v] =</i> GRAY)
|
||||
DECREASE-KEY(<i>Q</i>, <i>v</i>)
|
||||
<b>else</b>
|
||||
@@ -175,17 +188,17 @@ finish vertex <i>u</i>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
|
||||
IN: <tt>const Graph& g</tt>
|
||||
IN: <tt>const Graph& g</tt>
|
||||
<blockquote>
|
||||
The graph object on which the algorithm will be applied.
|
||||
The type <tt>Graph</tt> must be a model of
|
||||
The type <tt>Graph</tt> must be a model of
|
||||
<a href="./VertexListGraph.html">Vertex List Graph</a>
|
||||
and <a href="./IncidenceGraph.html">Incidence Graph</a>.<br>
|
||||
|
||||
<b>Python</b>: The parameter is named <tt>graph</tt>.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>vertex_descriptor s</tt>
|
||||
IN: <tt>vertex_descriptor s</tt>
|
||||
<blockquote>
|
||||
The source vertex. All distance will be calculated from this vertex,
|
||||
and the shortest paths tree will be rooted at this vertex.<br>
|
||||
@@ -195,14 +208,14 @@ IN: <tt>vertex_descriptor s</tt>
|
||||
|
||||
<h3>Named Parameters</h3>
|
||||
|
||||
IN: <tt>weight_map(WeightMap w_map)</tt>
|
||||
IN: <tt>weight_map(WeightMap w_map)</tt>
|
||||
<blockquote>
|
||||
The weight or ``length'' of each edge in the graph. The weights
|
||||
must all be non-negative, and the algorithm will throw a
|
||||
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
|
||||
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
|
||||
exception is one of the edges is negative.
|
||||
The type <tt>WeightMap</tt> must be a model of
|
||||
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type 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>
|
||||
@@ -212,36 +225,40 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
|
||||
<b>Python default</b>: <tt>graph.get_edge_double_map("weight")</tt>
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>vertex_index_map(VertexIndexMap i_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 the
|
||||
heap data structure [<A
|
||||
HREF="bibliography.html#driscoll88">61</A>] when an edge is relaxed.
|
||||
The type
|
||||
The type
|
||||
<tt>VertexIndexMap</tt> must be a model of
|
||||
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
|
||||
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
|
||||
integer type. The vertex descriptor type of the graph needs to be
|
||||
usable as the key type of the map.<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.
|
||||
<br>
|
||||
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
OUT: <tt>predecessor_map(PredecessorMap p_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
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a> whose key and value types are the same as the vertex
|
||||
descriptor type of the graph.<br>
|
||||
<b>Default:</b> <tt>dummy_property_map</tt><br>
|
||||
@@ -249,25 +266,25 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
|
||||
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
|
||||
</blockquote>
|
||||
|
||||
UTIL/OUT: <tt>distance_map(DistanceMap d_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
|
||||
href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
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.
|
||||
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">Monoid</a> formed with the <tt>combine</tt>
|
||||
function object and the <tt>zero</tt> object for the identity
|
||||
element. Also the distance value type must have a <a
|
||||
href="http://www.sgi.com/tech/stl/StrictWeakOrdering.html">
|
||||
href="http://www.boost.org/sgi/stl/StrictWeakOrdering.html">
|
||||
StrictWeakOrdering</a> provided by the <tt>compare</tt> function
|
||||
object.<br>
|
||||
<b>Default:</b> <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
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
|
||||
@@ -276,12 +293,12 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
|
||||
<b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph.<br>
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_compare(CompareFunction cmp)</tt>
|
||||
IN: <tt>distance_compare(CompareFunction cmp)</tt>
|
||||
<blockquote>
|
||||
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 <a
|
||||
href="http://www.sgi.com/tech/stl/BinaryPredicate.html">Binary
|
||||
href="http://www.boost.org/sgi/stl/BinaryPredicate.html">Binary
|
||||
Predicate</a> and have argument types that match the value type of
|
||||
the <tt>DistanceMap</tt> property map.<br>
|
||||
|
||||
@@ -292,11 +309,11 @@ IN: <tt>distance_compare(CompareFunction cmp)</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_combine(CombineFunction cmb)</tt>
|
||||
IN: <tt>distance_combine(CombineFunction cmb)</tt>
|
||||
<blockquote>
|
||||
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
|
||||
href="http://www.boost.org/sgi/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
|
||||
@@ -309,17 +326,19 @@ IN: <tt>distance_combine(CombineFunction cmb)</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_inf(D inf)</tt>
|
||||
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<D>::max()</tt><br>
|
||||
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_zero(D zero)</tt>
|
||||
IN: <tt>distance_zero(D zero)</tt>
|
||||
<blockquote>
|
||||
The <tt>zero</tt> value must be the identity element for the
|
||||
<a href="./Monoid.html">Monoid</a> formed by the distance values
|
||||
@@ -331,7 +350,7 @@ IN: <tt>distance_zero(D zero)</tt>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
UTIL/OUT: <tt>color_map(ColorMap 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
|
||||
vertices. The vertices start out white and become gray when they are
|
||||
@@ -339,12 +358,12 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
|
||||
from the queue. At the end of the algorithm, vertices reachable from
|
||||
the source vertex will have been colored black. All other vertices
|
||||
will still be white. The type <tt>ColorMap</tt> must be a model of
|
||||
<a href="../../property_map/ReadWritePropertyMap.html">Read/Write
|
||||
<a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a>. A vertex descriptor must be usable as the key type
|
||||
of the map, and the value type of the map must be a model of
|
||||
<a href="./ColorValue.html">Color Value</a>.<br>
|
||||
<b>Default:</b> an <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
<tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
|
||||
of <tt>default_color_type</tt> of size <tt>num_vertices(g)</tt> and
|
||||
using the <tt>i_map</tt> for the index map.<br>
|
||||
@@ -352,13 +371,13 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
|
||||
<b>Python</b>: The color map must be a <tt>vertex_color_map</tt> for
|
||||
the graph.
|
||||
</blockquote>
|
||||
|
||||
OUT: <tt>visitor(DijkstraVisitor v)</tt>
|
||||
|
||||
OUT: <tt>visitor(DijkstraVisitor v)</tt>
|
||||
<blockquote>
|
||||
Use this to specify actions that you would like to happen
|
||||
during certain event points within the algorithm.
|
||||
The type <tt>DijkstraVisitor</tt> must be a model of the
|
||||
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
|
||||
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
|
||||
The visitor object is passed by value <a
|
||||
href="#2">[2]</a>.<br>
|
||||
<b>Default:</b> <tt>dijkstra_visitor<null_visitor></tt><br>
|
||||
@@ -373,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>
|
||||
@@ -385,22 +404,22 @@ The time complexity is <i>O(V log V)</i>.
|
||||
<li><b><tt>vis.examine_vertex(u, g)</tt></b>
|
||||
is invoked on a vertex as it is removed from the priority queue
|
||||
and added to set <i>S</i>. At this point we know that <i>(p[u],u)</i>
|
||||
is a shortest-paths tree edge so
|
||||
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
|
||||
is a shortest-paths tree edge so
|
||||
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
|
||||
of the examined vertices is monotonically increasing
|
||||
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
|
||||
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
|
||||
<li><b><tt>vis.examine_edge(e, g)</tt></b>
|
||||
is invoked on each out-edge of a vertex immediately after it has
|
||||
been added to set <i>S</i>.
|
||||
been added to set <i>S</i>.
|
||||
<li><b><tt>vis.edge_relaxed(e, g)</tt></b>
|
||||
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
|
||||
The edge <i>(u,v)</i> that participated in the last
|
||||
relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
|
||||
relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
|
||||
<li><b><tt>vis.discover_vertex(v, g)</tt></b>
|
||||
is invoked on vertex <i>v</i> when the edge
|
||||
is invoked on vertex <i>v</i> when the edge
|
||||
<i>(u,v)</i> is examined and <i>v</i> is WHITE. Since
|
||||
a vertex is colored GRAY when it is discovered,
|
||||
each reacable vertex is discovered exactly once. This
|
||||
each reachable vertex is discovered exactly once. This
|
||||
is also when the vertex is inserted into the priority queue.
|
||||
<li><b><tt>vis.edge_not_relaxed(e, g)</tt></b>
|
||||
is invoked if the edge is not relaxed (see above).
|
||||
@@ -416,6 +435,8 @@ See <a href="../example/dijkstra-example.cpp">
|
||||
<TT>example/dijkstra-example.cpp</TT></a> for an example of using Dijkstra's
|
||||
algorithm.
|
||||
|
||||
<H3>See also</H3> <a href="dijkstra_shortest_paths_no_color_map.html">dijkstra_shortest_paths_no_color_map</a> for a version of Dijkstra's shortest path that does not use a color map.
|
||||
|
||||
<H3>Notes</H3>
|
||||
|
||||
<a name="1">[1]</a>
|
||||
@@ -424,7 +445,7 @@ S</i> vertices in the priority queue at once, but instead only those
|
||||
vertices in <i>V - S</i> that are discovered and therefore have a
|
||||
distance less than infinity.
|
||||
|
||||
<p><a name="2">[2]</a>
|
||||
<p><a name="2">[2]</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
|
||||
@@ -435,9 +456,9 @@ distance less than infinity.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -0,0 +1,394 @@
|
||||
<HTML>
|
||||
<!--
|
||||
Copyright (c) Michael Hansen 2009
|
||||
|
||||
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: Dijkstra's Shortest Paths (No Color Map)</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:dijkstra"></A>
|
||||
<TT>dijkstra_shortest_paths_no_color_map</TT>
|
||||
</H1>
|
||||
|
||||
<P>
|
||||
<PRE>
|
||||
<i>// named parameter version</i>
|
||||
template <typename Graph, typename Param, typename Tag, typename Rest>
|
||||
void dijkstra_shortest_paths_no_color_map
|
||||
(const Graph& graph,
|
||||
typename graph_traits<Graph>::vertex_descriptor start_vertex,
|
||||
const bgl_named_params<Param,Tag,Rest>& params);
|
||||
|
||||
<i>// non-named parameter version</i>
|
||||
template <typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
|
||||
typename PredecessorMap, typename DistanceMap,
|
||||
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">DistanceCompare</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">DistanceWeightCombine</a>,
|
||||
typename DistanceInfinity, typename DistanceZero>
|
||||
void dijkstra_shortest_paths_no_color_map
|
||||
(const Graph& graph,
|
||||
typename graph_traits<Graph>::vertex_descriptor start_vertex,
|
||||
PredecessorMap predecessor_map, DistanceMap distance_map, WeightMap weight_map,
|
||||
VertexIndexMap index_map,
|
||||
DistanceCompare distance_compare, DistanceWeightCombine distance_weight_combine,
|
||||
DistanceInfinity distance_infinity, DistanceZero distance_zero);
|
||||
|
||||
<i>// version that does not initialize the property maps</i>
|
||||
template <typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
|
||||
typename PredecessorMap, typename DistanceMap,
|
||||
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">DistanceCompare</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">DistanceWeightCombine</a>,
|
||||
typename DistanceInfinity, typename DistanceZero>
|
||||
void dijkstra_shortest_paths_no_color_map_no_init
|
||||
(const Graph& graph,
|
||||
typename graph_traits<Graph>::vertex_descriptor start_vertex,
|
||||
PredecessorMap predecessor_map, DistanceMap distance_map, WeightMap weight_map,
|
||||
VertexIndexMap index_map,
|
||||
DistanceCompare distance_compare, DistanceWeightCombine distance_weight_combine,
|
||||
DistanceInfinity distance_infinity, DistanceZero distance_zero);
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
This algorithm [<A HREF="bibliography.html#dijkstra59">10</A>,<A
|
||||
HREF="bibliography.html#clr90">8</A>] solves the single-source
|
||||
shortest-paths problem on a weighted, directed or undirected graph for
|
||||
the case where all edge weights are nonnegative. Use the Bellman-Ford
|
||||
algorithm for the case when some edge weights are negative. Use
|
||||
breadth-first search instead of Dijkstra's algorithm when all edge
|
||||
weights are equal to one. For the definition of the shortest-path
|
||||
problem see Section <A
|
||||
HREF="graph_theory_review.html#sec:shortest-paths-algorithms">Shortest-Paths
|
||||
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. Note that this means that edges with infinite weight will not work correctly in this algorithm.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
There are two main options for obtaining output from the
|
||||
<tt>dijkstra_shortest_paths_no_color_map()</tt> function. If you provide a
|
||||
distance property map through the <tt>distance_map()</tt> parameter
|
||||
then the shortest distance from the start vertex to every other
|
||||
vertex in the graph will be recorded in the distance map. Also you can
|
||||
record the shortest paths tree in a predecessor map: for each vertex
|
||||
<i>u in V</i>, <i>p[u]</i> will be the predecessor of <i>u</i> in
|
||||
the shortest paths tree (unless <i>p[u] = u</i>, in which case <i>u</i> is
|
||||
either the source or a vertex unreachable from the source). In
|
||||
addition to these two options, the user can provide their own
|
||||
custom-made visitor that takes actions during any of the
|
||||
algorithm's event points <a href="#4">[4]</a>.</P>
|
||||
|
||||
<P>
|
||||
Dijkstra's algorithm finds all the shortest paths from the source
|
||||
vertex to every other vertex by iteratively "growing" the set of
|
||||
vertices <i>S</i> to which it knows the shortest path. At each step of
|
||||
the algorithm, the next vertex added to <i>S</i> is determined by a
|
||||
priority queue. The queue contains the vertices in <i>V - S</i><a
|
||||
href="#1">[1]</a> prioritized by their distance label, which is the
|
||||
length of the shortest path seen so far for each vertex. The vertex
|
||||
<i>u</i> at the top of the priority queue is then added to <i>S</i>,
|
||||
and each of its out-edges is relaxed: if the distance to <i>u</i> plus
|
||||
the weight of the out-edge <i>(u,v)</i> is less than the distance
|
||||
label for <i>v</i> then the estimated distance for vertex <i>v</i> is
|
||||
reduced. The algorithm then loops back, processing the next vertex at
|
||||
the top of the priority queue. The algorithm finishes when the
|
||||
priority queue is empty.
|
||||
</P>
|
||||
<p>
|
||||
The following is the pseudo-code for Dijkstra's single-source shortest
|
||||
paths algorithm. <i>w</i> is the edge weight, <i>d</i> is the distance label,
|
||||
and <i>p</i> is the predecessor of each vertex which is used to encode
|
||||
the shortest paths tree. <i>Q</i> is a priority queue that supports the
|
||||
DECREASE-KEY operation. The visitor event points for the algorithm are
|
||||
indicated by the labels on the right.
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<pre>
|
||||
DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
|
||||
<i>d[s] := 0</i>
|
||||
INSERT(<i>Q</i>, <i>s</i>)
|
||||
<b>while</b> (<i>Q != Ø</i>)
|
||||
<i>u :=</i> EXTRACT-MIN(<i>Q</i>)
|
||||
<b>for</b> each vertex <i>v in Adj[u]</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>
|
||||
<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>end for</b>
|
||||
<b>end while</b>
|
||||
return (<i>d</i>, <i>p</i>)
|
||||
</pre>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<pre>
|
||||
|
||||
|
||||
discover vertex <i>s</i>
|
||||
|
||||
examine vertex <i>u</i>
|
||||
examine edge <i>(u,v)</i>
|
||||
|
||||
edge <i>(u,v)</i> relaxed
|
||||
|
||||
|
||||
discover vertex <i>v</i>
|
||||
|
||||
|
||||
edge <i>(u,v)</i> not relaxed
|
||||
|
||||
finish vertex <i>u</i>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Where Defined</h3>
|
||||
|
||||
<a href="../../../boost/graph/dijkstra_shortest_paths_no_color_map.hpp"><tt>boost/graph/dijkstra_shortest_paths_no_color_map.hpp</tt></a>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
|
||||
IN: <tt>const Graph& graph</tt>
|
||||
<blockquote>
|
||||
The graph object on which the algorithm will be applied.
|
||||
The type <tt>Graph</tt> must be a model of
|
||||
<a href="./VertexListGraph.html">Vertex List Graph</a>
|
||||
and <a href="./IncidenceGraph.html">Incidence Graph</a>.<br>
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>vertex_descriptor start_vertex</tt>
|
||||
<blockquote>
|
||||
The source vertex. All distance will be calculated from this vertex,
|
||||
and the shortest paths tree will be rooted at this vertex.<br>
|
||||
</blockquote>
|
||||
|
||||
<h3>Named Parameters</h3>
|
||||
|
||||
IN: <tt>weight_map(WeightMap weight_map)</tt>
|
||||
<blockquote>
|
||||
The weight or ``length'' of each edge in the graph. The weights
|
||||
must all be non-negative and non-infinite <a href="#3">[3]</a>. The algorithm will throw a
|
||||
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
|
||||
exception is one of the edges is negative.
|
||||
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, graph)</tt><br>
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>index_map(VertexIndexMap index_map)</tt>
|
||||
<blockquote>
|
||||
This maps each vertex to an integer in the range <tt>[0,
|
||||
num_vertices(graph))</tt>. This is necessary for efficient updates of the
|
||||
heap data structure [<A
|
||||
HREF="bibliography.html#driscoll88">61</A>] when an edge is relaxed.
|
||||
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 vertex descriptor type of the graph needs to be
|
||||
usable as the key type of the map.<br>
|
||||
<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>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
</blockquote>
|
||||
|
||||
OUT: <tt>predecessor_map(PredecessorMap predecessor_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] =
|
||||
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
|
||||
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
|
||||
Property Map</a> whose key and value types are the same as the vertex
|
||||
descriptor type of the graph.<br>
|
||||
<b>Default:</b> <tt>dummy_property_map</tt><br>
|
||||
|
||||
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
|
||||
</blockquote>
|
||||
|
||||
UTIL/OUT: <tt>distance_map(DistanceMap distance_map)</tt>
|
||||
<blockquote>
|
||||
The shortest path weight from the source vertex <tt>start_vertex</tt> to each
|
||||
vertex in the graph <tt>graph</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.
|
||||
|
||||
The value type of the distance map is the element type of a <a
|
||||
href="./Monoid.html">Monoid</a> formed with the <tt>distance_weight_combine</tt>
|
||||
function object and the <tt>distance_zero</tt> object for the identity
|
||||
element. Also the distance value type must have a <a
|
||||
href="http://www.boost.org/sgi/stl/StrictWeakOrdering.html">
|
||||
StrictWeakOrdering</a> provided by the <tt>distance_compare</tt> function
|
||||
object.<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
|
||||
<tt>num_vertices(graph)</tt> and using the <tt>index_map</tt> for the index
|
||||
map.<br>
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_compare(CompareFunction distance_compare)</tt>
|
||||
<blockquote>
|
||||
This function is use to compare distances to determine which vertex
|
||||
is closer to the source vertex. The <tt>DistanceCompareFunction</tt> type
|
||||
must be a model of <a
|
||||
href="http://www.boost.org/sgi/stl/BinaryPredicate.html">Binary
|
||||
Predicate</a> and have argument types that match the value type of
|
||||
the <tt>DistanceMap</tt> property map.<br>
|
||||
|
||||
<b>Default:</b>
|
||||
<tt>std::less<D></tt> with <tt>D=typename
|
||||
property_traits<DistanceMap>::value_type</tt><br>
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_combine(CombineFunction distance_weight_combine)</tt>
|
||||
<blockquote>
|
||||
This function is used to combine distances to compute the distance
|
||||
of a path. The <tt>DistanceWeightCombineFunction</tt> type must be a model of <a
|
||||
href="http://www.boost.org/sgi/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>
|
||||
|
||||
<b>Default:</b> <tt>boost::closed_plus<D></tt> with
|
||||
<tt>D=typename property_traits<DistanceMap>::value_type</tt><br>
|
||||
</blockquote>
|
||||
|
||||
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>. All edges
|
||||
are assumed to have weight less than (by <tt>distance_compare</tt>) this
|
||||
value.<br>
|
||||
<b>Default:</b> <tt>std::numeric_limits<D>::max()</tt><br>
|
||||
</blockquote>
|
||||
|
||||
IN: <tt>distance_zero(D distance_zero)</tt>
|
||||
<blockquote>
|
||||
The <tt>distance_zero</tt> value must be the identity element for the
|
||||
<a href="./Monoid.html">Monoid</a> formed by the distance values
|
||||
and the <tt>distance_weight_combine</tt> function object.
|
||||
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>.<br>
|
||||
<b>Default:</b> <tt>D()</tt>with
|
||||
<tt>D=typename property_traits<DistanceMap>::value_type</tt><br>
|
||||
</blockquote>
|
||||
|
||||
OUT: <tt>visitor(DijkstraVisitor v)</tt>
|
||||
<blockquote>
|
||||
Use this to specify actions that you would like to happen
|
||||
during certain event points within the algorithm.
|
||||
The type <tt>DijkstraVisitor</tt> must be a model of the
|
||||
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
|
||||
The visitor object is passed by value <a
|
||||
href="#2">[2]</a>.<br>
|
||||
<b>Default:</b> <tt>dijkstra_visitor<null_visitor></tt><br>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<H3>Complexity</H3>
|
||||
|
||||
<P>
|
||||
The time complexity is <i>O(V log V + E)</i>.
|
||||
|
||||
|
||||
<h3>Visitor Event Points</h3>
|
||||
|
||||
<ul>
|
||||
<li><b><tt>vis.initialize_vertex(u, g)</tt></b>
|
||||
is invoked on each vertex in the graph before the start of the
|
||||
algorithm.
|
||||
<li><b><tt>vis.examine_vertex(u, g)</tt></b>
|
||||
is invoked on a vertex as it is removed from the priority queue
|
||||
and added to set <i>S</i>. At this point we know that <i>(p[u],u)</i>
|
||||
is a shortest-paths tree edge so
|
||||
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
|
||||
of the examined vertices is monotonically increasing
|
||||
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
|
||||
<li><b><tt>vis.examine_edge(e, g)</tt></b>
|
||||
is invoked on each out-edge of a vertex immediately after it has
|
||||
been added to set <i>S</i>.
|
||||
<li><b><tt>vis.edge_relaxed(e, g)</tt></b>
|
||||
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
|
||||
The edge <i>(u,v)</i> that participated in the last
|
||||
relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
|
||||
<li><b><tt>vis.discover_vertex(v, g)</tt></b>
|
||||
is invoked on vertex <i>v</i> when the edge
|
||||
<i>(u,v)</i> is examined and <i>v</i> has not yet been discovered (i.e. its distance was infinity before relaxation was attempted on the edge). This
|
||||
is also when the vertex is inserted into the priority queue.
|
||||
<li><b><tt>vis.edge_not_relaxed(e, g)</tt></b>
|
||||
is invoked if the edge is not relaxed (see above).
|
||||
<li><b><tt>vis.finish_vertex(u, g)</tt></b>
|
||||
is invoked on a vertex after all of its out edges have
|
||||
been examined.
|
||||
</ul>
|
||||
|
||||
<H3>Example</H3>
|
||||
|
||||
<P>
|
||||
See <a href="../example/dijkstra-no-color-map-example.cpp">
|
||||
<TT>example/dijkstra-no-color-map-example.cpp</TT></a> for an example of using Dijkstra's algorithm.
|
||||
|
||||
<H3>See also</H3> <a href="dijkstra_shortest_paths.html">dijkstra_shortest_paths</a> for a version of Dijkstra's shortest path that uses a color map.
|
||||
|
||||
<H3>Notes</H3>
|
||||
|
||||
<p>Based on the documentation for <a href="dijkstra_shortest_paths.html">dijkstra_shortest_paths</a>.
|
||||
|
||||
<p><a name="1">[1]</a>
|
||||
The algorithm used here saves a little space by not putting all <i>V -
|
||||
S</i> vertices in the priority queue at once, but instead only those
|
||||
vertices in <i>V - S</i> that are discovered and therefore have a
|
||||
distance less than infinity.
|
||||
|
||||
<p><a name="2">[2]</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><a name="3">[3]</a>
|
||||
The algorithm will not work correctly if any of the edge weights are equal to infinity since the infinite distance value is used to determine if a vertex has been discovered.
|
||||
|
||||
<p><a name="4">[4]</a>
|
||||
Calls to the visitor events occur in the same order as <tt>dijkstra_shortest_paths</tt> (i.e. <i>discover_vertex(u)</i> will always be called after <i>examine_vertex(u)</i> for an undiscovered vertex <i>u</i>). However, the vertices of the graph given to <i>dijkstra_shortest_paths_no_color_map</i> will <b>not</b> necessarily be visited in the same order as <i>dijkstra_shortest_paths</i>.
|
||||
|
||||
<br>
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2009</TD><TD>
|
||||
Trustees of Indiana University</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
+15
-15
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: dijkstra_visitor</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -22,7 +22,7 @@ dijkstra_visitor<EventVisitorList>
|
||||
</H1>
|
||||
|
||||
This class is an adapter that converts a list of <a
|
||||
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
|
||||
href="./EventVisitor.html">EventVisitor</a>s (constructed using
|
||||
<tt>std::pair</tt>) into a <a
|
||||
href="./DijkstraVisitor.html">DijkstraVisitor</a>.
|
||||
|
||||
@@ -37,7 +37,7 @@ by Dijkstra's algorithm.
|
||||
|
||||
<pre>
|
||||
boost::dijkstra_shortest_paths
|
||||
(G, vertex(a, G),
|
||||
(G, vertex(a, G),
|
||||
distance_map(make_iterator_property_map(distance.begin(), vertex_id, distance[0])).
|
||||
predecessor_map(make_iterator_property_map(parent.begin(), vertex_id, parent[0])).
|
||||
visitor(make_dijkstra_visitor(copy_graph(G_copy, on_examine_edge()))));
|
||||
@@ -77,7 +77,7 @@ with <tt>std::pair</tt>.
|
||||
This class implements all of the member functions required by <a
|
||||
href="./DijkstraVisitor.html">DijkstraVisitor</a>. In each
|
||||
function the appropriate event is dispatched to the <a
|
||||
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
|
||||
href="./EventVisitor.html">EventVisitor</a> in the EventVisitorList.
|
||||
|
||||
<h3>Non-Member Functions</h3>
|
||||
|
||||
@@ -111,15 +111,15 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -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<VertexProp, EdgeProp, GraphProp>
|
||||
</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<> Graph;
|
||||
Graph g;
|
||||
boost::graph_traits<Graph>::vertex_descriptor v0 = g.add_vertex();
|
||||
boost::graph_traits<Graph>::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> </TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><TT>EdgeProp</TT></TD>
|
||||
<TD>A property map for the graph edges.</TD>
|
||||
<TD> </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 © 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="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,309 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
|
||||
<title>Boost Disjoint Sets</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" link="#0000EE" text="#000000" vlink="#551A8B" alink=
|
||||
"#FF0000">
|
||||
<img src="../../../boost.png" alt="C++ Boost" width="277" height=
|
||||
"86"><br clear="none">
|
||||
|
||||
<h1><a name="sec:disjoint-sets" id="sec:disjoint-sets"></a> Disjoint
|
||||
Sets</h1>
|
||||
<pre>
|
||||
disjoint_sets<Rank, Parent, FindCompress>
|
||||
</pre>
|
||||
|
||||
<p>This is a class that provides disjoint set operations with <i>union by
|
||||
rank</i> and <i>path compression</i>. A disjoint-sets data structure
|
||||
maintains a collection <i>S = {S<sub>1</sub>, S<sub>2</sub>, ...,
|
||||
S<sub>k</sub>}</i> of disjoint sets. Each set is identified by a
|
||||
<i>representative</i> which is some member of of the set. Sets are
|
||||
represented by rooted trees which are encoded in the <tt>Parent</tt>
|
||||
property map. Two heuristics: "union by rank" and "path compression" are
|
||||
used to speed up the operations [<a href=
|
||||
"./disjoint_sets_biblio.html#tarjan83:_data_struct_network_algo">1</a>, <a href=
|
||||
"./disjoint_sets_biblio.html#clr90">2</a>].</p>
|
||||
|
||||
<h3>Where Defined</h3><a href=
|
||||
"../../boost/pending/disjoint_sets.hpp"><tt>boost/pending/disjoint_sets.hpp</tt></a>
|
||||
|
||||
<h3>Template Parameters</h3>
|
||||
|
||||
<table border summary="">
|
||||
<tr>
|
||||
<td><tt>Rank</tt></td>
|
||||
|
||||
<td>must be a model of <a href=
|
||||
"../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a>
|
||||
with an integer value type and a key type equal to the set's element
|
||||
type.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>Parent</tt></td>
|
||||
|
||||
<td>must be a model of <a href=
|
||||
"../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a>
|
||||
and the key and value type the same as the set's element type.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>FindCompress</tt></td>
|
||||
|
||||
<td>should be one of the find representative and path compress function
|
||||
objects.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Example</h3>
|
||||
|
||||
<p>A typical usage pattern for <tt>disjoint_sets</tt> can be seen in the
|
||||
<a href=
|
||||
"../graph/doc/kruskal_min_spanning_tree.html"><tt>kruskal_minimum_spanning_tree()</tt></a>
|
||||
algorithm. In this example, we call <tt>link()</tt> instead of
|
||||
<tt>union_set()</tt> because <tt>u</tt> and <tt>v</tt> were obtained from
|
||||
<tt>find_set()</tt> and therefore are already the representatives for their
|
||||
sets.</p>
|
||||
<pre>
|
||||
...
|
||||
disjoint_sets<Rank, Parent, FindCompress> dsets(rank, p);
|
||||
|
||||
for (ui = vertices(G).first; ui != vertices(G).second; ++ui)
|
||||
dsets.make_set(*ui);
|
||||
...
|
||||
while ( !Q.empty() ) {
|
||||
e = Q.front();
|
||||
Q.pop();
|
||||
u = dsets.find_set(source(e));
|
||||
v = dsets.find_set(target(e));
|
||||
if ( u != v ) {
|
||||
*out++ = e;
|
||||
dsets.link(u, v);
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h3>Members</h3>
|
||||
|
||||
<table border summary="">
|
||||
<tr>
|
||||
<th>Member</th>
|
||||
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>disjoint_sets(Rank r, Parent p)</tt></td>
|
||||
|
||||
<td>Constructor.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>disjoint_sets(const disjoint_sets& x)</tt></td>
|
||||
|
||||
<td>Copy constructor.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>template <class Element><br>
|
||||
void make_set(Element x)</tt></td>
|
||||
|
||||
<td>Creates a singleton set containing Element <tt>x</tt>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>template <class Element><br>
|
||||
void link(Element x, Element y)</tt></td>
|
||||
|
||||
<td>Union the two sets <i>represented</i> by element <tt>x</tt> and
|
||||
<tt>y</tt>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>template <class Element><br>
|
||||
void union_set(Element x, Element y)</tt></td>
|
||||
|
||||
<td>Union the two sets that <i>contain</i> elements <tt>x</tt> and
|
||||
<tt>y</tt>. This is equivalent to
|
||||
<tt>link(find_set(x),find_set(y))</tt>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>template <class Element><br>
|
||||
Element find_set(Element x)</tt></td>
|
||||
|
||||
<td>Return the representative for the set containing element
|
||||
<tt>x</tt>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>template <class ElementIterator><br>
|
||||
std::size_t count_sets(ElementIterator first, ElementIterator
|
||||
last)</tt></td>
|
||||
|
||||
<td>Returns the number of disjoint sets.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>template <class ElementIterator><br>
|
||||
void compress_sets(ElementIterator first, ElementIterator
|
||||
last)</tt></td>
|
||||
|
||||
<td>Flatten the parents tree so that the parent of every element is its
|
||||
representative.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Complexity</h3>
|
||||
|
||||
<p>The time complexity is <i>O(m alpha(m,n))</i>, where <i>alpha</i> is the
|
||||
inverse Ackermann's function, <i>m</i> is the number of disjoint-set
|
||||
operations (<tt>make_set()</tt>, <tt>find_set()</tt>, and <tt>link()</tt>
|
||||
and <i>n</i> is the number of elements. The <i>alpha</i> function grows
|
||||
very slowly, much more slowly than the <i>log</i> function.</p>
|
||||
|
||||
<h3>See Also</h3><a href=
|
||||
"../graph/doc/incremental_components.html"><tt>incremental_connected_components()</tt></a>
|
||||
<hr>
|
||||
<pre>
|
||||
disjoint_sets_with_storage<ID,InverseID,FindCompress>
|
||||
</pre>
|
||||
|
||||
<p>This class manages the storage for the rank and parent properties
|
||||
internally. The storage is in arrays, which are indexed by element ID,
|
||||
hence the requirement for the <tt>ID</tt> and <tt>InverseID</tt> functors.
|
||||
The rank and parent properties are initialized during construction so the
|
||||
each element is in a set by itself (so it is not necessary to initialize
|
||||
objects of this class with the <a href=
|
||||
"../graph/doc/incremental_components.html#sec:initialize-incremental-components">
|
||||
<tt>initialize_incremental_components()</tt></a> function). This class is
|
||||
especially useful when computing the (dynamic) connected components of an
|
||||
<tt>edge_list</tt> graph which does not provide a place to store vertex
|
||||
properties.</p>
|
||||
|
||||
<h3>Template Parameters</h3>
|
||||
|
||||
<table border summary="">
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
|
||||
<th>Description</th>
|
||||
|
||||
<th>Default</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>ID</tt></td>
|
||||
|
||||
<td>must be a model of <a href=
|
||||
"../property_map/doc/ReadablePropertyMap.html">ReadablePropertyMap</a> that
|
||||
maps elements to integers between zero 0 and N, the total number of
|
||||
elements in the sets.</td>
|
||||
|
||||
<td><tt>boost::identity_property_map</tt></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>InverseID</tt></td>
|
||||
|
||||
<td>must be a model of <a href=
|
||||
"../property_map/doc/ReadablePropertyMap.html">ReadablePropertyMap</a> that
|
||||
maps integers to elements.</td>
|
||||
|
||||
<td><tt>boost::identity_property_map</tt></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>FindCompress</tt></td>
|
||||
|
||||
<td>should be one of the find representative and path compress function
|
||||
objects.</td>
|
||||
|
||||
<td><tt>representative_with_full_path_compression</tt></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Members</h3>
|
||||
|
||||
<p>This class has all of the members in <tt>disjoint_sets</tt> as well as
|
||||
the following members.</p>
|
||||
<pre>
|
||||
disjoint_sets_with_storage(size_type n = 0,
|
||||
ID id = ID(),
|
||||
InverseID inv = InverseID())
|
||||
</pre>Constructor.
|
||||
<pre>
|
||||
template <class ElementIterator>
|
||||
void disjoint_sets_with_storage::
|
||||
normalize_sets(ElementIterator first, ElementIterator last)
|
||||
</pre>This rearranges the representatives such that the representative of
|
||||
each set is the element with the smallest ID.<br>
|
||||
Postcondition: <tt>v >= parent[v]</tt><br>
|
||||
Precondition: the disjoint sets structure must be compressed.<br>
|
||||
<hr>
|
||||
|
||||
<h2><a name="sec:representative-with-path-halving" id=
|
||||
"sec:representative-with-path-halving"></a></h2>
|
||||
<pre>
|
||||
representative_with_path_halving<Parent>
|
||||
</pre>
|
||||
|
||||
<p>This is a functor which finds the representative vertex for the same
|
||||
component as the element <tt>x</tt>. While traversing up the representative
|
||||
tree, the functor also applies the path halving technique to shorten the
|
||||
height of the tree.</p>
|
||||
<pre>
|
||||
Element operator()(Parent p, Element x)
|
||||
</pre>
|
||||
<hr>
|
||||
|
||||
<h2><a name="sec:representative-with-full-path-compression" id=
|
||||
"sec:representative-with-full-path-compression"></a><br></h2>
|
||||
<pre>
|
||||
representative_with_full_path_compression<Parent>
|
||||
</pre>
|
||||
|
||||
<p>This is a functor which finds the representative element for the set
|
||||
that element <tt>x</tt> belongs to.</p>
|
||||
<pre>
|
||||
Element operator()(Parent p, Element x)
|
||||
</pre>
|
||||
|
||||
<p><br></p>
|
||||
<hr>
|
||||
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
||||
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
|
||||
height="31" width="88"></a></p>
|
||||
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->01
|
||||
December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38508" --></p>
|
||||
|
||||
<table summary="">
|
||||
<tr valign="top">
|
||||
<td nowrap><i>Copyright © 2000</i></td>
|
||||
|
||||
<td><i><a href="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</a>, Univ.of
|
||||
Notre Dame (<a href="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</a>)<br>
|
||||
<a href="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</a>,
|
||||
Univ.of Notre Dame (<a href=
|
||||
"mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</a>)<br>
|
||||
<a href="http://www.lsc.nd.edu/~lums">Andrew Lumsdaine</a>, Univ.of
|
||||
Notre Dame (<a href=
|
||||
"mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</a>)</i></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p><i>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
|
||||
<title>Boost Utility Library: Bibliography</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" link="#0000EE" text="#000000" vlink="#551A8B" alink=
|
||||
"#FF0000">
|
||||
<img src="../../../boost.png" alt="C++ Boost" width="277" height=
|
||||
"86"><br clear="none">
|
||||
|
||||
<h2>Bibliography</h2>
|
||||
|
||||
<dl compact>
|
||||
<dt><a name="tarjan83:_data_struct_network_algo" id=
|
||||
"tarjan83:_data_struct_network_algo">1</a></dt>
|
||||
|
||||
<dd>R. E. Tarjan.<br>
|
||||
<em>Data Structures and Network Algorithms</em>.<br>
|
||||
Society for Industrial and Applied Mathematics, 1983.</dd>
|
||||
|
||||
<dt> </dt>
|
||||
|
||||
<dt><a name="clr90" id="clr90">2</a></dt>
|
||||
|
||||
<dd>T. Cormen, C. Leiserson, and R. Rivest.<br>
|
||||
<em>Introduction to Algorithms</em>.<br>
|
||||
McGraw-Hill, 1990.</dd>
|
||||
</dl><br>
|
||||
<hr>
|
||||
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
||||
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
|
||||
height="31" width="88"></a></p>
|
||||
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->01
|
||||
December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38508" --></p>
|
||||
|
||||
<table summary="">
|
||||
<tr valign="top">
|
||||
<td nowrap><i>Copyright © 2000</i></td>
|
||||
|
||||
<td><i><a href="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</a>, Univ.of
|
||||
Notre Dame (<a href=
|
||||
"mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</a>)</i></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p><i>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
|
||||
</body>
|
||||
</html>
|
||||
+16
-16
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: distance_recorder</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -27,7 +27,7 @@ href="property_map.html">property map</a>) from some
|
||||
source vertex during a graph search. When applied to edge <i>e =
|
||||
(u,v)</i>, the distance of <i>v</i> is recorded to be one more than
|
||||
the distance of <i>u</i>. The distance recorder is typically used with
|
||||
the <tt>on_tree_edge</tt> or <tt>on_relax_edge</tt> events, and
|
||||
the <tt>on_tree_edge</tt> or <tt>on_relax_edge</tt> events and
|
||||
cannot be used with vertex events.
|
||||
|
||||
<p>
|
||||
@@ -64,7 +64,7 @@ See the example for <a href="./bfs_visitor.html"><tt>bfs_visitor</tt></a>.
|
||||
<TR><TD><TT>DistanceMap</TT></TD>
|
||||
<TD>
|
||||
A <a
|
||||
href="../../property_map/WritablePropertyMap.html">WritablePropertyMap</a>,
|
||||
href="../../property_map/doc/WritablePropertyMap.html">WritablePropertyMap</a>
|
||||
where the key type and the value type are the vertex descriptor type
|
||||
of the graph.
|
||||
</TD>
|
||||
@@ -124,7 +124,7 @@ template <class Edge, class Graph><br>
|
||||
void operator()(Edge e, const Graph& g);
|
||||
</tt></td>
|
||||
<td>
|
||||
Given edge <i>e = (u,v)</i>, this records the distance of <i>v</i> as
|
||||
Given edge <i>e = (u,v)</i>, this records the distance of <i>v</i> as
|
||||
one plus the distance of <i>u</i>.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -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>.
|
||||
|
||||
@@ -162,18 +162,18 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
<!-- LocalWords: DistanceMap EventTag EventVisitor map bfs dfs const Siek
|
||||
-->
|
||||
<!-- LocalWords: EventVisitorList WritablePropertyMap Univ Quan
|
||||
|
||||
@@ -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 <class Graph, class ColorMap>
|
||||
typename boost::property_traits<ColorMap>::value_type
|
||||
edge_coloring(const Graph &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.
|
||||
|
||||
<!-- Misra, J., & Gries, D. (1992). A constructive proof of Vizing's theorem. In Information Processing Letters. -->
|
||||
|
||||
<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& 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/edge_coloring.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 © 2013</TD><TD>
|
||||
Maciej Piechotka (<A HREF="mailto:uzytkownik2@gmail.com">uzytkownik2@gmail.com</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
+18
-18
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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 List Class</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -52,7 +52,7 @@ Applying the Bellman-Ford shortest paths algorithm to an
|
||||
E(x,y), E(x,v),
|
||||
E(y,v), E(y,z),
|
||||
E(z,u), E(z,x) };
|
||||
|
||||
|
||||
int weight[] = { -4, 8, 5,
|
||||
-2,
|
||||
9, -3,
|
||||
@@ -61,16 +61,16 @@ Applying the Bellman-Ford shortest paths algorithm to an
|
||||
|
||||
typedef boost::edge_list<E*> Graph;
|
||||
Graph g(edges, edges + sizeof(edges) / sizeof(E));
|
||||
|
||||
|
||||
std::vector<int> distance(N, std::numeric_limits<short>::max());
|
||||
std::vector<int> parent(N,-1);
|
||||
|
||||
|
||||
distance[z] = 0;
|
||||
parent[z] = z;
|
||||
bool r = boost::bellman_ford_shortest_paths(g, int(N), weight,
|
||||
distance.begin(),
|
||||
parent.begin());
|
||||
if (r)
|
||||
if (r)
|
||||
for (int i = 0; i < N; ++i)
|
||||
std::cout << name[i] << ": " << distance[i]
|
||||
<< " " << name[parent[i]] << std::endl;
|
||||
@@ -104,7 +104,7 @@ of each vertex in the shortest paths tree.
|
||||
</tr>
|
||||
|
||||
<TR><TD><TT>EdgeIterator</TT></TD> <TD>Must be model of <a
|
||||
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
|
||||
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
|
||||
who's <TT>value_type</TT> must be a pair of vertex descriptors.</TD>
|
||||
</TR>
|
||||
|
||||
@@ -145,7 +145,7 @@ boost::graph_traits<edge_list>::edge_descriptor
|
||||
</tt>
|
||||
<br><br>
|
||||
The type for the edge descriptors associated with the
|
||||
<TT>edge_list</TT>.
|
||||
<TT>edge_list</TT>.
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -207,15 +207,15 @@ Returns the target vertex of edge <TT>e</TT>.
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<TD nowrap>Copyright © 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>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<A
|
||||
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -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<PredEdgeMap, EventTag>
|
||||
</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> </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> </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 <class Edge, class Graph><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 <class PredEdgeMap, class Tag><br>
|
||||
edge_predecessor_recorder<PredEdgeMap, Tag> <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 © 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="https://homes.cs.washington.edu/~al75">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,54 +1,54 @@
|
||||
<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)
|
||||
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)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Edmunds-Karp Maximum Flow</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<Title>Boost Graph Library: Edmonds-Karp Maximum 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:edmunds_karp_max_flow">
|
||||
<TT>edmunds_karp_max_flow</TT>
|
||||
<H1><A NAME="sec:edmonds_karp_max_flow">
|
||||
<TT>edmonds_karp_max_flow</TT>
|
||||
</H1>
|
||||
|
||||
<PRE>
|
||||
<i>// named paramter version</i>
|
||||
<i>// named parameter version</i>
|
||||
template <class <a href="./Graph.html">Graph</a>, class P, class T, class R>
|
||||
typename detail::edge_capacity_value<Graph, P, T, R>::value_type
|
||||
edmunds_karp_max_flow(Graph& g,
|
||||
edmonds_karp_max_flow(Graph& g,
|
||||
typename graph_traits<Graph>::vertex_descriptor src,
|
||||
typename graph_traits<Graph>::vertex_descriptor sink,
|
||||
const bgl_named_params<P, T, R>& params = <i>all defaults</i>)
|
||||
|
||||
<i>// non-named parameter version</i>
|
||||
template <class <a href="./Graph.html">Graph</a>,
|
||||
template <class <a href="./Graph.html">Graph</a>,
|
||||
class CapacityEdgeMap, class ResidualCapacityEdgeMap,
|
||||
class ReverseEdgeMap, class ColorMap, class PredEdgeMap>
|
||||
typename property_traits<CapacityEdgeMap>::value_type
|
||||
edmunds_karp_max_flow(Graph& g,
|
||||
edmonds_karp_max_flow(Graph& g,
|
||||
typename graph_traits<Graph>::vertex_descriptor src,
|
||||
typename graph_traits<Graph>::vertex_descriptor sink,
|
||||
CapacityEdgeMap cap, ResidualCapacityEdgeMap res, ReverseEdgeMap rev,
|
||||
CapacityEdgeMap cap, ResidualCapacityEdgeMap res, ReverseEdgeMap rev,
|
||||
ColorMap color, PredEdgeMap pred)
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The <tt>edmunds_karp_max_flow()</tt> function calculates the maximum flow
|
||||
The <tt>edmonds_karp_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>.
|
||||
<i>r(u,v) = c(u,v) - f(u,v)</i>.
|
||||
|
||||
<p>
|
||||
There are several special requirements on the input graph and property
|
||||
@@ -76,7 +76,7 @@ the maximum flow problem. However, there are several reasons why this
|
||||
algorithm is not as good as the <a
|
||||
href="./push_relabel_max_flow.html"><tt>push_relabel_max_flow()</tt></a>
|
||||
or the <a
|
||||
href="./kolmogorov_max_flow.html"><tt>kolmogorov_max_flow()</tt></a>
|
||||
href="./boykov_kolmogorov_max_flow.html"><tt>boykov_kolmogorov_max_flow()</tt></a>
|
||||
algorithm.
|
||||
|
||||
<ul>
|
||||
@@ -93,7 +93,7 @@ algorithm.
|
||||
<H3>Where Defined</H3>
|
||||
|
||||
<P>
|
||||
<a href="../../../boost/graph/edmunds_karp_max_flow.hpp"><TT>boost/graph/edmunds_karp_max_flow.hpp</TT></a>
|
||||
<a href="../../../boost/graph/edmonds_karp_max_flow.hpp"><TT>boost/graph/edmonds_karp_max_flow.hpp</TT></a>
|
||||
|
||||
<P>
|
||||
|
||||
@@ -112,12 +112,12 @@ IN: <tt>vertex_descriptor src</tt>
|
||||
<blockquote>
|
||||
The source vertex for the flow network graph.
|
||||
</blockquote>
|
||||
|
||||
|
||||
IN: <tt>vertex_descriptor sink</tt>
|
||||
<blockquote>
|
||||
The sink vertex for the flow network graph.
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3>Named Parameters</h3>
|
||||
|
||||
|
||||
@@ -125,16 +125,16 @@ 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/LvaluePropertyMap.html">Lvalue Property Map</a>. The
|
||||
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>
|
||||
|
||||
|
||||
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/LvaluePropertyMap.html">Lvalue Property
|
||||
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>
|
||||
@@ -144,7 +144,7 @@ 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/LvaluePropertyMap.html">Lvalue
|
||||
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>
|
||||
@@ -156,13 +156,13 @@ UTIL: <tt>color_map(ColorMap color)</tt>
|
||||
breadth-first search stage. At the end of the algorithm, the white
|
||||
vertices define the minimum cut set. The map must be a model of
|
||||
mutable <a
|
||||
href="../../property_map/LvaluePropertyMap.html">Lvalue Property Map</a>.
|
||||
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a>.
|
||||
The key type of the map should be the graph's vertex descriptor type, and
|
||||
the value type must be a model of <a
|
||||
href="./ColorValue.html">ColorValue</a>.<br>
|
||||
|
||||
<b>Default:</b> an <a
|
||||
href="../../property_map/iterator_property_map.html">
|
||||
href="../../property_map/doc/iterator_property_map.html">
|
||||
<tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
|
||||
of <tt>default_color_type</tt> of size <tt>num_vertices(g)</tt> and
|
||||
using the <tt>i_map</tt> for the index map.
|
||||
@@ -172,12 +172,12 @@ 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/LvaluePropertyMap.html">Lvalue Property Map</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/iterator_property_map.html">
|
||||
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.
|
||||
@@ -189,13 +189,13 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<tt>[0, num_vertices(g))</tt>. This property map is only needed
|
||||
if the default for the color or predecessor map is used.
|
||||
The vertex index map must be a model of <a
|
||||
href="../../property_map/ReadablePropertyMap.html">Readable Property
|
||||
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>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>
|
||||
|
||||
@@ -209,7 +209,7 @@ some constant <i>U</i>.
|
||||
<h3>Example</h3>
|
||||
|
||||
The program in <a
|
||||
href="../example/edmunds-karp-eg.cpp"><tt>example/edmunds-karp-eg.cpp</tt></a>
|
||||
href="../example/edmonds-karp-eg.cpp"><tt>example/edmonds-karp-eg.cpp</tt></a>
|
||||
reads an example maximum flow problem (a graph with edge capacities)
|
||||
from a file in the DIMACS format and computes the maximum flow.
|
||||
|
||||
@@ -217,21 +217,21 @@ from a file in the DIMACS format and computes the maximum flow.
|
||||
<h3>See Also</h3>
|
||||
|
||||
<a href="./push_relabel_max_flow.html"><tt>push_relabel_max_flow()</tt></a><br>
|
||||
<a href="./kolmogorov_max_flow.html"><tt>kolmogorov_max_flow()</tt></a>.
|
||||
<a href="./boykov_kolmogorov_max_flow.html"><tt>boykov_kolmogorov_max_flow()</tt></a>.
|
||||
|
||||
<br>
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 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>)
|
||||
<TD nowrap>Copyright © 2000-2001</TD><TD>
|
||||
<A HREF="http://www.boost.org/users/people/jeremy_siek.html">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
<!-- LocalWords: HTML Siek Edmunds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
|
||||
</HTML>
|
||||
<!-- LocalWords: HTML Siek Edmonds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
|
||||
-->
|
||||
<!-- LocalWords: gif ALT BR sec edmunds karp TT DIV CELLPADDING TR TD PRE lt
|
||||
<!-- LocalWords: gif ALT BR sec edmonds karp TT DIV CELLPADDING TR TD PRE lt
|
||||
-->
|
||||
<!-- LocalWords: typename VertexListGraph CapacityEdgeMap ReverseEdgeMap gt
|
||||
-->
|
||||
+79
-61
@@ -20,7 +20,7 @@
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <boost/graph/isomorphism.hpp>
|
||||
//#include "isomorphism-v3.hpp"
|
||||
#include <boost/property_map.hpp>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
@@ -30,77 +30,95 @@
|
||||
|
||||
using namespace boost;
|
||||
|
||||
|
||||
enum { a, b, c, d, e, f, g, h };
|
||||
enum { _1, _2, _3, _4, _5, _6, _7, _8 };
|
||||
|
||||
void test_isomorphism()
|
||||
enum
|
||||
{
|
||||
typedef adjacency_list<vecS, vecS, bidirectionalS> GraphA;
|
||||
typedef adjacency_list<vecS, vecS, bidirectionalS> GraphB;
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
d,
|
||||
e,
|
||||
f,
|
||||
g,
|
||||
h
|
||||
};
|
||||
enum
|
||||
{
|
||||
_1,
|
||||
_2,
|
||||
_3,
|
||||
_4,
|
||||
_5,
|
||||
_6,
|
||||
_7,
|
||||
_8
|
||||
};
|
||||
|
||||
char a_names[] = "abcdefgh";
|
||||
char b_names[] = "12345678";
|
||||
void test_isomorphism()
|
||||
{
|
||||
typedef adjacency_list< vecS, vecS, bidirectionalS > GraphA;
|
||||
typedef adjacency_list< vecS, vecS, bidirectionalS > GraphB;
|
||||
|
||||
GraphA Ga(8);
|
||||
add_edge(a, d, Ga);
|
||||
add_edge(a, h, Ga);
|
||||
add_edge(b, c, Ga);
|
||||
add_edge(b, e, Ga);
|
||||
add_edge(c, f, Ga);
|
||||
add_edge(d, a, Ga);
|
||||
add_edge(d, h, Ga);
|
||||
add_edge(e, b, Ga);
|
||||
add_edge(f, b, Ga);
|
||||
add_edge(f, e, Ga);
|
||||
add_edge(g, d, Ga);
|
||||
add_edge(g, f, Ga);
|
||||
add_edge(h, c, Ga);
|
||||
add_edge(h, g, Ga);
|
||||
char a_names[] = "abcdefgh";
|
||||
char b_names[] = "12345678";
|
||||
|
||||
GraphB Gb(8);
|
||||
add_edge(_1, _6, Gb);
|
||||
add_edge(_2, _1, Gb);
|
||||
add_edge(_2, _5, Gb);
|
||||
add_edge(_3, _2, Gb);
|
||||
add_edge(_3, _4, Gb);
|
||||
add_edge(_4, _2, Gb);
|
||||
add_edge(_4, _3, Gb);
|
||||
add_edge(_5, _4, Gb);
|
||||
add_edge(_5, _6, Gb);
|
||||
add_edge(_6, _7, Gb);
|
||||
add_edge(_6, _8, Gb);
|
||||
add_edge(_7, _8, Gb);
|
||||
add_edge(_8, _1, Gb);
|
||||
add_edge(_8, _7, Gb);
|
||||
|
||||
GraphA Ga(8);
|
||||
add_edge(a, d, Ga);
|
||||
add_edge(a, h, Ga);
|
||||
add_edge(b, c, Ga);
|
||||
add_edge(b, e, Ga);
|
||||
add_edge(c, f, Ga);
|
||||
add_edge(d, a, Ga);
|
||||
add_edge(d, h, Ga);
|
||||
add_edge(e, b, Ga);
|
||||
add_edge(f, b, Ga);
|
||||
add_edge(f, e, Ga);
|
||||
add_edge(g, d, Ga);
|
||||
add_edge(g, f, Ga);
|
||||
add_edge(h, c, Ga);
|
||||
add_edge(h, g, Ga);
|
||||
|
||||
std::vector<std::size_t> in_degree_A(num_vertices(Ga));
|
||||
boost::detail::compute_in_degree(Ga, &in_degree_A[0]);
|
||||
GraphB Gb(8);
|
||||
add_edge(_1, _6, Gb);
|
||||
add_edge(_2, _1, Gb);
|
||||
add_edge(_2, _5, Gb);
|
||||
add_edge(_3, _2, Gb);
|
||||
add_edge(_3, _4, Gb);
|
||||
add_edge(_4, _2, Gb);
|
||||
add_edge(_4, _3, Gb);
|
||||
add_edge(_5, _4, Gb);
|
||||
add_edge(_5, _6, Gb);
|
||||
add_edge(_6, _7, Gb);
|
||||
add_edge(_6, _8, Gb);
|
||||
add_edge(_7, _8, Gb);
|
||||
add_edge(_8, _1, Gb);
|
||||
add_edge(_8, _7, Gb);
|
||||
|
||||
std::vector<std::size_t> in_degree_B(num_vertices(Gb));
|
||||
boost::detail::compute_in_degree(Gb, &in_degree_B[0]);
|
||||
std::vector< std::size_t > in_degree_A(num_vertices(Ga));
|
||||
boost::detail::compute_in_degree(Ga, &in_degree_A[0]);
|
||||
|
||||
degree_vertex_invariant<std::size_t*, GraphA>
|
||||
invariantA(&in_degree_A[0], Ga);
|
||||
degree_vertex_invariant<std::size_t*, GraphB>
|
||||
invariantB(&in_degree_B[0], Gb);
|
||||
std::vector< std::size_t > in_degree_B(num_vertices(Gb));
|
||||
boost::detail::compute_in_degree(Gb, &in_degree_B[0]);
|
||||
|
||||
std::vector<graph_traits<GraphB>::vertex_descriptor> f(num_vertices(Ga));
|
||||
degree_vertex_invariant< std::size_t*, GraphA > invariantA(
|
||||
&in_degree_A[0], Ga);
|
||||
degree_vertex_invariant< std::size_t*, GraphB > invariantB(
|
||||
&in_degree_B[0], Gb);
|
||||
|
||||
bool ret = isomorphism(Ga, Gb, &f[0], invariantA, invariantB,
|
||||
(invariantB.max)(),
|
||||
get(vertex_index, Ga), get(vertex_index, Gb));
|
||||
assert(ret == true);
|
||||
std::vector< graph_traits< GraphB >::vertex_descriptor > f(
|
||||
num_vertices(Ga));
|
||||
|
||||
for (std::size_t i = 0; i < num_vertices(Ga); ++i)
|
||||
std::cout << "f(" << a_names[i] << ")=" << b_names[f[i]] << std::endl;
|
||||
|
||||
BOOST_TEST(verify_isomorphism(Ga, Gb, &f[0]));
|
||||
bool ret = isomorphism(Ga, Gb, &f[0], invariantA, invariantB,
|
||||
(invariantB.max)(), get(vertex_index, Ga), get(vertex_index, Gb));
|
||||
assert(ret == true);
|
||||
|
||||
for (std::size_t i = 0; i < num_vertices(Ga); ++i)
|
||||
std::cout << "f(" << a_names[i] << ")=" << b_names[f[i]] << std::endl;
|
||||
|
||||
BOOST_TEST(verify_isomorphism(Ga, Gb, &f[0]));
|
||||
}
|
||||
|
||||
int test_main(int, char* [])
|
||||
int test_main(int, char*[])
|
||||
{
|
||||
test_isomorphism();
|
||||
return boost::report_errors();
|
||||
test_isomorphism();
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) 2004, 2005 The Trustees of Indiana University
|
||||
--
|
||||
-- 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: Douglas Gregor
|
||||
-- Jeremiah Willcock
|
||||
-- Andrew Lumsdaine
|
||||
Copyright (c) 2004, 2005 The Trustees of Indiana University
|
||||
|
||||
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: Douglas Gregor
|
||||
Jeremiah Willcock
|
||||
Andrew Lumsdaine
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Erdös-Renyi Generator</Title>
|
||||
@@ -24,10 +24,10 @@ function address(host, user) {
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<tt>erdos_renyi_iterator</tt>
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
erdos_renyi_iterator operator++(int);
|
||||
bool operator==(const erdos_renyi_iterator& other) const;
|
||||
bool operator!=(const erdos_renyi_iterator& other) const;
|
||||
};
|
||||
};
|
||||
</PRE>
|
||||
|
||||
<p> This class template implements a generator for Erdös-Renyi
|
||||
@@ -142,11 +142,11 @@ int main()
|
||||
<HR>
|
||||
<TABLE>
|
||||
<TR valign=top>
|
||||
<TD nowrap>Copyright © 2005</TD><TD>
|
||||
<TD nowrap>Copyright © 2005</TD><TD>
|
||||
<A HREF="http://www.boost.org/people/doug_gregor.html">Doug Gregor</A>, Indiana University (<script language="Javascript">address("cs.indiana.edu", "dgregor")</script>)<br>
|
||||
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
|
||||
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
|
||||
Indiana University (<script language="Javascript">address("osl.iu.edu", "lums")</script>)
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
+9
-9
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
-- Copyright (c) Jeremy Siek 2002
|
||||
--
|
||||
-- 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)
|
||||
Copyright (c) Jeremy Siek 2002
|
||||
|
||||
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: Exceptions</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
|
||||
+15
-15
@@ -1,17 +1,17 @@
|
||||
<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)
|
||||
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: FAQ</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -76,8 +76,8 @@ convenient. Granted, this is not a huge difference, but since there
|
||||
weren't other strong reasons, it was enough for us to choose free
|
||||
functions.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
<p>
|
||||
Our religious reason for choosing free functions is to send the message
|
||||
that BGL is a generic library, and not a traditional object-oriented
|
||||
library. OO was hip in the 80s and 90s, but its time we moved beyond!
|
||||
@@ -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<graph_t>::vertex_iterator vi, vend;
|
||||
graph_traits<graph_t>::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,13 +124,13 @@ 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 & ==
|
||||
boost::detail::error_property_not_found &'
|
||||
</pre>
|
||||
or a message such as:
|
||||
<pre>
|
||||
../../..\boost/graph/depth_first_search.hpp(78) : error C2664: 'white'
|
||||
: cannot convert parameter 1 from
|
||||
: cannot convert parameter 1 from
|
||||
'struct boost::detail::error_property_not_found'
|
||||
to 'enum boost::default_color_type'
|
||||
</pre>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user