lemon/bits/traits.h
changeset 2120 a907fb95f1e0
parent 1996 5dc13b93f8b4
child 2290 f30867b359a8
equal deleted inserted replaced
1:4b3eac32c644 2:c03a4cf3fef2
   237 
   237 
   238     typedef typename Map::ConstReference ConstReference; 
   238     typedef typename Map::ConstReference ConstReference; 
   239     typedef typename Map::Reference Reference;
   239     typedef typename Map::Reference Reference;
   240  };
   240  };
   241 
   241 
       
   242   template <typename MatrixMap, typename Enable = void>
       
   243   struct MatrixMapTraits {
       
   244     typedef False ReferenceMapTag;
       
   245 
       
   246     typedef typename MatrixMap::FirstKey FirstKey;
       
   247     typedef typename MatrixMap::SecondKey SecondKey;
       
   248     typedef typename MatrixMap::Value Value;
       
   249 
       
   250     typedef const Value ConstReturnValue;
       
   251     typedef const Value ReturnValue;
       
   252   };
       
   253 
       
   254   template <typename MatrixMap>
       
   255   struct MatrixMapTraits<
       
   256     MatrixMap, typename enable_if<typename MatrixMap::ReferenceMapTag, 
       
   257                                   void>::type > 
       
   258   {
       
   259     typedef True ReferenceMapTag;
       
   260     
       
   261     typedef typename MatrixMap::FirstKey FirstKey;
       
   262     typedef typename MatrixMap::SecondKey SecondKey;
       
   263     typedef typename MatrixMap::Value Value;
       
   264 
       
   265     typedef typename MatrixMap::ConstReference ConstReturnValue;
       
   266     typedef typename MatrixMap::Reference ReturnValue;
       
   267 
       
   268     typedef typename MatrixMap::ConstReference ConstReference; 
       
   269     typedef typename MatrixMap::Reference Reference;
       
   270  };
       
   271 
   242   // Indicators for the tags
   272   // Indicators for the tags
   243 
   273 
   244   template <typename Graph, typename Enable = void>
   274   template <typename Graph, typename Enable = void>
   245   struct NodeNumTagIndicator {
   275   struct NodeNumTagIndicator {
   246     static const bool value = false;
   276     static const bool value = false;