lemon/bits/traits.h
changeset 209 765619b7cbb2
parent 184 716b220697a0
child 220 a5d8c039f218
     1.1 --- a/lemon/bits/traits.h	Sun Jul 13 16:46:56 2008 +0100
     1.2 +++ b/lemon/bits/traits.h	Sun Jul 13 19:51:02 2008 +0100
     1.3 @@ -1,7 +1,6 @@
     1.4 -
     1.5 -/* -*- C++ -*-
     1.6 +/* -*- mode: C++; indent-tabs-mode: nil; -*-
     1.7   *
     1.8 - * This file is a part of LEMON, a generic C++ optimization library
     1.9 + * This file is a part of LEMON, a generic C++ optimization library.
    1.10   *
    1.11   * Copyright (C) 2003-2008
    1.12   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.13 @@ -29,7 +28,7 @@
    1.14  namespace lemon {
    1.15    template <typename _Graph, typename _Item>
    1.16    class ItemSetTraits {};
    1.17 -  
    1.18 +
    1.19  
    1.20    template <typename Graph, typename Enable = void>
    1.21    struct NodeNotifierIndicator {
    1.22 @@ -37,16 +36,16 @@
    1.23    };
    1.24    template <typename Graph>
    1.25    struct NodeNotifierIndicator<
    1.26 -    Graph, 
    1.27 +    Graph,
    1.28      typename enable_if<typename Graph::NodeNotifier::Notifier, void>::type
    1.29 -  > { 
    1.30 +  > {
    1.31      typedef typename Graph::NodeNotifier Type;
    1.32    };
    1.33  
    1.34    template <typename _Graph>
    1.35    class ItemSetTraits<_Graph, typename _Graph::Node> {
    1.36    public:
    1.37 -    
    1.38 +
    1.39      typedef _Graph Graph;
    1.40  
    1.41      typedef typename Graph::Node Item;
    1.42 @@ -57,13 +56,13 @@
    1.43      template <typename _Value>
    1.44      class Map : public Graph::template NodeMap<_Value> {
    1.45      public:
    1.46 -      typedef typename Graph::template NodeMap<_Value> Parent; 
    1.47 -      typedef typename Graph::template NodeMap<_Value> Type; 
    1.48 +      typedef typename Graph::template NodeMap<_Value> Parent;
    1.49 +      typedef typename Graph::template NodeMap<_Value> Type;
    1.50        typedef typename Parent::Value Value;
    1.51  
    1.52        Map(const Graph& _digraph) : Parent(_digraph) {}
    1.53 -      Map(const Graph& _digraph, const Value& _value) 
    1.54 -	: Parent(_digraph, _value) {}
    1.55 +      Map(const Graph& _digraph, const Value& _value)
    1.56 +        : Parent(_digraph, _value) {}
    1.57  
    1.58       };
    1.59  
    1.60 @@ -75,16 +74,16 @@
    1.61    };
    1.62    template <typename Graph>
    1.63    struct ArcNotifierIndicator<
    1.64 -    Graph, 
    1.65 +    Graph,
    1.66      typename enable_if<typename Graph::ArcNotifier::Notifier, void>::type
    1.67 -  > { 
    1.68 +  > {
    1.69      typedef typename Graph::ArcNotifier Type;
    1.70    };
    1.71  
    1.72    template <typename _Graph>
    1.73    class ItemSetTraits<_Graph, typename _Graph::Arc> {
    1.74    public:
    1.75 -    
    1.76 +
    1.77      typedef _Graph Graph;
    1.78  
    1.79      typedef typename Graph::Arc Item;
    1.80 @@ -95,13 +94,13 @@
    1.81      template <typename _Value>
    1.82      class Map : public Graph::template ArcMap<_Value> {
    1.83      public:
    1.84 -      typedef typename Graph::template ArcMap<_Value> Parent; 
    1.85 -      typedef typename Graph::template ArcMap<_Value> Type; 
    1.86 +      typedef typename Graph::template ArcMap<_Value> Parent;
    1.87 +      typedef typename Graph::template ArcMap<_Value> Type;
    1.88        typedef typename Parent::Value Value;
    1.89  
    1.90        Map(const Graph& _digraph) : Parent(_digraph) {}
    1.91 -      Map(const Graph& _digraph, const Value& _value) 
    1.92 -	: Parent(_digraph, _value) {}
    1.93 +      Map(const Graph& _digraph, const Value& _value)
    1.94 +        : Parent(_digraph, _value) {}
    1.95      };
    1.96  
    1.97    };
    1.98 @@ -112,16 +111,16 @@
    1.99    };
   1.100    template <typename Graph>
   1.101    struct EdgeNotifierIndicator<
   1.102 -    Graph, 
   1.103 +    Graph,
   1.104      typename enable_if<typename Graph::EdgeNotifier::Notifier, void>::type
   1.105 -  > { 
   1.106 +  > {
   1.107      typedef typename Graph::EdgeNotifier Type;
   1.108    };
   1.109  
   1.110    template <typename _Graph>
   1.111    class ItemSetTraits<_Graph, typename _Graph::Edge> {
   1.112    public:
   1.113 -    
   1.114 +
   1.115      typedef _Graph Graph;
   1.116  
   1.117      typedef typename Graph::Edge Item;
   1.118 @@ -132,13 +131,13 @@
   1.119      template <typename _Value>
   1.120      class Map : public Graph::template EdgeMap<_Value> {
   1.121      public:
   1.122 -      typedef typename Graph::template EdgeMap<_Value> Parent; 
   1.123 -      typedef typename Graph::template EdgeMap<_Value> Type; 
   1.124 +      typedef typename Graph::template EdgeMap<_Value> Parent;
   1.125 +      typedef typename Graph::template EdgeMap<_Value> Type;
   1.126        typedef typename Parent::Value Value;
   1.127  
   1.128        Map(const Graph& _digraph) : Parent(_digraph) {}
   1.129 -      Map(const Graph& _digraph, const Value& _value) 
   1.130 -	: Parent(_digraph, _value) {}
   1.131 +      Map(const Graph& _digraph, const Value& _value)
   1.132 +        : Parent(_digraph, _value) {}
   1.133      };
   1.134  
   1.135    };
   1.136 @@ -156,17 +155,17 @@
   1.137  
   1.138    template <typename Map>
   1.139    struct MapTraits<
   1.140 -    Map, typename enable_if<typename Map::ReferenceMapTag, void>::type > 
   1.141 +    Map, typename enable_if<typename Map::ReferenceMapTag, void>::type >
   1.142    {
   1.143      typedef True ReferenceMapTag;
   1.144 -    
   1.145 +
   1.146      typedef typename Map::Key Key;
   1.147      typedef typename Map::Value Value;
   1.148  
   1.149      typedef typename Map::ConstReference ConstReturnValue;
   1.150      typedef typename Map::Reference ReturnValue;
   1.151  
   1.152 -    typedef typename Map::ConstReference ConstReference; 
   1.153 +    typedef typename Map::ConstReference ConstReference;
   1.154      typedef typename Map::Reference Reference;
   1.155   };
   1.156  
   1.157 @@ -184,11 +183,11 @@
   1.158  
   1.159    template <typename MatrixMap>
   1.160    struct MatrixMapTraits<
   1.161 -    MatrixMap, typename enable_if<typename MatrixMap::ReferenceMapTag, 
   1.162 -                                  void>::type > 
   1.163 +    MatrixMap, typename enable_if<typename MatrixMap::ReferenceMapTag,
   1.164 +                                  void>::type >
   1.165    {
   1.166      typedef True ReferenceMapTag;
   1.167 -    
   1.168 +
   1.169      typedef typename MatrixMap::FirstKey FirstKey;
   1.170      typedef typename MatrixMap::SecondKey SecondKey;
   1.171      typedef typename MatrixMap::Value Value;
   1.172 @@ -196,7 +195,7 @@
   1.173      typedef typename MatrixMap::ConstReference ConstReturnValue;
   1.174      typedef typename MatrixMap::Reference ReturnValue;
   1.175  
   1.176 -    typedef typename MatrixMap::ConstReference ConstReference; 
   1.177 +    typedef typename MatrixMap::ConstReference ConstReference;
   1.178      typedef typename MatrixMap::Reference Reference;
   1.179   };
   1.180  
   1.181 @@ -209,7 +208,7 @@
   1.182  
   1.183    template <typename Graph>
   1.184    struct NodeNumTagIndicator<
   1.185 -    Graph, 
   1.186 +    Graph,
   1.187      typename enable_if<typename Graph::NodeNumTag, void>::type
   1.188    > {
   1.189      static const bool value = true;
   1.190 @@ -222,7 +221,7 @@
   1.191  
   1.192    template <typename Graph>
   1.193    struct EdgeNumTagIndicator<
   1.194 -    Graph, 
   1.195 +    Graph,
   1.196      typename enable_if<typename Graph::EdgeNumTag, void>::type
   1.197    > {
   1.198      static const bool value = true;
   1.199 @@ -235,7 +234,7 @@
   1.200  
   1.201    template <typename Graph>
   1.202    struct FindEdgeTagIndicator<
   1.203 -    Graph, 
   1.204 +    Graph,
   1.205      typename enable_if<typename Graph::FindEdgeTag, void>::type
   1.206    > {
   1.207      static const bool value = true;
   1.208 @@ -248,7 +247,7 @@
   1.209  
   1.210    template <typename Graph>
   1.211    struct UndirectedTagIndicator<
   1.212 -    Graph, 
   1.213 +    Graph,
   1.214      typename enable_if<typename Graph::UndirectedTag, void>::type
   1.215    > {
   1.216      static const bool value = true;
   1.217 @@ -261,7 +260,7 @@
   1.218  
   1.219    template <typename Graph>
   1.220    struct BuildTagIndicator<
   1.221 -    Graph, 
   1.222 +    Graph,
   1.223      typename enable_if<typename Graph::BuildTag, void>::type
   1.224    > {
   1.225      static const bool value = true;