COIN-OR::LEMON - Graph Library

source: glemon-0.x/dijkstrabox.h @ 197:c1084e2bff10

Last change on this file since 197:c1084e2bff10 was 194:6b2b718420eb, checked in by Hegyi Péter, 17 years ago

Header reorganising

File size: 2.2 KB
Line 
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 DIJKSTRABOX_H
20#define DIJKSTRABOX_H
21
22class AlgoBox;
23
24#include <all_include.h>
25#include <libgnomecanvasmm.h>
26#include <libgnomecanvasmm/polygon.h>
27
28///Graphical interface to run Dijkstra algorithm.
29
30///Child of \ref AlgoBox,
31///therefore the only task to do at implementation was to
32///
33///-call init function with correct parameters from correctly parametrized constructor
34///
35///-implement \ref build_box function
36///
37///-implement \ref run function
38class DijkstraBox : public AlgoBox
39{
40protected:
41  ///Shows result of Dijkstra algorithm
42  Gtk::Label resultlabel;
43
44
45  ///Table for nodeselector widgets
46  Gtk::Table table;
47
48  ///Combobox for select source node
49  Gtk::ComboBoxText source;
50
51  ///Combobox for select target node
52  Gtk::ComboBoxText target;
53
54  ///Gets to and from node from combobox
55  void get_from_to(Node &, Node &, Graph &);
56
57public:
58  ///Calls \ref AlgoBox::init function to initialize class properly, automatically.
59  DijkstraBox(std::vector<std::string> t);
60
61  ///Prepare, run and postprocess Dijkstra algorithm.
62
63  ///\ref glemon works only with maps filled with double values
64  ///at the moment. While Dijkstra nedds a bool map as output.
65  ///As postprocess this bool map should be transformed to
66  ///double map.
67  virtual void run();
68
69  ///Builds the graphical design of the interface.
70  virtual void build_box();
71
72  void maplists_updated();
73};
74
75class SuurballeBox : public DijkstraBox
76{
77  ///number of paths to find
78  int num;
79 
80  ///Widget to set numbewr of paths to find
81  Gtk::SpinButton * num_set;
82
83  ///Holder widget
84  Gtk::HBox hbox;
85
86public:
87  SuurballeBox(std::vector<std::string> t);
88  void run();
89  void build_box();
90};
91#endif //DIJKSTRABOX_H
Note: See TracBrowser for help on using the repository browser.