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

AddEdgeVisitor Concept

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

AddEdgeVisitor Concept

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 points in the algorithm where an edge addition occurs. Replacing calls to to add_edge with calls to AddEdgeVisitor::visit_vertex_pair allows for such operations to be defined independently from the algorithm.

Notation

Победитель тип, который моделирует концепцию AddEdgeVisitor
vis является объектом типа Посетитель
Graph является типом графа
u,v являются объектами типа graph_traits::vertex_descriptor
e является объектом типа graph_traits::edge_descriptor
v является объектом типа graph_traits::vertex_descriptor

Associated Types

None

Valid Expressions

Имя>>

Models

Two models of this concept are defined in the file add_edge_visitors.hpp:
  • default_add_edge_visitor: The constructor of this class takes no arguments.visit_vertex_pair(u, v, g) is just a dispatch to add_edge(u, v, g).
  • edge_index_update_visitor: The constructor of this class takes two arguments: the first, an EdgeIndexMap, is a ReadWritePropertyMap that maps each edge in the associated graph g to a distinct integer in the range [0, num_edges(g)). 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 edge_index_update_visitor constructor should be called with get(edge_index, g) as the edge index and num_edges(g) as the next available index. When visit_vertex_pair(u, v, g) is called, the edge_index_update_visitor will add the edge (u,v) to the graph and update the edge index for the newly created edge.



Copyright © 2007 Aaron Windsor ( aaron.windsor@gmail.com)

Статья AddEdgeVisitor Concept раздела может быть полезна для разработчиков на c++ и boost.




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



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


Экспрессия Тип возврата Описание
Добавить край visit_vertex_pair(u, v, g) void Каждый раз, когда между ребрами <16u>

реклама


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

Время компиляции файла: 2024-08-30 11:47:00
2025-05-20 23:31:41/0.0060660839080811/0