test/unionfind_test.cc
changeset 298 74eb8b425d82
parent 171 02f4d5d9bfd7
child 463 88ed40ad0d4f
equal deleted inserted replaced
2:4de5820fe583 3:999a8c582ab7
     1 /* -*- C++ -*-
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     2  *
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library
     3  * This file is a part of LEMON, a generic C++ optimization library.
     4  *
     4  *
     5  * Copyright (C) 2003-2008
     5  * Copyright (C) 2003-2008
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     8  *
    29 int main() {
    29 int main() {
    30   ListGraph g;
    30   ListGraph g;
    31   ListGraph::NodeMap<int> base(g);
    31   ListGraph::NodeMap<int> base(g);
    32   UFE U(base);
    32   UFE U(base);
    33   vector<ListGraph::Node> n;
    33   vector<ListGraph::Node> n;
    34   
    34 
    35   for(int i=0;i<20;i++) n.push_back(g.addNode());
    35   for(int i=0;i<20;i++) n.push_back(g.addNode());
    36 
    36 
    37   U.insert(n[1]);
    37   U.insert(n[1]);
    38   U.insert(n[2]);
    38   U.insert(n[2]);
    39 
    39