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

Planar Embedding 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

Planar Embedding Concept

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 they are to be drawn around that vertex.

Планарное встраивание - это уточнениеLValuePropertyMap, которое устанавливает дополнительные ограничениязначения_типа, используемого в карте свойств.

Notation

Встраивание Это тип, который моделирует концепцию Planar Embedding.
Встраивание является объектом типаВведение.
График Это тип базового графа.
е является объектом типаgraph_traits::edge_descriptor.
против является объектом типаgraph_traits::vertex_descriptor.

Associated Types

Итератор Const boost::property_traits::value_type::const_iterator Тип итератора, используемый для итерации по упорядочиванию краев в плоском встраивании определенной вершины

Valid Expressions

встраивание [v].endв встраивании вокруг вершиныв встраиваниив введении
ВыражениеВозвращение ТипОписание
встраивание [v].beginбустер::value_traits<]
бустер::property_traits<]встраивание::property_traits]:::value_traitsвозвращает итератор в конец диапазона краев в встраивании вокруг вершинывстраиваниев введениив

Complexity Guarantees

Starting with an empty embedding, any mixed sequence of n calls to a particular vertex's push_back and clear should take O(n) time.

Models

Any LValue property map that maps vertices to a std::vector, std::list, or std::deque models this concept. Below is an example of using this approach to create a model of PlanarEmbedding:
#include <boost/property_map/property_map.hpp>
#include <vector>
...
// Assume a graph type "Graph" defined somewhere above and
// an instance of Graph in a variable g.
// A typedef for the storage - a vector of vectors of edge descriptors
typedef 
    std::vector< std::vector< graph_traits<Graph>::edge_descriptor > >
    planar_embedding_storage_t;
// A typedef for the iterator property map, assuming the graph has
// an interior vertex index map
typedef
    boost::iterator_property_map< planar_embedding_storage_t::iterator,
                                  property_map<Graph, vertex_index_t>::type
                                >
    planar_embedding_t;
// Create an instance of the storage and the property map
planar_embedding_storage_t planar_embedding_storage(num_vertices(g));
planar_embedding_t planar_embedding(planar_embedding_storage.begin(),
                                    get(vertex_index, g)
                                    );
// planar_embedding can now be passed to any function expecting a model
// of PlanarEmbedding.



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

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




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



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


реклама


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

Время компиляции файла: 2024-08-30 11:47:00
2025-05-20 22:01:00/0.006138801574707/0