COIN-OR::LEMON - Graph Library

Changeset 172:c645f4a2a6ae in lemon-0.x for src/work


Ignore:
Timestamp:
03/11/04 20:24:28 (20 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@245
Message:

Uj kupac nevezektan

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/bin_heap_demo.cc

    r105 r172  
    2626    return operator[](s);
    2727  }
    28   void put(const string &s, int i) {
     28  void set(const string &s, int i) {
    2929      operator[](s) = i;
    3030  }
     
    4646  heap.push("alma", 15);
    4747
    48   cout << "heap.put(\"korte\", 3.4);\n";
    49   heap.put("korte", 3.4);
     48  cout << "heap.set(\"korte\", 3.4);\n";
     49  heap.set("korte", 3.4);
    5050
    5151  cout << "heap.get(\"alma\") = "
     
    5555  cout << "heap.top() = "
    5656       << heap.top() << endl;
    57   cout << "heap.topValue() = "
    58        << heap.topValue() << endl;
     57  cout << "heap.topPrio() = "
     58       << heap.topPrio() << endl;
    5959
    6060  cout << "heap.decrease(\"alma\", 1.2);\n";
    61   heap.put("alma", 1.2);
     61  heap.set("alma", 1.2);
    6262
    6363  cout << "heap.top() = "
    6464       << heap.top() << endl;
    65   cout << "heap.topValue() = "
    66        << heap.topValue() << endl;
     65  cout << "heap.topPrio() = "
     66       << heap.topPrio() << endl;
    6767
    68   cout << "heap.put(\"alma\", 22);\n";
    69   heap.put("alma", 22);
     68  cout << "heap.set(\"alma\", 22);\n";
     69  heap.set("alma", 22);
    7070
    7171  cout << "heap.top() = "
    7272       << heap.top() << endl;
    73   cout << "heap.topValue() = "
    74        << heap.topValue() << endl;
     73  cout << "heap.topPrio() = "
     74       << heap.topPrio() << endl;
    7575
    7676  cout << "heap.size() = "
     
    8181  cout << "heap.top() = "
    8282       << heap.top() << endl;
    83   cout << "heap.topValue() = "
    84        << heap.topValue() << endl;
     83  cout << "heap.topPrio() = "
     84       << heap.topPrio() << endl;
    8585
    8686  cout << "heap.state(\"szilva\") = "
    8787       << heap.state("szilva") << endl;
    88   cout << "heap.put(\"szilva\", 0.5);\n";
    89   heap.put("szilva", 0.5);
     88  cout << "heap.set(\"szilva\", 0.5);\n";
     89  heap.set("szilva", 0.5);
    9090  cout << "heap.state(\"szilva\") = "
    9191       << heap.state("szilva") << endl;
Note: See TracChangeset for help on using the changeset viewer.