Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Boost Graph Library: bfs_visitor

Boost , ,

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

C++ Boost

bfs_visitor<EventVisitorList>

This class is an adapter that converts a list of EventVisitors (constructed using std::pair) into a BFSVisitor.

Example

This is an excerpt from examples/bfs.cpp where three event-visitors are combined to make a BFS visitor. The functions boost::record_distances, boost::record_predecessors, and copy_graph are all functions that create an event visitor.
  // Construct graph G and obtain the source vertex 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(), 
                                              boost::on_tree_edge()),
                   copy_graph(G_copy, boost::on_examine_edge())))) );

Model of

BFSVisitor

Template Parameters

ParameterDescriptionDefault
EventVisitorList Список событийСоздано с помощьюstd::pair. null_visitor

Where Defined

boost/graph/breadth_first_search.hpp

Member Functions

This class implements all of the member functions required by BFSVisitor. In each function the appropriate event is dispatched to the EventVisitor in the EventVisitorList.

Non-Member Functions

FunctionDescription
template
bfs_visitor
make_bfs_visitor(EventVisitorList ev_list);
Возвращает список посетителей мероприятия, адаптированный для посещения BFS.

See Also

Visitor concepts

The following are event visitors: predecessor_recorder, distance_recorder, time_stamper, and property_writer.


Copyright © 2000-2001Джереми Сик, Университет Индианыjsiek@osl.iu.edu]
Ли-Куан Ли, Университет Индианыllee@cs.indiana.edu]
Эндрю Лумсдейн, Университет Индианыlums@osl.iu.edu

Статья Boost Graph Library: bfs_visitor раздела может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-20 10:33:17/0.00565505027771/0