COIN-OR::LEMON - Graph Library

Changeset 987:87f7c54892df in lemon-0.x for src/lemon/concept


Ignore:
Timestamp:
11/13/04 18:07:10 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1377
Message:

Naming changes:

Location:
src/lemon/concept
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/concept/graph.h

    r986 r987  
    568568//      {
    569569//        //Check the typedef's
    570 //        typename Graph::template NodeMap<int>::ValueType val;
     570//        typename Graph::template NodeMap<int>::Value val;
    571571//        val=1;
    572 //        typename Graph::template NodeMap<int>::KeyType key;
     572//        typename Graph::template NodeMap<int>::Key key;
    573573//        key = typename Graph::NodeIt(G);
    574574//      }
     
    592592//      {
    593593//        //Check the typedef's
    594 //        typename Graph::template NodeMap<bool>::ValueType val;
     594//        typename Graph::template NodeMap<bool>::Value val;
    595595//        val=true;
    596 //        typename Graph::template NodeMap<bool>::KeyType key;
     596//        typename Graph::template NodeMap<bool>::Key key;
    597597//        key= typename Graph::NodeIt(G);
    598598//      }
     
    615615//      {
    616616//        //Check the typedef's
    617 //        typename Graph::template EdgeMap<int>::ValueType val;
     617//        typename Graph::template EdgeMap<int>::Value val;
    618618//        val=1;
    619 //        typename Graph::template EdgeMap<int>::KeyType key;
     619//        typename Graph::template EdgeMap<int>::Key key;
    620620//        key= typename Graph::EdgeIt(G);
    621621//      }
     
    638638//      {
    639639//        //Check the typedef's
    640 //        typename Graph::template EdgeMap<bool>::ValueType val;
     640//        typename Graph::template EdgeMap<bool>::Value val;
    641641//        val=true;
    642 //        typename Graph::template EdgeMap<bool>::KeyType key;
     642//        typename Graph::template EdgeMap<bool>::Key key;
    643643//        key= typename Graph::EdgeIt(G);
    644644//      }
  • src/lemon/concept/graph_component.h

    r986 r987  
    678678      typedef BaseGraphComponent::Edge Edge;
    679679
    680       template <typename Value>
    681       class NodeMap : public ReferenceMap<Node, Value> {
     680      template <typename _Value>
     681      class NodeMap : public ReferenceMap<Node, _Value> {
    682682      public:
    683683        NodeMap(const Graph&) {}
    684         NodeMap(const Graph&, const Value&) {}
     684        NodeMap(const Graph&, const _Value&) {}
    685685        NodeMap(const NodeMap&) {}
    686686
     
    689689      };
    690690
    691       template <typename Value>
    692       class EdgeMap : public ReferenceMap<Edge, Value> {
     691      template <typename _Value>
     692      class EdgeMap : public ReferenceMap<Edge, _Value> {
    693693      public:
    694694        EdgeMap(const Graph&) {}
    695         EdgeMap(const Graph&, const Value&) {}
     695        EdgeMap(const Graph&, const _Value&) {}
    696696        EdgeMap(const EdgeMap&) {}
    697697
  • src/lemon/concept/maps.h

    r959 r987  
    3737    public:
    3838      /// Map's key type.
    39       typedef K KeyType;   
    40       /// Map's value type. (The type of objects associated with the keys).
    41       typedef T ValueType;
     39      typedef K Key;   
     40      /// Map's value type. (The type of objects associated with the keys).
     41      typedef T Value;
    4242
    4343      /// Returns the value associated with a key.
    44       ValueType operator[](const KeyType &k) const {return ValueType();}
     44      Value operator[](const Key &k) const {return Value();}
    4545
    4646      ///Default constructor
     
    5555    public:
    5656      /// Map's key type.
    57       typedef K KeyType;   
    58       /// Map's value type. (The type of objects associated with the keys).
    59       typedef T ValueType;
     57      typedef K Key;   
     58      /// Map's value type. (The type of objects associated with the keys).
     59      typedef T Value;
    6060
    6161      /// Sets the value associated with a key.
    62       void set(const KeyType &k,const ValueType &t) {}
     62      void set(const Key &k,const Value &t) {}
    6363
    6464      ///Default constructor
     
    7373    public:
    7474      /// Map's key type.
    75       typedef K KeyType;   
    76       /// Map's value type. (The type of objects associated with the keys).
    77       typedef T ValueType;
     75      typedef K Key;   
     76      /// Map's value type. (The type of objects associated with the keys).
     77      typedef T Value;
    7878
    7979      /// Returns the value associated with a key.
    80       ValueType operator[](const KeyType &k) const {return ValueType();}
     80      Value operator[](const Key &k) const {return Value();}
    8181      /// Sets the value associated with a key.
    82       void set(const KeyType &k,const ValueType &t) {}
     82      void set(const Key &k,const Value &t) {}
    8383
    8484      ///Default constructor
     
    9393    public:
    9494      /// Map's key type.
    95       typedef K KeyType;   
    96       /// Map's value type. (The type of objects associated with the keys).
    97       typedef T ValueType;
     95      typedef K Key;   
     96      /// Map's value type. (The type of objects associated with the keys).
     97      typedef T Value;
    9898
    9999    protected:
    100       ValueType tmp;
    101     public:
    102       typedef ValueType& ReferenceType;
     100      Value tmp;
     101    public:
     102      typedef Value& Reference;
    103103      /// Map's const reference type.
    104       typedef const ValueType& ConstReferenceType;
     104      typedef const Value& ConstReference;
    105105
    106106      ///Returns a reference to the value associated to a key.
    107       ReferenceType operator[](const KeyType &i) { return tmp; }
     107      Reference operator[](const Key &i) { return tmp; }
    108108      ///Returns a const reference to the value associated to a key.
    109       ConstReferenceType operator[](const KeyType &i) const
     109      ConstReference operator[](const Key &i) const
    110110      { return tmp; }
    111111      /// Sets the value associated with a key.
    112       void set(const KeyType &k,const ValueType &t) { operator[](k)=t; }
     112      void set(const Key &k,const Value &t) { operator[](k)=t; }
    113113
    114114      ///Default constructor
     
    150150    template<typename ReadMap>
    151151    struct ReadMapConcept {
    152       typedef typename ReadMap::KeyType KeyType;
    153       typedef typename ReadMap::ValueType ValueType;
     152      typedef typename ReadMap::Key Key;
     153      typedef typename ReadMap::Value Value;
    154154
    155155      void constraints() {
    156156        // No constraints for constructor.
    157157
    158         // What are the requirement for the ValueType?
     158        // What are the requirement for the Value?
    159159        // CopyConstructible? Assignable? None of these?
    160         ValueType v = m[k];
     160        Value v = m[k];
    161161        v = m[k];
    162162
     
    166166
    167167      ReadMap m;
    168       KeyType k;
     168      Key k;
    169169    };
    170170
    171171    template<typename WriteMap>
    172172    struct WriteMapConcept {
    173       typedef typename WriteMap::KeyType KeyType;
    174       typedef typename WriteMap::ValueType ValueType;
     173      typedef typename WriteMap::Key Key;
     174      typedef typename WriteMap::Value Value;
    175175
    176176      void constraints() {
     
    181181
    182182      WriteMap m;
    183       KeyType k;
    184       ValueType v;
     183      Key k;
     184      Value v;
    185185    };
    186186
     
    195195    template<typename ReferenceMap>
    196196    struct ReferenceMapConcept {
    197       typedef typename ReferenceMap::KeyType KeyType;
    198       typedef typename ReferenceMap::ValueType ValueType;
    199       typedef typename ReferenceMap::ReferenceType ReferenceType;
     197      typedef typename ReferenceMap::Key Key;
     198      typedef typename ReferenceMap::Value Value;
     199      typedef typename ReferenceMap::Reference Reference;
    200200
    201201      // What for is this?
    202       typedef typename ReferenceMap::ConstReferenceType ConstReferenceType;
     202      typedef typename ReferenceMap::ConstReference ConstReference;
    203203
    204204      void constraints() {
     
    208208        // Or should we require real reference?
    209209        // Like this:
    210         // ValueType &vv = m[k];
     210        // Value &vv = m[k];
    211211        // ignore_unused_variable_warning(vv);
    212212      }
    213213
    214214      ReferenceMap m;
    215       KeyType k;
    216       ValueType v;
     215      Key k;
     216      Value v;
    217217    };
    218218
     
    236236      const GraphMap &c;
    237237      const Graph &g;
    238       const typename GraphMap::ValueType &t;
     238      const typename GraphMap::Value &t;
    239239    };
    240240   
Note: See TracChangeset for help on using the changeset viewer.