src/work/klao/map_test.cc
author alpar
Fri, 23 Jul 2004 17:13:23 +0000
changeset 737 2d867176d10e
parent 286 d3c4d99860a9
child 921 818510fa3d99
permissions -rw-r--r--
Several changes in Kruskal alg.
- Input object interface was changed to an STL compatible one.
- template parameters of class KruskalPairVec has been simplified.
- (the most of) the names meet the naming conventions.
- a lot of (but still not enough) documentation has been added.
- class KruskalMapVec has been commented out.
     1 #include <iostream>
     2 
     3 #include <hugo/maps.h>
     4 
     5 using namespace std;
     6 using namespace hugo;
     7 
     8 int main()
     9 {
    10   ConstMap<int, char> a('#');
    11 
    12   cout << "sizeof ConstMap<int,char> = " << sizeof a << endl;
    13   cout << "a[5] = " << a[5] << endl;
    14 
    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;
    23 }