COIN-OR::LEMON - Graph Library

Changeset 286:d3c4d99860a9 in lemon-0.x


Ignore:
Timestamp:
04/03/04 22:33:05 (16 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@402
Message:

Miscellaneous maps, early version
skeletons/maps.h: minor bug

Location:
src
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/include/skeletons/maps.h

    r284 r286  
    7979      /// assigns to them a default value (optional)
    8080      template<typename T1>
    81       ReadWritableMap(const ReadWritableMap<K,T1> &map, const T1 &v) {}
     81      ReadWritableMap(const ReadWritableMap<K,T1> &map, const ValueType &v) {}
    8282
    8383      ReadWritableMap() {}
     
    120120      /// assigns to them a default value (optional)
    121121      template<typename T1>
    122       DereferableMap(const DereferableMap<K,T1> &map, const T1 &v) {}
     122      DereferableMap(const DereferableMap<K,T1> &map, const ValueType &v) {}
    123123
    124124      DereferableMap() {}
  • src/work/klao/map_test.cc

    r283 r286  
    11#include <iostream>
    22
    3 #include <skeletons/maps.h>
     3#include <maps.h>
    44
    55using namespace std;
    6 using namespace hugo::skeleton;
     6using namespace hugo;
    77
    88int main()
    99{
    10   ReadableMap<int, char> a;
     10  ConstMap<int, char> a('#');
    1111
    12   cout << sizeof a << endl;
     12  cout << "sizeof ConstMap<int,char> = " << sizeof a << endl;
     13  cout << "a[5] = " << a[5] << endl;
    1314
     15  StdMap<int, char> b('$');
     16  cout << "sizeof ConstMap<int,char> = " << sizeof b << endl;
     17  cout << "sizeof std::map<int,char> = "
     18       << sizeof(std::map<int,char>) << endl;
     19  cout << "b[5] = " << b[5] << endl;
     20
     21  b[5]='l';
     22  cout << "b[5] = " << b[5] << endl;
    1423}
Note: See TracChangeset for help on using the changeset viewer.