COIN-OR::LEMON - Graph Library

Changeset 1710:f531c16dd923 in lemon-0.x for lemon/floyd_warshall.h


Ignore:
Timestamp:
10/06/05 11:37:53 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2237
Message:

Bug solved in named parameters
Simplify my Johnson algorithm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/floyd_warshall.h

    r1699 r1710  
    171171  /// \author Balazs Dezso
    172172
    173 
     173#ifdef DOXYGEN
     174  template <typename _Graph, typename _LengthMap typename _Traits >
     175#else
    174176  template <typename _Graph=ListGraph,
    175177            typename _LengthMap=typename _Graph::template EdgeMap<int>,
    176178            typename _Traits=FloydWarshallDefaultTraits<_Graph,_LengthMap> >
     179#endif
    177180  class FloydWarshall {
    178181  public:
     
    257260    ///
    258261    template <class T>
    259     class DefPredMap
    260       : public FloydWarshall< Graph, LengthMap, DefPredMapTraits<T> > {};
     262    struct DefPredMap
     263      : public FloydWarshall< Graph, LengthMap, DefPredMapTraits<T> > {
     264      typedef FloydWarshall< Graph, LengthMap, DefPredMapTraits<T> > Create;
     265    };
    261266   
    262267    template <class T>
     
    273278    ///
    274279    template <class T>
    275     class DefDistMap
    276       : public FloydWarshall< Graph, LengthMap, DefDistMapTraits<T> > {};
     280    struct DefDistMap
     281      : public FloydWarshall< Graph, LengthMap, DefDistMapTraits<T> > {
     282      typedef FloydWarshall< Graph, LengthMap, DefDistMapTraits<T> > Create;
     283    };
    277284   
    278285    template <class T>
     
    286293    /// \ref named-templ-param "Named parameter" for setting PredMap type
    287294    template <class T>
    288     class DefOperationTraits
     295    struct DefOperationTraits
    289296      : public FloydWarshall< Graph, LengthMap, DefOperationTraitsTraits<T> > {
     297      typedef FloydWarshall< Graph, LengthMap, DefOperationTraitsTraits<T> >
     298      Create;
    290299    };
    291300   
    292301    ///@}
    293302
     303  protected:
     304
     305    FloydWarshall() {}
     306
    294307  public:     
     308
     309    typedef FloydWarshall Create;
    295310   
    296311    /// \brief Constructor.
Note: See TracChangeset for help on using the changeset viewer.