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