kruskalbox.h
author ladanyi
Wed, 10 Jan 2007 14:37:46 +0000
changeset 184 4e8704aae278
parent 125 e8bf8bbcf75a
child 194 6b2b718420eb
permissions -rw-r--r--
Added support for setting the background form an image file.
     1 /* -*- C++ -*-
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library
     4  *
     5  * Copyright (C) 2003-2006
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    11  * precise terms see the accompanying LICENSE file.
    12  *
    13  * This software is provided "AS IS" with no warranty of any kind,
    14  * express or implied, and with no claim as to its suitability for any
    15  * purpose.
    16  *
    17  */
    18 
    19 #ifndef KRUSKALBOX_H
    20 #define KRUSKALBOX_H
    21 
    22 class KruskalBox;
    23 
    24 #include <all_include.h>
    25 #include <algobox.h>
    26 #include <lemon/kruskal.h>
    27 #include <libgnomecanvasmm.h>
    28 #include <libgnomecanvasmm/polygon.h>
    29 
    30 ///Graphical interface to run Kruskal algorithm.
    31 
    32 ///Child of \ref AlgoBox,
    33 ///therefore the only task to do at implementation was to
    34 ///
    35 ///-call init function with correct parameters from correctly parametrized constructor
    36 ///
    37 ///-implement \ref build_box function
    38 ///
    39 ///-implement \ref run function
    40 class KruskalBox : public AlgoBox
    41 {
    42   ///Shows result of Kruskal algorithm
    43   Gtk::Label resultlabel;
    44 
    45 public:
    46   ///Calls \ref AlgoBox::init function to initialize class properly, automatically.
    47   KruskalBox(std::vector<std::string> t);
    48 
    49   ///Prepare, run and postprocess Kruskal algorithm.
    50 
    51   ///\ref glemon works only with maps filled with double values
    52   ///at the moment. While Kruskal nedds a bool map as output.
    53   ///As postprocess this bool map should be transformed to
    54   ///double map.
    55   void run();
    56 
    57   ///Builds the graphical design of the interface.
    58   void build_box();
    59 };
    60 #endif //KRUSKALBOX_H