COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/path.h

    r517 r313  
    930930
    931931    template <typename Target, typename Source,
    932               bool buildEnable = BuildTagIndicator<Target>::value>
    933     struct PathCopySelectorForward {
     932              bool buildEnable = BuildTagIndicator<Target>::value,
     933              bool revEnable = RevPathTagIndicator<Source>::value>
     934    struct PathCopySelector {
    934935      static void copy(Target& target, const Source& source) {
    935936        target.clear();
     
    941942
    942943    template <typename Target, typename Source>
    943     struct PathCopySelectorForward<Target, Source, true> {
    944       static void copy(Target& target, const Source& source) {
    945         target.clear();
    946         target.build(source);
    947       }
    948     };
    949 
    950     template <typename Target, typename Source,
    951               bool buildEnable = BuildTagIndicator<Target>::value>
    952     struct PathCopySelectorBackward {
     944    struct PathCopySelector<Target, Source, false, true> {
    953945      static void copy(Target& target, const Source& source) {
    954946        target.clear();
     
    960952
    961953    template <typename Target, typename Source>
    962     struct PathCopySelectorBackward<Target, Source, true> {
     954    struct PathCopySelector<Target, Source, true, false> {
     955      static void copy(Target& target, const Source& source) {
     956        target.clear();
     957        target.build(source);
     958      }
     959    };
     960
     961    template <typename Target, typename Source>
     962    struct PathCopySelector<Target, Source, true, true> {
    963963      static void copy(Target& target, const Source& source) {
    964964        target.clear();
    965965        target.buildRev(source);
    966966      }
    967     };
    968 
    969    
    970     template <typename Target, typename Source,
    971               bool revEnable = RevPathTagIndicator<Source>::value>
    972     struct PathCopySelector {
    973       static void copy(Target& target, const Source& source) {
    974         PathCopySelectorForward<Target, Source>::copy(target, source);
    975       }     
    976     };
    977 
    978     template <typename Target, typename Source>
    979     struct PathCopySelector<Target, Source, true> {
    980       static void copy(Target& target, const Source& source) {
    981         PathCopySelectorBackward<Target, Source>::copy(target, source);
    982       }     
    983967    };
    984968
Note: See TracChangeset for help on using the changeset viewer.