src/work/akos/simann_demo.cc
author hegyi
Fri, 01 Apr 2005 09:43:52 +0000
changeset 1288 6cc7b573b7b5
parent 1023 3268fef5d623
permissions -rw-r--r--
Graph displayer is now displaying nodes. Edges remain still undisplayed yet.
ladanyi@960
     1
#include "simann.h"
ladanyi@960
     2
ladanyi@960
     3
using namespace lemon;
ladanyi@960
     4
ladanyi@960
     5
class MyEntity {
ladanyi@960
     6
public:
ladanyi@1023
     7
  double getCost() { return 10.0; }
ladanyi@1023
     8
  void mutate() {}
ladanyi@960
     9
  void revert() {}
ladanyi@960
    10
};
ladanyi@960
    11
ladanyi@960
    12
int main() {
ladanyi@1096
    13
  /*
ladanyi@960
    14
  SimAnn<MyEntity> simann;
ladanyi@960
    15
  SimpleController ctrl;
ladanyi@960
    16
  simann.setController(ctrl);
ladanyi@960
    17
  MyEntity ent;
ladanyi@960
    18
  simann.setEntity(ent);
ladanyi@960
    19
  simann.run();
ladanyi@1096
    20
  */
ladanyi@999
    21
ladanyi@999
    22
  SimAnn<MyEntity> simann2;
ladanyi@1096
    23
  AdvancedController ctrl2(10.0);
ladanyi@999
    24
  simann2.setController(ctrl2);
ladanyi@999
    25
  MyEntity ent2;
ladanyi@999
    26
  simann2.setEntity(ent2);
ladanyi@999
    27
  simann2.run();
ladanyi@960
    28
}