| 1 | 1 |
EXTRA_DIST += \ |
| 2 | 2 |
lemon/lemon.pc.in \ |
| 3 | 3 |
lemon/CMakeLists.txt |
| 4 | 4 |
|
| 5 | 5 |
pkgconfig_DATA += lemon/lemon.pc |
| 6 | 6 |
|
| 7 | 7 |
lib_LTLIBRARIES += lemon/libemon.la |
| 8 | 8 |
|
| 9 | 9 |
lemon_libemon_la_SOURCES = \ |
| 10 | 10 |
lemon/arg_parser.cc \ |
| 11 | 11 |
lemon/base.cc \ |
| 12 | 12 |
lemon/color.cc \ |
| 13 | 13 |
lemon/lp_base.cc \ |
| 14 | 14 |
lemon/lp_skeleton.cc \ |
| 15 | 15 |
lemon/random.cc \ |
| 16 | 16 |
lemon/bits/windows.cc |
| 17 | 17 |
|
| 18 |
|
|
| 18 |
nodist_lemon_HEADERS = lemon/config.h |
|
| 19 |
|
|
| 19 | 20 |
lemon_libemon_la_CXXFLAGS = \ |
| 20 | 21 |
$(AM_CXXFLAGS) \ |
| 21 | 22 |
$(GLPK_CFLAGS) \ |
| 22 | 23 |
$(CPLEX_CFLAGS) \ |
| 23 | 24 |
$(SOPLEX_CXXFLAGS) \ |
| 24 | 25 |
$(CLP_CXXFLAGS) \ |
| 25 | 26 |
$(CBC_CXXFLAGS) |
| 26 | 27 |
|
| 27 | 28 |
lemon_libemon_la_LDFLAGS = \ |
| 28 | 29 |
$(GLPK_LIBS) \ |
| 29 | 30 |
$(CPLEX_LIBS) \ |
| 30 | 31 |
$(SOPLEX_LIBS) \ |
| 31 | 32 |
$(CLP_LIBS) \ |
| 32 | 33 |
$(CBC_LIBS) |
| 33 | 34 |
|
| 34 | 35 |
if HAVE_GLPK |
| 35 | 36 |
lemon_libemon_la_SOURCES += lemon/glpk.cc |
| 36 | 37 |
endif |
| 37 | 38 |
|
| 38 | 39 |
if HAVE_CPLEX |
| 39 | 40 |
lemon_libemon_la_SOURCES += lemon/cplex.cc |
| 40 | 41 |
endif |
| 41 | 42 |
|
| 42 | 43 |
if HAVE_SOPLEX |
| 43 | 44 |
lemon_libemon_la_SOURCES += lemon/soplex.cc |
| 44 | 45 |
endif |
| 45 | 46 |
|
| 46 | 47 |
if HAVE_CLP |
| 47 | 48 |
lemon_libemon_la_SOURCES += lemon/clp.cc |
| 48 | 49 |
endif |
| 49 | 50 |
|
| 50 | 51 |
if HAVE_CBC |
| 51 | 52 |
lemon_libemon_la_SOURCES += lemon/cbc.cc |
| 52 | 53 |
endif |
| 53 | 54 |
|
| 54 | 55 |
lemon_HEADERS += \ |
| 55 | 56 |
lemon/adaptors.h \ |
| 56 | 57 |
lemon/arg_parser.h \ |
| 57 | 58 |
lemon/assert.h \ |
| 58 | 59 |
lemon/bfs.h \ |
| 59 | 60 |
lemon/bin_heap.h \ |
| 60 | 61 |
lemon/cbc.h \ |
| 61 | 62 |
lemon/circulation.h \ |
| 62 | 63 |
lemon/clp.h \ |
| 63 | 64 |
lemon/color.h \ |
| 64 | 65 |
lemon/concept_check.h \ |
| 65 |
lemon/config.h \ |
|
| 66 | 66 |
lemon/connectivity.h \ |
| 67 | 67 |
lemon/counter.h \ |
| 68 | 68 |
lemon/core.h \ |
| 69 | 69 |
lemon/cplex.h \ |
| 70 | 70 |
lemon/dfs.h \ |
| 71 | 71 |
lemon/dijkstra.h \ |
| 72 | 72 |
lemon/dim2.h \ |
| 73 | 73 |
lemon/dimacs.h \ |
| 74 | 74 |
lemon/edge_set.h \ |
| 75 | 75 |
lemon/elevator.h \ |
| 76 | 76 |
lemon/error.h \ |
| 77 | 77 |
lemon/euler.h \ |
| 78 | 78 |
lemon/full_graph.h \ |
| 79 | 79 |
lemon/glpk.h \ |
| 80 | 80 |
lemon/gomory_hu.h \ |
| 81 | 81 |
lemon/graph_to_eps.h \ |
| 82 | 82 |
lemon/grid_graph.h \ |
| 83 | 83 |
lemon/hypercube_graph.h \ |
| 84 | 84 |
lemon/kruskal.h \ |
| 85 | 85 |
lemon/hao_orlin.h \ |
| 86 | 86 |
lemon/lgf_reader.h \ |
| 87 | 87 |
lemon/lgf_writer.h \ |
| 88 | 88 |
lemon/list_graph.h \ |
| 89 | 89 |
lemon/lp.h \ |
| 90 | 90 |
lemon/lp_base.h \ |
| 91 | 91 |
lemon/lp_skeleton.h \ |
| 92 | 92 |
lemon/list_graph.h \ |
| 93 | 93 |
lemon/maps.h \ |
| 94 | 94 |
lemon/matching.h \ |
| 95 | 95 |
lemon/math.h \ |
| 96 | 96 |
lemon/min_cost_arborescence.h \ |
| 97 | 97 |
lemon/nauty_reader.h \ |
| 98 | 98 |
lemon/network_simplex.h \ |
| 99 | 99 |
lemon/path.h \ |
| 100 | 100 |
lemon/preflow.h \ |
| 101 | 101 |
lemon/radix_sort.h \ |
| 102 | 102 |
lemon/random.h \ |
| 103 | 103 |
lemon/smart_graph.h \ |
| 104 | 104 |
lemon/soplex.h \ |
| 105 | 105 |
lemon/suurballe.h \ |
| 106 | 106 |
lemon/time_measure.h \ |
| 107 | 107 |
lemon/tolerance.h \ |
| 108 | 108 |
lemon/unionfind.h \ |
| 109 | 109 |
lemon/bits/windows.h |
| 110 | 110 |
|
| 111 | 111 |
bits_HEADERS += \ |
| 112 | 112 |
lemon/bits/alteration_notifier.h \ |
| 113 | 113 |
lemon/bits/array_map.h \ |
| 1 | 1 |
/* -*- mode: C++; indent-tabs-mode: nil; -*- |
| 2 | 2 |
* |
| 3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
| 4 | 4 |
* |
| 5 | 5 |
* Copyright (C) 2003-2009 |
| 6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
| 7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
| 8 | 8 |
* |
| 9 | 9 |
* Permission to use, modify and distribute this software is granted |
| 10 | 10 |
* provided that this copyright notice appears in all copies. For |
| 11 | 11 |
* precise terms see the accompanying LICENSE file. |
| 12 | 12 |
* |
| 13 | 13 |
* This software is provided "AS IS" with no warranty of any kind, |
| 14 | 14 |
* express or implied, and with no claim as to its suitability for any |
| 15 | 15 |
* purpose. |
| 16 | 16 |
* |
| 17 | 17 |
*/ |
| 18 | 18 |
|
| 19 | 19 |
#ifndef LEMON_CORE_H |
| 20 | 20 |
#define LEMON_CORE_H |
| 21 | 21 |
|
| 22 | 22 |
#include <vector> |
| 23 | 23 |
#include <algorithm> |
| 24 | 24 |
|
| 25 |
#include <lemon/ |
|
| 25 |
#include <lemon/config.h> |
|
| 26 | 26 |
#include <lemon/bits/enable_if.h> |
| 27 | 27 |
#include <lemon/bits/traits.h> |
| 28 | 28 |
#include <lemon/assert.h> |
| 29 | 29 |
|
| 30 | 30 |
///\file |
| 31 | 31 |
///\brief LEMON core utilities. |
| 32 | 32 |
/// |
| 33 | 33 |
///This header file contains core utilities for LEMON. |
| 34 | 34 |
///It is automatically included by all graph types, therefore it usually |
| 35 | 35 |
///do not have to be included directly. |
| 36 | 36 |
|
| 37 | 37 |
namespace lemon {
|
| 38 | 38 |
|
| 39 | 39 |
/// \brief Dummy type to make it easier to create invalid iterators. |
| 40 | 40 |
/// |
| 41 | 41 |
/// Dummy type to make it easier to create invalid iterators. |
| 42 | 42 |
/// See \ref INVALID for the usage. |
| 43 | 43 |
struct Invalid {
|
| 44 | 44 |
public: |
| 45 | 45 |
bool operator==(Invalid) { return true; }
|
| 46 | 46 |
bool operator!=(Invalid) { return false; }
|
| 47 | 47 |
bool operator< (Invalid) { return false; }
|
| 48 | 48 |
}; |
| 49 | 49 |
|
| 50 | 50 |
/// \brief Invalid iterators. |
| 51 | 51 |
/// |
| 52 | 52 |
/// \ref Invalid is a global type that converts to each iterator |
| 53 | 53 |
/// in such a way that the value of the target iterator will be invalid. |
| 54 | 54 |
#ifdef LEMON_ONLY_TEMPLATES |
| 55 | 55 |
const Invalid INVALID = Invalid(); |
| 56 | 56 |
#else |
| 57 | 57 |
extern const Invalid INVALID; |
| 58 | 58 |
#endif |
| 59 | 59 |
|
| 60 | 60 |
/// \addtogroup gutils |
| 61 | 61 |
/// @{
|
| 62 | 62 |
|
| 63 | 63 |
///Create convenience typedefs for the digraph types and iterators |
| 64 | 64 |
|
| 65 | 65 |
///This \c \#define creates convenient type definitions for the following |
| 66 | 66 |
///types of \c Digraph: \c Node, \c NodeIt, \c Arc, \c ArcIt, \c InArcIt, |
| 67 | 67 |
///\c OutArcIt, \c BoolNodeMap, \c IntNodeMap, \c DoubleNodeMap, |
| 68 | 68 |
///\c BoolArcMap, \c IntArcMap, \c DoubleArcMap. |
| 69 | 69 |
/// |
| 70 | 70 |
///\note If the graph type is a dependent type, ie. the graph type depend |
| 71 | 71 |
///on a template parameter, then use \c TEMPLATE_DIGRAPH_TYPEDEFS() |
| 72 | 72 |
///macro. |
| 73 | 73 |
#define DIGRAPH_TYPEDEFS(Digraph) \ |
0 comments (0 inline)