COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/path.h

    r313 r487  
    930930
    931931    template <typename Target, typename Source,
    932               bool buildEnable = BuildTagIndicator<Target>::value,
    933               bool revEnable = RevPathTagIndicator<Source>::value>
    934     struct PathCopySelector {
     932              bool buildEnable = BuildTagIndicator<Target>::value>
     933    struct PathCopySelectorForward {
    935934      static void copy(Target& target, const Source& source) {
    936935        target.clear();
     
    942941
    943942    template <typename Target, typename Source>
    944     struct PathCopySelector<Target, Source, false, true> {
     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 {
    945953      static void copy(Target& target, const Source& source) {
    946954        target.clear();
     
    952960
    953961    template <typename Target, typename Source>
    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> {
     962    struct PathCopySelectorBackward<Target, Source, 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      }     
    967983    };
    968984
Note: See TracChangeset for help on using the changeset viewer.