# Changeset 32:ef12f83752f6 in lemon-tutorial for graphs.dox

Ignore:
Timestamp:
02/15/10 01:51:58 (11 years ago)
Branch:
default
Phase:
public
Message:

Happy New Year + unify files

File:
1 edited

Unmodified
Added
Removed
• ## graphs.dox

 r28 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2009 * Copyright (C) 2003-2010 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). In LEMON, there are various graph types, which are rather different, but they all conform to the corresponding \ref graph_concepts "graph concept", which defines the common part of the graph interfaces. which defines the common part of the graph interfaces. The \ref concepts::Digraph "Digraph concept" describes the common interface of directed graphs (without any sensible implementation), while along with some useful basic functions for obtaining the identifiers of the items, the end nodes of the arcs (or edges) and their iterators, etc. etc. An actual graph implementation may have various additional functionalities according to its purpose. significantly more efficient (both in terms of space and time), but it provides less functionality. For example, nodes and arcs cannot be removed from it. removed from it. \ref FullDigraph is an efficient implementation of a directed full graph. The \ref concepts::Graph "undirected graphs" also fulfill the concept of \ref concepts::Digraph "directed graphs", in such a way that each \ref concepts::Digraph "directed graphs", in such a way that each undirected \e edge of a graph can also be regarded as two oppositely directed \e arcs. As a result, all directed graph algorithms automatically \code ListGraph g; ListGraph::Node a = g.addNode(); ListGraph::Node b = g.addNode(); std::cout << "Edge " << g.id(e) << " connects node " << g.id(g.u(e)) << " and node " << g.id(g.v(e)) << std::endl; std::cout << "Arc " << g.id(a2) << " goes from node " << g.id(g.source(a2)) << " to node " << g.id(g.target(a2)) << std::endl; std::cout << arc_cost[a1] << ", " << arc_cost[a2] << std::endl; \endcode [SEC]sec_special_graphs[SEC] Special Graph Structures
Note: See TracChangeset for help on using the changeset viewer.