0
12
0
| ... | ... |
@@ -2,13 +2,13 @@ |
| 2 | 2 |
|
| 3 | 3 |
#EXECUTE_PROCESS( |
| 4 | 4 |
# COMMAND hg id -i |
| 5 | 5 |
# OUTPUT_VARIABLE HG_REVISION |
| 6 | 6 |
# OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 7 | 7 |
|
| 8 |
SET(PROJECT_NAME " |
|
| 8 |
SET(PROJECT_NAME "LEMON") |
|
| 9 | 9 |
SET(PROJECT_VERSION_MAJOR "0") |
| 10 | 10 |
SET(PROJECT_VERSION_MINOR "99") |
| 11 | 11 |
SET(PROJECT_VERSION_PATCH "0") |
| 12 | 12 |
SET(PROJECT_VERSION |
| 13 | 13 |
"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
| 14 | 14 |
|
| ... | ... |
@@ -33,13 +33,13 @@ |
| 33 | 33 |
|
| 34 | 34 |
IF(WIN32) |
| 35 | 35 |
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
|
| 36 | 36 |
SET(CPACK_PACKAGE_VENDOR |
| 37 | 37 |
"EGRES - Egervary Research Group on Combinatorial Optimization") |
| 38 | 38 |
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
| 39 |
" |
|
| 39 |
"LEMON - Library of Efficient Models and Optimization in Networks") |
|
| 40 | 40 |
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
| 41 | 41 |
|
| 42 | 42 |
SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
| 43 | 43 |
SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
| 44 | 44 |
SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
| 45 | 45 |
SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
| ... | ... |
@@ -54,28 +54,28 @@ |
| 54 | 54 |
|
| 55 | 55 |
#SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers") |
| 56 | 56 |
#SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Static library") |
| 57 | 57 |
#SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation") |
| 58 | 58 |
|
| 59 | 59 |
#SET(CPACK_COMPONENT_HEADERS_DESCRIPTION |
| 60 |
# "C++ header files for use with the |
|
| 60 |
# "C++ header files for use with the LEMON library") |
|
| 61 | 61 |
#SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION |
| 62 |
# "Static library used to build programs with |
|
| 62 |
# "Static library used to build programs with LEMON") |
|
| 63 | 63 |
#SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION |
| 64 | 64 |
# "Doxygen generated documentation") |
| 65 | 65 |
|
| 66 | 66 |
#SET(CPACK_COMPONENT_HEADERS_DEPENDS library) |
| 67 | 67 |
|
| 68 | 68 |
#SET(CPACK_COMPONENT_HEADERS_GROUP "Development") |
| 69 | 69 |
#SET(CPACK_COMPONENT_LIBRARY_GROUP "Development") |
| 70 | 70 |
#SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation") |
| 71 | 71 |
|
| 72 | 72 |
#SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION |
| 73 |
# "Components needed to develop software using |
|
| 73 |
# "Components needed to develop software using LEMON") |
|
| 74 | 74 |
#SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION |
| 75 |
# "Documentation of |
|
| 75 |
# "Documentation of LEMON") |
|
| 76 | 76 |
|
| 77 | 77 |
#SET(CPACK_ALL_INSTALL_TYPES Full Developer) |
| 78 | 78 |
|
| 79 | 79 |
#SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) |
| 80 | 80 |
#SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full) |
| 81 | 81 |
#SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full) |
| ... | ... |
@@ -3,13 +3,13 @@ |
| 3 | 3 |
dnl Version information. |
| 4 | 4 |
m4_define([lemon_version_number], []) |
| 5 | 5 |
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))]) |
| 6 | 6 |
m4_define([lemon_version], [ifelse(lemon_version_number(), [], [lemon_hg_revision()], [lemon_version_number()])]) |
| 7 | 7 |
|
| 8 | 8 |
AC_PREREQ([2.59]) |
| 9 |
AC_INIT([ |
|
| 9 |
AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon]) |
|
| 10 | 10 |
AC_CONFIG_AUX_DIR([build-aux]) |
| 11 | 11 |
AC_CONFIG_MACRO_DIR([m4]) |
| 12 | 12 |
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc]) |
| 13 | 13 |
AC_CONFIG_SRCDIR([lemon/list_graph.h]) |
| 14 | 14 |
AC_CONFIG_HEADERS([config.h lemon/config.h]) |
| 15 | 15 |
| ... | ... |
@@ -322,13 +322,13 @@ |
| 322 | 322 |
graphs. The matching problems in bipartite graphs are generally |
| 323 | 323 |
easier than in general graphs. The goal of the matching optimization |
| 324 | 324 |
can be the finding maximum cardinality, maximum weight or minimum cost |
| 325 | 325 |
matching. The search can be constrained to find perfect or |
| 326 | 326 |
maximum cardinality matching. |
| 327 | 327 |
|
| 328 |
|
|
| 328 |
LEMON contains the next algorithms: |
|
| 329 | 329 |
- \ref lemon::MaxBipartiteMatching "MaxBipartiteMatching" Hopcroft-Karp |
| 330 | 330 |
augmenting path algorithm for calculate maximum cardinality matching in |
| 331 | 331 |
bipartite graphs |
| 332 | 332 |
- \ref lemon::PrBipartiteMatching "PrBipartiteMatching" Push-Relabel |
| 333 | 333 |
algorithm for calculate maximum cardinality matching in bipartite graphs |
| 334 | 334 |
- \ref lemon::MaxWeightedBipartiteMatching "MaxWeightedBipartiteMatching" |
| ... | ... |
@@ -473,18 +473,18 @@ |
| 473 | 473 |
This group describes the tools for importing and exporting graphs |
| 474 | 474 |
and graph related data. Now it supports the LEMON format, the |
| 475 | 475 |
\c DIMACS format and the encapsulated postscript (EPS) format. |
| 476 | 476 |
*/ |
| 477 | 477 |
|
| 478 | 478 |
/** |
| 479 |
@defgroup lemon_io |
|
| 479 |
@defgroup lemon_io LEMON Input-Output |
|
| 480 | 480 |
@ingroup io_group |
| 481 |
\brief Reading and writing \ref lgf-format " |
|
| 481 |
\brief Reading and writing \ref lgf-format "LEMON Graph Format". |
|
| 482 | 482 |
|
| 483 | 483 |
This group describes methods for reading and writing |
| 484 |
\ref lgf-format " |
|
| 484 |
\ref lgf-format "LEMON Graph Format". |
|
| 485 | 485 |
*/ |
| 486 | 486 |
|
| 487 | 487 |
/** |
| 488 | 488 |
@defgroup eps_io Postscript exporting |
| 489 | 489 |
@ingroup io_group |
| 490 | 490 |
\brief General \c EPS drawer and graph exporter |
| ... | ... |
@@ -18,13 +18,13 @@ |
| 18 | 18 |
|
| 19 | 19 |
namespace lemon {
|
| 20 | 20 |
/*! |
| 21 | 21 |
|
| 22 | 22 |
|
| 23 | 23 |
|
| 24 |
\page lgf-format |
|
| 24 |
\page lgf-format LEMON Graph Format (LGF) |
|
| 25 | 25 |
|
| 26 | 26 |
The \e LGF is a <em>column oriented</em> |
| 27 | 27 |
file format for storing graphs and associated data like |
| 28 | 28 |
node and edge maps. |
| 29 | 29 |
|
| 30 | 30 |
Each line with \c '#' first non-whitespace |
| ... | ... |
@@ -38,13 +38,13 @@ |
| 38 | 38 |
/// The simple graph's can be refered as two containers, one node container |
| 39 | 39 |
/// and one edge container. But they are not standard containers they |
| 40 | 40 |
/// does not store values directly they are just key continars for more |
| 41 | 41 |
/// value containers which are the node and edge maps. |
| 42 | 42 |
/// |
| 43 | 43 |
/// The graph's node and edge sets can be changed as we add or erase |
| 44 |
/// nodes and edges in the graph. |
|
| 44 |
/// nodes and edges in the graph. LEMON would like to handle easily |
|
| 45 | 45 |
/// that the node and edge maps should contain values for all nodes or |
| 46 | 46 |
/// edges. If we want to check on every indicing if the map contains |
| 47 | 47 |
/// the current indicing key that cause a drawback in the performance |
| 48 | 48 |
/// in the library. We use another solution we notify all maps about |
| 49 | 49 |
/// an alteration in the graph, which cause only drawback on the |
| 50 | 50 |
/// alteration of the graph. |
| ... | ... |
@@ -74,13 +74,13 @@ |
| 74 | 74 |
/// Returns whether the path is empty. |
| 75 | 75 |
bool empty() const { return true;}
|
| 76 | 76 |
|
| 77 | 77 |
/// Resets the path to an empty path. |
| 78 | 78 |
void clear() {}
|
| 79 | 79 |
|
| 80 |
/// \brief |
|
| 80 |
/// \brief LEMON style iterator for path arcs |
|
| 81 | 81 |
/// |
| 82 | 82 |
/// This class is used to iterate on the arcs of the paths. |
| 83 | 83 |
class ArcIt {
|
| 84 | 84 |
public: |
| 85 | 85 |
/// Default constructor |
| 86 | 86 |
ArcIt() {}
|
| ... | ... |
@@ -197,13 +197,13 @@ |
| 197 | 197 |
/// path type. |
| 198 | 198 |
/// |
| 199 | 199 |
/// The main purpose of this concept is that the shortest path |
| 200 | 200 |
/// algorithms can enumerate easily the arcs in reverse order. |
| 201 | 201 |
/// If we would like to give back a real path from these |
| 202 | 202 |
/// algorithms then we should create a temporarly path object. In |
| 203 |
/// |
|
| 203 |
/// LEMON such algorithms gives back a path dumper what can |
|
| 204 | 204 |
/// assigned to a real path and the dumpers can be implemented as |
| 205 | 205 |
/// an adaptor class to the predecessor map. |
| 206 | 206 |
|
| 207 | 207 |
/// \tparam _Digraph The digraph type in which the path is. |
| 208 | 208 |
/// |
| 209 | 209 |
/// The paths can be constructed from any path type by a |
| ... | ... |
@@ -229,13 +229,13 @@ |
| 229 | 229 |
/// If the RevPathTag is defined and true then reverse dumping |
| 230 | 230 |
/// is provided in the path dumper. In this case instead of the |
| 231 | 231 |
/// ArcIt the RevArcIt iterator should be implemented in the |
| 232 | 232 |
/// dumper. |
| 233 | 233 |
typedef False RevPathTag; |
| 234 | 234 |
|
| 235 |
/// \brief |
|
| 235 |
/// \brief LEMON style iterator for path arcs |
|
| 236 | 236 |
/// |
| 237 | 237 |
/// This class is used to iterate on the arcs of the paths. |
| 238 | 238 |
class ArcIt {
|
| 239 | 239 |
public: |
| 240 | 240 |
/// Default constructor |
| 241 | 241 |
ArcIt() {}
|
| ... | ... |
@@ -256,13 +256,13 @@ |
| 256 | 256 |
bool operator!=(const ArcIt&) const {return true;}
|
| 257 | 257 |
/// Comparison operator |
| 258 | 258 |
bool operator<(const ArcIt&) const {return false;}
|
| 259 | 259 |
|
| 260 | 260 |
}; |
| 261 | 261 |
|
| 262 |
/// \brief |
|
| 262 |
/// \brief LEMON style iterator for path arcs |
|
| 263 | 263 |
/// |
| 264 | 264 |
/// This class is used to iterate on the arcs of the paths in |
| 265 | 265 |
/// reverse direction. |
| 266 | 266 |
class RevArcIt {
|
| 267 | 267 |
public: |
| 268 | 268 |
/// Default constructor |
| ... | ... |
@@ -15,13 +15,13 @@ |
| 15 | 15 |
* purpose. |
| 16 | 16 |
* |
| 17 | 17 |
*/ |
| 18 | 18 |
|
| 19 | 19 |
///\ingroup lemon_io |
| 20 | 20 |
///\file |
| 21 |
///\brief \ref lgf-format " |
|
| 21 |
///\brief \ref lgf-format "LEMON Graph Format" reader. |
|
| 22 | 22 |
|
| 23 | 23 |
|
| 24 | 24 |
#ifndef LEMON_LGF_READER_H |
| 25 | 25 |
#define LEMON_LGF_READER_H |
| 26 | 26 |
|
| 27 | 27 |
#include <iostream> |
| ... | ... |
@@ -2298,13 +2298,13 @@ |
| 2298 | 2298 |
|
| 2299 | 2299 |
/// \ingroup lemon_io |
| 2300 | 2300 |
/// |
| 2301 | 2301 |
/// \brief Reader for the contents of the \ref lgf-format "LGF" file |
| 2302 | 2302 |
/// |
| 2303 | 2303 |
/// This class can be used to read the sections, the map names and |
| 2304 |
/// the attributes from a file. Usually, the |
|
| 2304 |
/// the attributes from a file. Usually, the LEMON programs know |
|
| 2305 | 2305 |
/// that, which type of graph, which maps and which attributes |
| 2306 | 2306 |
/// should be read from a file, but in general tools (like glemon) |
| 2307 | 2307 |
/// the contents of an LGF file should be guessed somehow. This class |
| 2308 | 2308 |
/// reads the graph and stores the appropriate information for |
| 2309 | 2309 |
/// reading the graph. |
| 2310 | 2310 |
/// |
| ... | ... |
@@ -15,13 +15,13 @@ |
| 15 | 15 |
* purpose. |
| 16 | 16 |
* |
| 17 | 17 |
*/ |
| 18 | 18 |
|
| 19 | 19 |
///\ingroup lemon_io |
| 20 | 20 |
///\file |
| 21 |
///\brief \ref lgf-format " |
|
| 21 |
///\brief \ref lgf-format "LEMON Graph Format" writer. |
|
| 22 | 22 |
|
| 23 | 23 |
|
| 24 | 24 |
#ifndef LEMON_LGF_WRITER_H |
| 25 | 25 |
#define LEMON_LGF_WRITER_H |
| 26 | 26 |
|
| 27 | 27 |
#include <iostream> |
| ... | ... |
@@ -931,13 +931,13 @@ |
| 931 | 931 |
private: |
| 932 | 932 |
|
| 933 | 933 |
|
| 934 | 934 |
std::ostream* _os; |
| 935 | 935 |
bool local_os; |
| 936 | 936 |
|
| 937 |
Graph& _graph; |
|
| 937 |
const Graph& _graph; |
|
| 938 | 938 |
|
| 939 | 939 |
std::string _nodes_caption; |
| 940 | 940 |
std::string _edges_caption; |
| 941 | 941 |
std::string _attributes_caption; |
| 942 | 942 |
|
| 943 | 943 |
typedef std::map<Node, std::string> NodeIndex; |
| ... | ... |
@@ -839,13 +839,15 @@ |
| 839 | 839 |
protected: |
| 840 | 840 |
|
| 841 | 841 |
int id; |
| 842 | 842 |
explicit Arc(int pid) { id = pid;}
|
| 843 | 843 |
|
| 844 | 844 |
public: |
| 845 |
operator Edge() const {
|
|
| 845 |
operator Edge() const {
|
|
| 846 |
return id != -1 ? edgeFromId(id / 2) : INVALID; |
|
| 847 |
} |
|
| 846 | 848 |
|
| 847 | 849 |
Arc() {}
|
| 848 | 850 |
Arc (Invalid) { id = -1; }
|
| 849 | 851 |
bool operator==(const Arc& arc) const {return id == arc.id;}
|
| 850 | 852 |
bool operator!=(const Arc& arc) const {return id != arc.id;}
|
| 851 | 853 |
bool operator<(const Arc& arc) const {return id < arc.id;}
|
| ... | ... |
@@ -79,13 +79,13 @@ |
| 79 | 79 |
template <typename CPath> |
| 80 | 80 |
Path& operator=(const CPath& cpath) {
|
| 81 | 81 |
copyPath(*this, cpath); |
| 82 | 82 |
return *this; |
| 83 | 83 |
} |
| 84 | 84 |
|
| 85 |
/// \brief |
|
| 85 |
/// \brief LEMON style iterator for path arcs |
|
| 86 | 86 |
/// |
| 87 | 87 |
/// This class is used to iterate on the arcs of the paths. |
| 88 | 88 |
class ArcIt {
|
| 89 | 89 |
friend class Path; |
| 90 | 90 |
public: |
| 91 | 91 |
/// \brief Default constructor |
| ... | ... |
@@ -462,13 +462,15 @@ |
| 462 | 462 |
protected: |
| 463 | 463 |
|
| 464 | 464 |
int _id; |
| 465 | 465 |
explicit Arc(int id) { _id = id;}
|
| 466 | 466 |
|
| 467 | 467 |
public: |
| 468 |
operator Edge() const {
|
|
| 468 |
operator Edge() const {
|
|
| 469 |
return _id != -1 ? edgeFromId(_id / 2) : INVALID; |
|
| 470 |
} |
|
| 469 | 471 |
|
| 470 | 472 |
Arc() {}
|
| 471 | 473 |
Arc (Invalid) { _id = -1; }
|
| 472 | 474 |
bool operator==(const Arc& arc) const {return _id == arc._id;}
|
| 473 | 475 |
bool operator!=(const Arc& arc) const {return _id != arc._id;}
|
| 474 | 476 |
bool operator<(const Arc& arc) const {return _id < arc._id;}
|
| ... | ... |
@@ -494,13 +494,13 @@ |
| 494 | 494 |
int fdx = classes[cls].firstItem; |
| 495 | 495 |
unlaceClass(cls); |
| 496 | 496 |
items[items[fdx].prev].next = firstFreeItem; |
| 497 | 497 |
firstFreeItem = fdx; |
| 498 | 498 |
} |
| 499 | 499 |
|
| 500 |
/// \brief |
|
| 500 |
/// \brief LEMON style iterator for the representant items. |
|
| 501 | 501 |
/// |
| 502 | 502 |
/// ClassIt is a lemon style iterator for the components. It iterates |
| 503 | 503 |
/// on the ids of the classes. |
| 504 | 504 |
class ClassIt {
|
| 505 | 505 |
public: |
| 506 | 506 |
/// \brief Constructor of the iterator |
| ... | ... |
@@ -546,13 +546,13 @@ |
| 546 | 546 |
|
| 547 | 547 |
private: |
| 548 | 548 |
const UnionFindEnum* unionFind; |
| 549 | 549 |
int cdx; |
| 550 | 550 |
}; |
| 551 | 551 |
|
| 552 |
/// \brief |
|
| 552 |
/// \brief LEMON style iterator for the items of a component. |
|
| 553 | 553 |
/// |
| 554 | 554 |
/// ClassIt is a lemon style iterator for the components. It iterates |
| 555 | 555 |
/// on the items of a class. By example if you want to iterate on |
| 556 | 556 |
/// each items of each classes then you may write the next code. |
| 557 | 557 |
///\code |
| 558 | 558 |
/// for (ClassIt cit(ufe); cit != INVALID; ++cit) {
|
| ... | ... |
@@ -804,13 +804,13 @@ |
| 804 | 804 |
classes[classes[cdx].next].prev = classes[cdx].prev; |
| 805 | 805 |
} |
| 806 | 806 |
classes[cdx].next = firstFreeClass; |
| 807 | 807 |
firstFreeClass = cdx; |
| 808 | 808 |
} |
| 809 | 809 |
|
| 810 |
/// \brief |
|
| 810 |
/// \brief LEMON style iterator for the classes. |
|
| 811 | 811 |
/// |
| 812 | 812 |
/// ClassIt is a lemon style iterator for the components. It iterates |
| 813 | 813 |
/// on the ids of classes. |
| 814 | 814 |
class ClassIt {
|
| 815 | 815 |
public: |
| 816 | 816 |
/// \brief Constructor of the iterator |
| ... | ... |
@@ -856,13 +856,13 @@ |
| 856 | 856 |
|
| 857 | 857 |
private: |
| 858 | 858 |
const ExtendFindEnum* extendFind; |
| 859 | 859 |
int cdx; |
| 860 | 860 |
}; |
| 861 | 861 |
|
| 862 |
/// \brief |
|
| 862 |
/// \brief LEMON style iterator for the items of a component. |
|
| 863 | 863 |
/// |
| 864 | 864 |
/// ClassIt is a lemon style iterator for the components. It iterates |
| 865 | 865 |
/// on the items of a class. By example if you want to iterate on |
| 866 | 866 |
/// each items of each classes then you may write the next code. |
| 867 | 867 |
///\code |
| 868 | 868 |
/// for (ClassIt cit(ufe); cit != INVALID; ++cit) {
|
| ... | ... |
@@ -1652,13 +1652,13 @@ |
| 1652 | 1652 |
/// \return Gives back a representant item of the class. |
| 1653 | 1653 |
const Item& classRep(int id) const {
|
| 1654 | 1654 |
int parent = classes[id].parent; |
| 1655 | 1655 |
return nodes[parent >= 0 ? classes[id].depth : leftNode(id)].item; |
| 1656 | 1656 |
} |
| 1657 | 1657 |
|
| 1658 |
/// \brief |
|
| 1658 |
/// \brief LEMON style iterator for the items of a class. |
|
| 1659 | 1659 |
/// |
| 1660 | 1660 |
/// ClassIt is a lemon style iterator for the components. It iterates |
| 1661 | 1661 |
/// on the items of a class. By example if you want to iterate on |
| 1662 | 1662 |
/// each items of each classes then you may write the next code. |
| 1663 | 1663 |
///\code |
| 1664 | 1664 |
/// for (ClassIt cit(huf); cit != INVALID; ++cit) {
|
0 comments (0 inline)