AdjacencyMatrix Boost , ,
AdjacencyMatrix
The AdjacencyMatrix concept refines Graph
concept and adds the requirement for efficient access to any edge in
the graph given the source and target vertices. No Boost Graph Library
algorithms currently use this concept. However there are algorithms
not yet implemented such as Floyd-Warshall that would require this
concept.
Refinement of
Graph
Associated Types
boost::graph_traits::traversal_category Этот тип тега должен быть конвертируем вadjacency_matrix_tag .
Valid Expressions
Name Expression Return Type Description
Прямой край доступа
edge(u,v,g)
std::pair
Возвращает пару, состоящую из флага, говорящего, существует ли край междуu иv в графеg и состоящий из дескриптора края, если край был найден.
Complexity guarantees
The edge() function must return in constant time.
Models
adjacency_matrix
Concept Checking Class
template <class G>
struct AdjacencyMatrix
{
typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor;
void constraints() {
p = edge(u, v, g);
}
typename boost::graph_traits<G>::vertex_descriptor u, v;
std::pair<bool, edge_descriptor> p;
G g;
};
Статья AdjacencyMatrix раздела может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.
:: Главная :: ::