COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/groups.dox

    r455 r440  
    6363
    6464/**
    65 @defgroup graph_adaptors Adaptor Classes for Graphs
     65@defgroup graph_adaptors Adaptor Classes for graphs
    6666@ingroup graphs
    67 \brief Adaptor classes for digraphs and graphs
    68 
    69 This group contains several useful adaptor classes for digraphs and graphs.
     67\brief This group contains several adaptor classes for digraphs and graphs
    7068
    7169The main parts of LEMON are the different graph structures, generic
    72 graph algorithms, graph concepts, which couple them, and graph
     70graph algorithms, graph concepts which couple these, and graph
    7371adaptors. While the previous notions are more or less clear, the
    7472latter one needs further explanation. Graph adaptors are graph classes
     
    7674
    7775A short example makes this much clearer.  Suppose that we have an
    78 instance \c g of a directed graph type, say ListDigraph and an algorithm
     76instance \c g of a directed graph type say ListDigraph and an algorithm
    7977\code
    8078template <typename Digraph>
     
    8482(in time or in memory usage) to copy \c g with the reversed
    8583arcs.  In this case, an adaptor class is used, which (according
    86 to LEMON \ref concepts::Digraph "digraph concepts") works as a digraph.
    87 The adaptor uses the original digraph structure and digraph operations when
    88 methods of the reversed oriented graph are called.  This means that the adaptor
    89 have minor memory usage, and do not perform sophisticated algorithmic
     84to LEMON digraph concepts) works as a digraph.  The adaptor uses the
     85original digraph structure and digraph operations when methods of the
     86reversed oriented graph are called.  This means that the adaptor have
     87minor memory usage, and do not perform sophisticated algorithmic
    9088actions.  The purpose of it is to give a tool for the cases when a
    9189graph have to be used in a specific alteration.  If this alteration is
    92 obtained by a usual construction like filtering the node or the arc set or
     90obtained by a usual construction like filtering the arc-set or
    9391considering a new orientation, then an adaptor is worthwhile to use.
    9492To come back to the reverse oriented graph, in this situation
     
    9997\code
    10098ListDigraph g;
    101 ReverseDigraph<ListDigraph> rg(g);
     99ReverseDigraph<ListGraph> rg(g);
    102100int result = algorithm(rg);
    103101\endcode
    104 During running the algorithm, the original digraph \c g is untouched.
    105 This techniques give rise to an elegant code, and based on stable
     102After running the algorithm, the original graph \c g is untouched.
     103This techniques gives rise to an elegant code, and based on stable
    106104graph adaptors, complex algorithms can be implemented easily.
    107105
    108 In flow, circulation and matching problems, the residual
     106In flow, circulation and bipartite matching problems, the residual
    109107graph is of particular importance. Combining an adaptor implementing
    110 this with shortest path algorithms or minimum mean cycle algorithms,
     108this, shortest path algorithms and minimum mean cycle algorithms,
    111109a range of weighted and cardinality optimization algorithms can be
    112110obtained. For other examples, the interested user is referred to the
     
    115113The behavior of graph adaptors can be very different. Some of them keep
    116114capabilities of the original graph while in other cases this would be
    117 meaningless. This means that the concepts that they meet depend
    118 on the graph adaptor, and the wrapped graph.
    119 For example, if an arc of a reversed digraph is deleted, this is carried
    120 out by deleting the corresponding arc of the original digraph, thus the
    121 adaptor modifies the original digraph.
    122 However in case of a residual digraph, this operation has no sense.
    123 
     115meaningless. This means that the concepts that they are models of depend
     116on the graph adaptor, and the wrapped graph(s).
     117If an arc of \c rg is deleted, this is carried out by deleting the
     118corresponding arc of \c g, thus the adaptor modifies the original graph.
     119
     120But for a residual graph, this operation has no sense.
    124121Let us stand one more example here to simplify your work.
    125 ReverseDigraph has constructor
     122RevGraphAdaptor has constructor
    126123\code
    127124ReverseDigraph(Digraph& digraph);
    128125\endcode
    129 This means that in a situation, when a <tt>const %ListDigraph&</tt>
     126This means that in a situation, when a <tt>const ListDigraph&</tt>
    130127reference to a graph is given, then it have to be instantiated with
    131 <tt>Digraph=const %ListDigraph</tt>.
     128<tt>Digraph=const ListDigraph</tt>.
    132129\code
    133130int algorithm1(const ListDigraph& g) {
    134   ReverseDigraph<const ListDigraph> rg(g);
     131  RevGraphAdaptor<const ListDigraph> rg(g);
    135132  return algorithm2(rg);
    136133}
Note: See TracChangeset for help on using the changeset viewer.