COIN-OR::LEMON - Graph Library

source: glemon-0.x/dijkstrabox.h

Last change on this file was 174:95872af46fc4, checked in by Alpar Juttner, 13 years ago

Add copyright headers

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