COIN-OR::LEMON - Graph Library

Changeset 910:5a89cacf17f1 in lemon-0.x


Ignore:
Timestamp:
09/27/04 20:11:27 (19 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1221
Message:

minor corrections

Location:
src/hugo
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/graph_wrapper.h

    r906 r910  
    2828#include <hugo/invalid.h>
    2929#include <hugo/maps.h>
     30#include <hugo/map_defines.h>
    3031#include <iostream>
    3132
     
    315316  /// This wrapper shows a graph with filtered node-set and
    316317  /// edge-set. Given a bool-valued map on the node-set and one on
    317   /// the edge-set of the graphs, the iterators shows only the objects
     318  /// the edge-set of the graphs, the iterators show only the objects
    318319  /// having true value.
    319320  /// The quick brown fox iterators jump over
     
    578579  };
    579580 
    580   /// \brief An undirected graph template.
    581   ///
    582   ///\warning Graph wrappers are in even more experimental state than the other
    583   ///parts of the lib. Use them at your own risk.
    584   ///
    585   /// An undirected graph template.
    586   /// This class works as an undirected graph and a directed graph of
    587   /// class \c Graph is used for the physical storage.
    588   /// \ingroup graphs
     581//   /// \brief An undirected graph template.
     582//   ///
     583//   ///\warning Graph wrappers are in even more experimental state than the other
     584//   ///parts of the lib. Use them at your own risk.
     585//   ///
     586//   /// An undirected graph template.
     587//   /// This class works as an undirected graph and a directed graph of
     588//   /// class \c Graph is used for the physical storage.
     589//   /// \ingroup graphs
    589590  template<typename Graph>
    590591  class UndirGraph : public UndirGraphWrapper<Graph> {
     
    609610  ///
    610611  /// Suppose that for a directed graph $G=(V, A)$,
    611   /// two predicates on the edge-set, $forward_filter$, and $backward_filter$
     612  /// two bool valued maps on the edge-set,
     613  /// $forward_filter$, and $backward_filter$
    612614  /// is given, and we are dealing with the directed graph
    613615  /// a $G'=(V, \{uv : uv\in A \mbox{ and } forward_filter(uv) \mbox{ is true}\}+\{vu : uv\in A \mbox{ and } backward_filter(uv) \mbox{ is true}\})$.
     
    622624  /// But BidirGraphWrapper is obtained from
    623625  /// SubBidirGraphWrapper by considering everywhere true
    624   /// predicates both forward_filter and backward_filter.
     626  /// valued maps both for forward_filter and backward_filter.
    625627  /// Finally, one of the most important applications of SubBidirGraphWrapper
    626628  /// is ResGraphWrapper, which stands for the residual graph in directed
     
    629631  /// above mentioned graph structure without its physical storage,
    630632  /// that is the whole stuff eats constant memory.
    631   /// As the oppositely directed edges are logical different,
     633  /// As the oppositely directed edges are logically different,
    632634  /// the maps are able to attach different values for them.
    633635  template<typename Graph,
     
    671673    typedef typename Graph::Edge GraphEdge;
    672674    /// SubBidirGraphWrapper<..., ..., ...>::Edge is inherited from
    673     /// Graph::Edge. It contains an extra bool flag which shows if the
     675    /// Graph::Edge. It contains an extra bool flag which is true
     676    /// if and only if the
    674677    /// edge is the backward version of the original edge.
    675678    class Edge : public Graph::Edge {
     
    11311134    /// \brief Residual capacity map.
    11321135    ///
    1133     /// In generic residual graphs the residual capacity can be obtained as a map. Not tested.
     1136    /// In generic residual graphs the residual capacity can be obtained
     1137    /// as a map.
    11341138    class ResCap {
    11351139    protected:
  • src/hugo/min_cost_flow.h

    r906 r910  
    7272
    7373
    74     typedef ResGraphWrapper<const Graph,int,CapacityMap,EdgeIntMap> ResGraphType;
    75     typedef typename ResGraphType::Edge ResGraphEdge;
     74    typedef ResGraphWrapper<const Graph,int,CapacityMap,EdgeIntMap> ResGW;
     75    typedef typename ResGW::Edge ResGraphEdge;
    7676
    7777    class ModLengthMap {   
    7878      typedef typename Graph::template NodeMap<Length> NodeMap;
    79       const ResGraphType& G;
     79      const ResGW& G;
    8080      const LengthMap &ol;
    8181      const NodeMap &pot;
     
    8484      typedef typename LengthMap::ValueType ValueType;
    8585       
    86       ValueType operator[](typename ResGraphType::Edge e) const {     
     86      ValueType operator[](typename ResGW::Edge e) const {     
    8787        if (G.forward(e))
    8888          return  ol[e]-(pot[G.head(e)]-pot[G.tail(e)]);   
     
    9191      }     
    9292       
    93       ModLengthMap(const ResGraphType& _G,
     93      ModLengthMap(const ResGW& _G,
    9494                   const LengthMap &o,  const NodeMap &p) :
    9595        G(_G), /*rev(_rev),*/ ol(o), pot(p){};
     
    153153     
    154154      //We need a residual graph
    155       ResGraphType res_graph(G, capacity, flow);
     155      ResGW res_graph(G, capacity, flow);
    156156
    157157
    158158      ModLengthMap mod_length(res_graph, length, potential);
    159159
    160       Dijkstra<ResGraphType, ModLengthMap> dijkstra(res_graph, mod_length);
     160      Dijkstra<ResGW, ModLengthMap> dijkstra(res_graph, mod_length);
    161161
    162162      int i;
     
    169169       
    170170        //We have to change the potential
    171         for(typename ResGraphType::NodeIt n(res_graph); n!=INVALID; ++n)
     171        for(typename ResGW::NodeIt n(res_graph); n!=INVALID; ++n)
    172172          potential[n] += dijkstra.distMap()[n];
    173173
  • src/hugo/tight_edge_filter_map.h

    r906 r910  
    1717#ifndef HUGO_TIGHT_EDGE_FILTER_MAP_H
    1818#define HUGO_TIGHT_EDGE_FILTER_MAP_H
     19
     20#include <hugo/maps.h>
    1921
    2022// /// \file
     
    3941  template<typename Graph,
    4042           typename NodePotentialMap, typename EdgeDistanceMap>
    41   class TightEdgeFilterMap {
     43  class TightEdgeFilterMap : public MapBase<typename Graph::Edge, bool> {
    4244  protected:
    4345    const Graph* g;
Note: See TracChangeset for help on using the changeset viewer.