mcb LEDA Extension Package  0.8
arithm.h
Go to the documentation of this file.
1 
2 //
3 // This program can be freely used in an academic environment
4 // ONLY for research purposes, subject to the following restrictions:
5 //
6 // 1. The origin of this software must not be misrepresented; you must not
7 // claim that you wrote the original software. If you use this software
8 // an acknowledgment in the product documentation is required.
9 // 2. Altered source versions must be plainly marked as such, and must not be
10 // misrepresented as being the original software.
11 // 3. This notice may not be removed or altered from any source distribution.
12 //
13 // Any other use is strictly prohibited by the author, without an explicit
14 // permission.
15 //
16 // Note that this program uses the LEDA library, which is NOT free. For more
17 // details visit Algorithmic Solutions at http://www.algorithmic-solutions.com/
18 // There is also a free version of LEDA 6.0 or newer.
19 //
20 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
21 // ! Any commercial use of this software is strictly !
22 // ! prohibited without explicit permission by the !
23 // ! author. !
24 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25 //
26 // This software is distributed in the hope that it will be useful,
27 // but WITHOUT ANY WARRANTY; without even the implied warranty of
28 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29 //
30 // Copyright (C) 2004-2008 - Dimitrios Michail <dimitrios.michail@gmail.com>
31 //
32 
37 #ifndef ARITHM_H
38 #define ARITHM_H
39 
40 #include <LEP/mcb/config.h>
41 
42 #ifdef LEDA_GE_V5
43 #include <LEDA/numbers/integer.h>
44 #else
45 #include <LEDA/integer.h>
46 #endif
47 
48 namespace mcb {
49 
50 // define the types used in our implementation
51 
54 typedef int indextype;
55 typedef short etype;
58 typedef leda::integer ptype;
59 
60 // give compare for ptype inside mcb namespace
61 inline int compare(const ptype& x, const ptype& y)
62 {
63  if (x < y) return -1;
64  else if (x > y) return 1;
65  else return 0;
66 }
67 
68 } // end of namespace mcb
69 
70 #endif // ARITHM_H
71 
72 /* ex: set ts=8 sw=4 sts=4 noet: */
73 
74 
75 
The main package namespace.
int indextype
Definition: arithm.h:54
leda::integer ptype
Definition: arithm.h:58