COIN-OR::LEMON - Graph Library

Changeset 464:acfb0f24d178 in lemon-main


Ignore:
Timestamp:
01/12/09 08:05:30 (16 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Rename Residual to ResidualDigraph? (#67)
The new name is more analogous to other adaptor names.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/adaptors.h

    r455 r464  
    26672667  /// flow and circulation problems.
    26682668  ///
    2669   /// Residual can be used for composing the \e residual digraph for directed
    2670   /// flow and circulation problems. Let \f$ G=(V, A) \f$ be a directed graph
    2671   /// and let \f$ F \f$ be a number type. Let \f$ flow, cap: A\to F \f$ be
    2672   /// functions on the arcs.
     2669  /// ResidualDigraph can be used for composing the \e residual digraph
     2670  /// for directed flow and circulation problems. Let \f$ G=(V, A) \f$
     2671  /// be a directed graph and let \f$ F \f$ be a number type.
     2672  /// Let \f$ flow, cap: A\to F \f$ be functions on the arcs.
    26732673  /// This adaptor implements a digraph structure with node set \f$ V \f$
    26742674  /// and arc set \f$ A_{forward}\cup A_{backward} \f$,
     
    27052705#ifdef DOXYGEN
    27062706  template<typename GR, typename CM, typename FM, typename TL>
    2707   class Residual
     2707  class ResidualDigraph
    27082708#else
    27092709  template<typename GR,
     
    27112711           typename FM = CM,
    27122712           typename TL = Tolerance<typename CM::Value> >
    2713   class Residual :
     2713  class ResidualDigraph :
    27142714    public FilterArcs<
    27152715      Undirector<const GR>,
     
    27312731
    27322732    typedef typename CapacityMap::Value Value;
    2733     typedef Residual Adaptor;
     2733    typedef ResidualDigraph Adaptor;
    27342734
    27352735  protected:
     
    27622762    /// Constructor of the residual digraph adaptor. The parameters are the
    27632763    /// digraph, the capacity map, the flow map, and a tolerance object.
    2764     Residual(const Digraph& digraph, const CapacityMap& capacity,
    2765              FlowMap& flow, const Tolerance& tolerance = Tolerance())
     2764    ResidualDigraph(const Digraph& digraph, const CapacityMap& capacity,
     2765                    FlowMap& flow, const Tolerance& tolerance = Tolerance())
    27662766      : Parent(), _capacity(&capacity), _flow(&flow), _graph(digraph),
    27672767        _forward_filter(capacity, flow, tolerance),
     
    28702870  /// \relates Residual
    28712871  template<typename GR, typename CM, typename FM>
    2872   Residual<GR, CM, FM> residual(const GR& digraph,
    2873                                 const CM& capacity_map,
    2874                                 FM& flow_map) {
    2875     return Residual<GR, CM, FM> (digraph, capacity_map, flow_map);
     2872  ResidualDigraph<GR, CM, FM>
     2873  residualDigraph(const GR& digraph, const CM& capacity_map, FM& flow_map) {
     2874    return ResidualDigraph<GR, CM, FM> (digraph, capacity_map, flow_map);
    28762875  }
    28772876
  • test/graph_adaptor_test.cc

    r463 r464  
    582582}
    583583
    584 void checkResidual() {
     584void checkResidualDigraph() {
    585585  // Check concepts
    586   checkConcept<concepts::Digraph, Residual<concepts::Digraph> >();
    587   checkConcept<concepts::Digraph, Residual<ListDigraph> >();
     586  checkConcept<concepts::Digraph, ResidualDigraph<concepts::Digraph> >();
     587  checkConcept<concepts::Digraph, ResidualDigraph<ListDigraph> >();
    588588
    589589  // Create a digraph and an adaptor
    590590  typedef ListDigraph Digraph;
    591591  typedef Digraph::ArcMap<int> IntArcMap;
    592   typedef Residual<Digraph, IntArcMap> Adaptor;
     592  typedef ResidualDigraph<Digraph, IntArcMap> Adaptor;
    593593
    594594  Digraph digraph;
     
    14711471  checkFilterArcs();
    14721472  checkUndirector();
    1473   checkResidual();
     1473  checkResidualDigraph();
    14741474  checkSplitNodes();
    14751475
Note: See TracChangeset for help on using the changeset viewer.