Home > Store

Boost Graph Library, The: User Guide and Reference Manual

Register your product to gain access to bonus material or receive a coupon.

Boost Graph Library, The: User Guide and Reference Manual

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2002
  • Dimensions: 7-3/8" x 9-1/4"
  • Pages: 352
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-72914-8
  • ISBN-13: 978-0-201-72914-6

The Boost Graphic Library (BGL) gives experienced C++ developers high quality implementations of a wide range of graph data structures and algorithms -- helping them save time that would otherwise have been spent on developing and debugging. Now, the BGL's creators offer a complete tutorial and reference designed to help developers get results with the BGL quickly. They also offer practical, hard-to-find guidance on generic programming that can help developers build their own software development libraries. For practicing programmers, the book introduces high quality implementations of graph data structures and algorithms that deliver outstanding efficiency and performance, and presents the BGL's flexible interface, which enables programmers to apply graph algorithms in settings where a graph may exist only implicitly. For all intermediate-to-advanced C++ programmers.

Downloads

CD Contents

Untitled Document Download the CD Contents related to this title.

Sample Content

Online Sample Chapter

A Boost Graph Library Tutorial

Downloadable Sample Chapter

Click below for Sample Chapter related to this title:
siekch03.pdf

Sample Pages

Download the sample pages (includes Chapter 3 and Index)

Table of Contents



Foreword.


Preface.


I User Guide.


1. Introduction.

Some Graph Terminology.

Graph Concepts.

Vertex and Edge Descriptors.

Property Maps.

Graph Traversa.

Graph Construction and Modification

Algorithm Visitors.

Graph Classes and Adaptors.

Graph Classes.

Graph Adaptors.

Generic Graph Algorithms.

The Topological Sort Generic Algorithm.

The Depth-First Search Generic Algorithm.



2.Generic Programming in C++.

Introduction.

Polymorphism in Object-Oriented Programming.

Polymorphism in Generic Programming.

Comparison of GP and OOP.

Generic Programming and the STL.

Concepts and Models.

Sets of Requirements.

Example: InputIterator.

Associated Types and Traits Classes.

Associated Types Needed in Function Template.

Typedefs Nested in Classes.

Definition of a Traits Class.

Partial Specialization.

Tag Dispatching.

Concept Checking.

Concept-Checking Classes.

Concept Archetypes.

The Boost Namespace.

Classes.

Koenig Lookup.

Named Function Parameters.



3. A BGL Tutorial.

File Dependencies.

Graph Setup.

Compilation Order.

Topological Sort via DFS.

Marking Vertices Using External Properties.

Accessing Adjacent Vertices.

Traversing All the Vertices.

Cyclic Dependencies.

Toward a Generic DFS: Visitors.

Graph Setup: Internal Properties.

Compilation Time.

A Generic Topological Sort and DFS.

Parallel Compilation Time.

Summary.



4. Basic Graph Algorithms.

Breadth-First Search.

Definitions.

Six Degrees of Kevin Bacon.

Depth-First Search.

Definitions.

Finding Loops in Program-Control-Flow Graphs.



5. Shortest-Paths Problems.

Definitions.

Internet Routing.

Bellman-Ford and Distance Vector Routing.

Dijkstra and Link-State Routing.



6. Minimum-Spanning-Tree Problem.

Definitions.

Telephone Network Planning.

Kruskal's Algorithm.

Prim's Algorithm.



7. Connected Components.

Definitions.

Connected Components and Internet Connectivity.

Strongly Connected Components and Web Page Links.



8. Maximum Flow.

Definitions.

Edge Connectivity.



9. Implicit Graphs: A Knight's Tour.

Knight's Jumps as a Graph.

Backtracking Graph Search.

Warnsdorff's Heuristic.



10. Interfacing with Other Graph Libraries.

Using BGL Topological Sort with a LEDA Graph.

Using BGL Topological Sort with a SGB Graph.

Implementing Graph Adaptors.



11. Performance Guidelines.

Graph Class Comparisons.

The Results and Discussion.

Conclusion.

II Reference Manual.



12. BGL Concepts.

Graph Traversal Concepts.

Undirected Graphs.

Graph.

IncidenceGraph.

BidirectionalGraph.

AdjacencyGraph.

VertexListGraph.

EdgeListGraph.

AdjacencyMatrix.

Graph Modification Concepts.

VertexMutableGraph.

EdgeMutableGraph.

MutableIncidenceGraph.

MutableBidirectionalGraph.

MutableEdgeListGraph.

PropertyGraph.

VertexMutablePropertyGraph.

EdgeMutablePropertyGraph.

Visitor Concepts.

BFSVisitor.

DFSVisitor.

DijkstraVisitor.

BellmanFordVisitor.



13. BGL Algorithms.

Overview.

Basic Algorithms.

breadth_first_search.

breadth_first_visit.

depth_first_search.

depth_first_visit.

topological_sort.

Shortest-Path Algorithms.

dijkstra_shortest_paths.

bellman_ford_shortest_paths.

johnson_all_pairs_shortest_paths.

Minimum-Spanning-Tree Algorithms.

kruskal_minimum_spanning_tree.

prim_minimum_spanning_tree.

Static Connected Components.

connected_components.

strong_components.

Incremental Connected Components.

initialize_incremental_components.

incremental_components.

same_component.

component_index.

Maximum-Flow Algorithms.

edmunds_karp_max_flow.

push_relabel_max_flow.



14. BGL Classes.

Graph Classes.

adjacency_list.

adjacency_matrix.

Auxiliary Classes.

graph_traits.

adjacency_list_traits.

adjacency_matrix_traits.

property_map.

property.

Graph Adaptors.

edge_list.

reverse_graph.

filtered_graph.

SGB GraphPointer.

LEDA GRAPH<V,E>.

std::vector<EdgeList>.



15. Property Map Library.

Property Map Concepts.

ReadablePropertyMap.

WritablePropertyMap.

ReadWritePropertyMap.

LvaluePropertyMap.

Property Map Classes.

property_traits.

iterator_property_map.

Property Tags.

Creating Your Own Property Maps.

Property Maps for Stanford GraphBase.

A Property Map Implemented with std::map.



16 Auxiliary Concepts, Classes, and Functions.

Buffer.

ColorValue.

MultiPassInputIterator.

Monoid.

mutable queue.

Disjoint Sets.

disjoint_sets.

find_with_path_halving.

find_with_full_path_compression.

tie.

graph_property_iter_range.



Bibliography.


Index. 0201729148T12172001

Preface

The graph abstraction is a powerful problem-solving tool used to describe relationships between discrete objects. Many practical problems can be modeled in their essential form by graphs. Such problems appear in many domains: Internet packet routing, telephone network design, software build systems, Web search engines, molecular biology, automated road-trip planning, scientific computing, and so on. The power of the graph abstraction arises from the fact that the solution to a graph-theoretic problem can be used to solve problems in a wide variety of domains. For example, the problem of solving a maze and the problem of finding groups of Web pages that are mutually reachable can both be solved using depth-first search, an important concept from graph theory. By concentrating on the essence of these problems—the graph model describing discrete objects and the relationships between them—graph theoreticians have created solutions to not just a handful of particular problems, but to entire families of problems.

Now a question arises. If graph theory is generally and broadly applicable to arbitrary problem domains, should not the software that implements graph algorithms be just as broadly applicable? Graph theory would seem to be an ideal area for software reuse. However, up until now the potential for reuse has been far from realized. Graph problems do not typically occur in a pure graph-theoretic form, but rather are embedded in larger domain-specific problems. As a result, the data to be modeled as a graph are often not explicitly represented as a graph but are instead encoded in some application-specific data structure. Even in the case where the application data are explicitly represented as a graph, the particular graph representation chosen by the programmer might not match the representation expected by a library that the programmer wants to use. Moreover, different applications may place different time and space requirements on the graph data structure.

This implies a serious problem for the graph library writer who wants to provide reusable software, for it is impossible to anticipate every possible data structure that might be needed and to write a different version of the graph algorithm specifically for each one. The current state of affairs is that graph algorithms are written in terms of whatever data structure is most convenient for the algorithm and users must convert their data structures to that format in order to use the algorithm. This is an inefficient undertaking, consuming programmer time and computational resources. Often, the cost is perceived not to be worthwhile, and the programmer instead chooses to rewrite the algorithm in terms of his or her own data structure. This approach is also time consuming and error prone, and will tend to lead to sub-optimal solutions since the application programmer may not be a graph algorithms expert.

Generic Programming

The Standard Template Library (STL) was introduced in 1994 and was adopted shortly thereafter into the C++ Standard. The STL was a library of interchangeable components for solving many fundamental problems on sequences of elements. What set the STL apart from libraries that came before it was that each STL algorithm could work with a wide variety of sequential datastructures: linked-lists, arrays, sets, and so on. The iterator abstraction provided an interface between containers and algorithms and the C++ template mechanism provided the needed flexibility to allow implementation without loss of efficiency. Each algorithm in the STL is a function template parameterized by the types of iterators upon which it operates. Any iterator that satisfies a minimal set of requirements can be used regardless of the data structure traversed by the iterator. The systematic approach used in the STL to construct abstractions and interchangeable components is called generic programming.

Generic programming lends itself well to solving the reusability problem for graph libraries. With generic programming, graph algorithms can be made much more flexible, allowing them to be easily used in a wide variety applications. Each graph algorithm is written not in terms of a specific data structure, but instead to a graph abstraction that can be easily implemented by many different data structures. Writing generic graph algorithms has the additional advantage of being more natural; the abstraction inherent in the pseudo-code description of an algorithm is retained in the generic function. The Boost Graph Library (BGL) is the first C++ graph library to apply the notions of generic programming to the construction of graph algorithms.

Some BGL History

The Boost Graph Library began its life as the Generic Graph Component Library (GGCL), a software project at the Lab for Scientific Computing (LSC). The LSC, under the direction of Professor Andrew Lumsdaine, was an interdisciplinary laboratory dedicated to research in algorithms, software, tools, and run-time systems for high-performance computational science and engineering.2Special emphasis was put on developing industrial-strength, high performance software using modern programming languages and techniques—most notably, generic programming.

Soon after the Standard Template Library was released, work began at the LSC to apply generic programming to scientific computing. The Matrix Template Library (MTL) was one of the first projects. Many of the lessons learned during construction of the MTL were applied to the design and implementation of the GGCL. The LSC has since evolved into the Open Systems Laboratory (OSL) http://www.osl.iu.edu.Although the name and location have changed, the research agenda remains the same.

An important class of linear algebra computations in scientific computing is that of sparse matrix computations, an area where graph algorithms play an important role. As the LSC was developing the sparse matrix capabilities of the MTL, the need for high-performance reusable (and generic) graph algorithms became apparent. However, none of the graph libraries available at the time (LEDA, GTL, Stanford GraphBase) were written using the generic programming style of the MTL and the STL, and hence did not fulfill the flexibility and high-performance requirements of the LSC. Other researchers were also expressing interest in a generic C++ graph library. During a meeting with Bjarne Stroustrup, we were introduced to several individuals at AT&T who needed such a library. Other early work in the area of generic graph algorithms included some codes written by Alexander Stepanov, as well as Dietmar Kühl’s master’s thesis.

With this in mind, and motivated by homework assignments in his algorithms class ,Jeremy Siek began prototyping an interface and some graph classes in the spring of1998. Lie-Quan Lee then developed the first version of the GGCL, which became his master’s thesis project. During the following year, the authors began collaborating with Alexander Stepanov and Matthew Austern. During this time, Stepanov’s disjoint-sets-based connected components implementation was added to the GGCL, and work began on providing concept documentation for the GGCL, similar to Austern’s STL documentation.

During this year the authors also became aware of Boost and were excited to find an organization interested in creating high-quality, open source C++ libraries. Boost included several people interested in generic graph algorithms, most notably Dietmar Kühl. Some discussions about generic interfaces for graph structures resulted in a revision of the GGCL that closely resembles the current Boost Graph Library interface. On September 4, 2000, the GGCL passed the Boost formal review (managed by David Abrahams) and became the Boost Graph Library. The first release of the BGL was September 27, 2000. The BGL is not a “frozen” library. It continues to grow as new algorithms are contributed, and it continues to evolve to meet users’ needs. We encourage readers to participate in the Boost group and help with extensions to the BGL.

What Is Boost?

Boost is an online community that encourages development and peer-review of free C++ libraries. The emphasis is on portable and high-quality libraries that work well with (and are in the same spirit as) the C++ Standard Library. Members of the community submit proposals (library designs and implementations) for review. The Boost community (led by a review manager) then reviews the library, provides feedback to the contributors, and finally renders a decision as to whether the library should be included in the Boost library collection. The libraries are available at the Boost Web site http://www.boost.org. In addition, the Boost mailing list provides an important forum for discussing library plans and for organizing collaboration.

Obtaining and Installing the BGL Software

The Boost Graph Library is available as part of the Boost library collection, which can be obtained in several different ways. The CD accompanying this book contains version 1.25.1 of the Boost library collection. In addition, releases of the Boost library collection can be obtained with your Web browser at http://www.boost.org/boost all.zip for the Windows zip archive of the latest release and http://www.boost.org/boostall.tar.gz for the UNIX archive of the latest release. The Boost libraries can also be downloaded via FTP at ftp://boost.sourceforge.net/pub-/boost/release/.

The zip archive of the Boost library collection can be unzipped by using WinZip or other similar tools. The UNIX “tar ball” can be expanded using the following command:

gunzip _cd boost all.tar.gz j tar xvf _

Extracting the archive creates a directory whose name consists of the word boost and a version number. For example, extracting the Boost release 1.25.1 creates a directory boost 1 25 1. Under this top directory, are two principal subdirectories: boost and libs. The subdirectory boost contains the header files for all the libraries in the collection. The subdirectory libs contains a separate subdirectory for each library in the collection. These subdirectories contain library-specific source and documentation files. You can point your Web browser to boost 1 251/index.htm and navigate the whole Boost library collection.

All of the BGL header files are in the directory boost/graph/. However, other Boost header files are needed since BGL uses other Boost components. The HTML documentation is in libs/graph/doc/ and the source code for the examples is inlibs/graph/example/. Regression tests for BGL are in libs/graph/test/. The source files in libs/graph/src/ implement the Graphviz file parsers and printers.

Except as described next, there are no compilation and build steps necessary to use BGL. All that is required is that the Boost header file directory be added to your compiler’s include path. For example, using Windows 2000, if you have unzipped release 1.25.1 from boost all.zip into the top level directory of your C drive, for Borland, GCC, and Metrowerks compilers add -Ic:/boost 1 25 1 to the compiler command line, and for the Microsoft Visual C++ compiler add /I "c:/boost 1 25 1". For IDEs, add c:/boost 1 25 1 (or whatever you have renamed it to) to the include search paths using the appropriate dialog. Before using the BGL interface to LEDA or Stanford GraphBase, LEDA or GraphBase must be installed according to their installation instructions. To use the read graphviz() functions (for reading AT&T Graphviz files), you must build and link to an additional library under boost 1 251/libs/graph/src.

The Boost Graph Library is written in ISO/IEC Standard C++ and compiles with most C++ compilers. For an up-to-date summary of the compatibility with a particular compiler, see the “Compiler Status” page at the Boost Web site http://www.boost.org/status/- compiler status.html.

How to Use This Book

This book is both a user guide and reference manual for the BGL. It is intended to allow the reader to begin using the BGL for real-life graph problems. This book should also be interesting for programmers who wish to learn more about generic programming. Although there are many books about how to use generic libraries (which in almost all cases means how to use the STL or Standard Library), there is very little available about how actually to build generic software. Yet generic programming is a vitally important new paradigm for software development. We hope that, by way of example, this book will show the reader how to do (and not simply use) generic programming and to apply and extend the generic programming paradigm beyond the basic container types and algorithms of the STL.

The third partner to the user guide and reference manual is the BGL code itself. The BGL code is not simply academic and instructional. It is intended to be used.

For students learning about graph algorithms and data structures, BGL provides a comprehensive graph algorithm framework. The student can concentrate on learning the important theory behind graph algorithms without becoming bogged down and distracted in too many implementation details. For practicing programmers, BGL provides high-quality implementations of graph data structures and algorithms. Programmers will realize significant time saving from this reliability. Time that would have otherwise been spent developing (and debugging) complicated graph data structures and algorithms can now be spent in more productive pursuits. Moreover, the flexible interface to the BGL will allow programmers to apply graph algorithms in settings where a graph may only exist implicitly.

For the graph theoretician, this book makes a persuasive case for the use of generic programming for implementing graph-theoretic algorithms. Algorithms written using the BGL interface will have broad applicability and will be able to be reused innumerous settings.

We assume that the reader has a good grasp of C++. Since there are many sources where the reader can learn about C++, we do not try to teach it here (see the references at the end of the book—The C++ Programming Language, Special ed., by Stroustrup and C++ Primer, 3rd ed., by Josee Lajoie and Stanley B. Lippman are our recommendations). We also assume some familiarity with the STL (see STL Tutorial and Reference Guide by David R. Musser, Gillmer J. Derge, and Atul Sainiand Generic Programming and the STL by Matthew Austern ). We do, however, present some of the more advanced C++ features used to implement generic libraries in general and the BGL in particular. Some necessary graph theory concepts are introduced here, but not in great detail. For a detailed discussion of elementary graph theory see Introduction to Algorithms by T. H. Cormen, C. E. Leiserson, and R.L. Rivest .

The Electronic Reference

An electronic version of the book is included on the accompanying CD, in the file bgl-book.pdf. The electronic version is searchable and is fully hyperlinked, making it a useful companion for the printed version. The hyperlinks include all internal references such as the literate programming “part” references as well as links to external Web pages.

Acknowledgments

We owe many debts of thanks to a number of individuals who both inspired and encouraged us in developing the BGL and in writing this book. A most profound thanks goes to Alexander Stepanov and David Musser for their pioneering work in generic programming, for their continued encouragement of our work, and for contributions to the BGL. We especially thank David Musser for his careful proofreading of this book. Matthew Austern’s work on documenting the concepts of the STL provided a foundation for creating the concepts in the BGL. We thank Dietmar Kühl for his work on generic graph algorithms and design patterns; especially for the property map abstraction. This work would not have been possible without the expressive power of Bjarne Stroustrup’s C++ language.

Dave Abrahams, Jens Maurer, Dietmar Kühl, Beman Dawes, Gary Powell, Greg Colvin and the rest of the group at Boost provided valuable input to the BGL interface, numerous suggestions for improvement, and proofreads of this book. We also thank the following BGL users whose questions helped to motivate and improve BGL (as well as this book): Gordon Woodhull, Dave Longhorn, Joel Phillips, Edward Luke, and Stephen North.

Thanks to a number of individuals who reviewed the book during its development: Jan Christiaan van Winkel, David Musser, Beman Dawes, and Jeffrey Squyres. A great thanks to our editor Deborah Lafferty; Kim Arney Mulcahy, Cheryl Ferguson, and Marcy Barnes, the production coordinator; and the rest of the team at Addison-Wesley. It was a pleasure to work with them.

Our original work on the BGL was supported in part by NSF grant ACI-9982205. Parts of the BGL were completed while the third author was on sabbatical at Lawrence Berkeley National Laboratory (where the first two authors were occasional guests).All of the graph drawings in this book were produced using the dot program from the Graphviz package.

License

The BGL software is released under an open source “artistic” license. A copy of the BGL license is included with the source code in the LICENSE file.

The BGL may be used freely for both commercial and noncommercial use. The main restriction on BGL is that modified source code can only be redistributed if it is clearly marked as a nonstandard version of BGL. The preferred method for the distribution of BGL, and for submitting changes, is through the Boost Web site.



0201729148P12172001

Index

, (comma), 40
. (period), 40
; (semicolon), 73

Aabstract data types (ADTs), 19
accumulate function, 26-27
Adaptor(s)
    basic description of, 13-14
    implementing, 123-126
    pattern, 119
add_edge function, 9, 17, 43, 84, 121, 152-153, 226
    EdgeMutablePropertyGraph concept and,157
    performance guidelines and, 128
    undirected graphs and, 141
AdditiveAbelianGroup class, 20-21
add_vertex function, 9, 43, 120, 152, 157, 128, 225
AdjacencyGraph concept, 46-47, 114, 115, 146-149
adjacency_graph_tag function, 124
adjacency_iterator function, 47, 146
adjacency_list class, 11-12, 13
    Bacon numbers and, 63, 65
    basic description of, 43
    boost namespace and, 37-39
    compilation order and, 37, 46
    implicit graphs and, 114
    interfacing with other graph libraries and,119
    internal properties and, 52-53
    maximum flow and, 107
    minimum-spanning-tree problem and, 92
    performance guidelines and, 127, 128, 130, 132
    shortest-path problems and, 84
    template parameters, 52
    using topological sort with, 17-18
adjacency_list.hpp, 17, 216, 246
adjacency_matrix class, 11-12, 43
    associated types, 238-239
    basic description of, 235-242
    member functions, 239-240
    nonmember functions, 240-242
    template parameters, 238
    type requirements, 238
adjacency_matrix.hpp, 237
adjacency_vertices function, 46-47, 146
    implicit graphs and, 114, 115
    maximum flow and, 109
adjacent iterators, 7
ADTs (abstract data types), 19
advance_dispatch function, 33
advance function, 33
Algorithms. See also Algorithms (listed by name)
    basic description of, 13-18, 61-74
    generic, 13-18
    Koenig lookup and, 39
Algorithms (listed by name) See also Algorithms
bellman_ford_shortest_paths algorithm, 40, 76-82, 162, 182-186
    breadth_first_search algorithm, 11, 39, 61-67, 158-159, 165-169
    depth_first_search algorithm, 13, 18, 44-46, 57, 67-75, 98, 160-161, 170-175
    Dijkstra’s shortest-path algorithm, 76, 81-88, 161, 179-181, 277
    Edmunds-Karp algorithm, 105, 109
    Ford-Fulkerson algorithm, 105
    Kruskal’s algorithm, 90-93, 95, 189-192
    Prim’s algorithm, 89, 90, 94-96
    push-relabel algorithm, 105
ANSI C, 262
archetype class, 36
array_traits class, 31-33
array traits, for pointer types, 32-33
Array type, 30
Assignable concept, 37, 28-29, 143
Associated types, 28-34, 143, 205
    adjacency_list class, 216-217
    adjacency_matrix class, 238-239
    edge_list class, 251-252
    filtered _raph class, 259-260
    graph_property_iter_range class, 298
    iterator_property_map class, 284
    LEDA Graph class, 268-269
    property_map class, 249
    reverse_graph class, 253-255
associative_property_map adaptor, 103
Austern, Matthew, 28

Bback_edge function, 50, 67, 160
back_edge_recorder class, 70
back_edges vector, 71
backward edge, 106
Bacon, Kevin, 62-67
bacon_number array, 66
bacon_number_recorder, 66
Bacon numbers
    basic description of, 61-67
    graph setup and, 63-65
    input files and, 63-65
bar.o, 54
Base
    classes, 20, 21
    parameter, 37
basic block, 69
BCCL (Boost Concept Checking Library), 35, 36
bellman_ford.cpp, 185-186
bellman_ford_shortest_paths algorithm, 40, 162
    basic description of, 76-82, 182-186
    named parameters, 184
    parameters, 183
    time complexity and, 185
BellmanFordVisitor concept, 161-162
BFS (breadth-first search), 11, 39. See also breadth_first_search algorithm
    Bacon numbers and, 65-67
    basic description of, 61-67
    visitor concepts and, 158-159
bfs_name_printer class, 11
BFSVisitor interface, 66, 158-159
bgl_named_params class, 40
BidirectionalGraph concept, 69, 72, 124, 145-146
bidirectional_graph_tag class, 124
Binary method problem, 23-24
boost::array, 78
Boost Concept Checking Library (BCCL), 35, 36
boost::forward_iterator_helper, 114
BOOST_INSTALL_PROPERTY, 52
Boost namespace
    adjacency_list class and, 37-38
    basic description of, 37-39
boost:: prefix, 37-38
Boost Property Map Library, 55-56, 79, 80
Boost Tokenizer Library, 63
breadth-first search (BFS), 11, 39. See also breadth_first_search algorithm
    Bacon numbers and, 65-67
    basic description of, 61-67
    visitor concepts and, 158-159
breadth_first_search algorithm, 11, 39. See also breadth-first search (BFS)
    Bacon numbers and, 65-67
    basic description of, 61-67, 165-169
    named parameters, 167
    parameters, 166
    preconditions, 167
    visitor concepts and, 158-159
Breadth-first tree, 61

CC++ (high-level language)
    associated types and, 28
    binary method problem and, 23-24
    code bloat and, 23
    concept checking and, 34-37
    expressions, 28
    generic programming in, 19-59
    GNU, 127, 128
    Koenig lookup and, 38-39
    Monoid concept and, 291
    named parameters and, 39-40
    object-oriented programming and, 22-25
    Standard, 22, 28, 55, 125
    valid expressions and, 28
capacity_map parameter, 206
cap object, 108
cc-internet.dot, 98
Chessboard, Knight’s tour problem for, 113-118
Class(es). See also Classes (listed by name)
    abstract, 20
    archetype, 36
    auxiliary, 242-251, 289-298
    basic description of, 13-14, 213-275
    base, 20, 21
    comparisons, 127-132
    concept-checking, 35-36
    nesting, 52
    selecting, 43-44
    typedefs nested in, 30-31
Classes (listed by name). See also adjacency_list class
    AdditiveAbelianGroup class, 20-21
    adjacency_matrix class, 11-12, 43, 234-242
    adjacency_vertices class, 109, 114, 115
  &nbs

Updates

Errata

Click below for Errata related to this title:
Errata

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020