# Ticket #225: blgf.patch

File blgf.patch, 117.6 KB (added by Frantisek Csajka, 9 years ago)
• ## new file doc/blgf.dox

# HG changeset patch
# User Frantisek Csajka <csferi27@gmail.com>
# Date 1286198489 -7200
# Node ID 454f0c2a380c72615d988f0baa3655301cc7ed11
# Parent  a93f1a27d83125233114f2052c1e523c5e2f26e1
Blgf

diff -r a93f1a27d831 -r 454f0c2a380c doc/blgf.dox
 - /* -*- mode: C++; indent-tabs-mode: nil; -*- * * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * * Permission to use, modify and distribute this software is granted * provided that this copyright notice appears in all copies. For * precise terms see the accompanying LICENSE file. * * This software is provided "AS IS" with no warranty of any kind, * express or implied, and with no claim as to its suitability for any * purpose. * */ namespace lemon { /*! \page blgf-format Binary LEMON Graph Format (BLGF) The \e BLGF is a binary file format for storing graphs and associated data like node and edge maps. Each BLGF file starts with a signature, which are the "BLGF" letters followed by the two digit version number. After that, the file consists of several blocks. Each block is preceded by its type, which is a 2 byte unsigned integer value (UINT16). Currently, there are three types of blocks: - Nodes block - Arcs block - Attributes block Note: There may be several Nodes and Arcs blocks but only one Attributes block. \section Nodes Nodes block This type of block describes a set of nodes and associated maps. It consists of two parts, the header and the data terminated by a null byte. The header contains the name of the block and the number of nodes described (i.e. the item count in each map) stored as a 4 byte unsigned integer (UINT32). The data part contains the maps stored one after the other. The ï¬rst map in the Nodes block is a special one, called \c Label, which contains unique id (label) for each node. When describing end points of an arc, these ids are used to refer to the target and the source node. \c Label map has an empty name (i.e. only NULL byte) and it must not be absent! The order of nodes in each map must be the same (e.g. the i. item in each map describes the node labeled by the i. item in the \c Label map)! \section Arcs Arcs block This type of block is very similar to the Nodes block. It again starts with a header containing the name of the block and the number of items described (i.e. the number of arcs or edges). The diï¬erence between these two types of blocks is the following: the \c Label map is optional here and the ï¬rst map in this block must be the \c From-To map, which contains node pairs describing the source and the destination for each arc. The \c From-To map has also an empty name. If there is a \c Label map in Arcs block, it must be on the second place right after the \c From-To map. As in the Nodes block, the order of the arcs in the maps must be the same! \section Attributes Attributes  block As it was mentioned before, only one Attributes block can take place in the BLGF ï¬le. This block contains a null-terminated sequence of key-value pairs. The Attributes block contains no header, since the name is not necessary, and the type of the values is ï¬xed (STRING). \section Limitations Limitations Compared to LGF, the implementation of BLGF has some limitations: - Using real types with their default value converters, the BLGF becomes portable only on machines with the same memory endianness (i.e. big-endian or little- endian). - Long double type is not supported yet. - The values of the label maps must be fundamental types (integer, real or string). */ } //  LocalWords:  whitespace whitespaces
• ## doc/groups.dox

diff -r a93f1a27d831 -r 454f0c2a380c doc/groups.dox
 a postscript (EPS) format. */ /** @defgroup lemon_io LEMON Graph Format @defgroup lemon_io LEMON Graph Formats @ingroup io_group \brief Reading and writing LEMON Graph Format. \brief Reading and writing LEMON Graph Format and its binary version. This group contains methods for reading and writing \ref lgf-format "LEMON Graph Format". \ref lgf-format "LEMON Graph Format" and \ref blgf-format "Binary LEMON Graph Format". */ /**
• ## new file doc/references.dox

diff -r a93f1a27d831 -r 454f0c2a380c doc/references.dox
 - /** \page references References \section amo93networkflows [AMO93]
Ravindra K. Ahuja, Thomas L. Magnanti, and James B. Orlin. Network Flows: Theory, Algorithms, and Applications. Prentice-Hall, Inc., February 1993.
\section boost [Boost]
Boost C++ Libraries. http://www.boost.org/.
\section bunnagel98efficient [BKV98]
Ursula Bünnagel, Bernhard Korte, and Jens Vygen. Efficient implementation of the Goldberg-Tarjan minimum-cost flow algorithm. Optimization Methods and Software, 10:157-174, 1998.
\section cmake [CMake]
CMake -- Cross Platform Make. http://www.cmake.org/.
\section coinor [COIN-OR]
COIN-OR -- Computational Infrastructure for Operations Research. http://www.coin-or.org/.
\section cplex [CPLEX]
ILOG CPLEX. http://www.ilog.com/.
\section cbc [Cbc]
Cbc -- Coin-Or Branch and Cut. http://projects.coin-or.org/Cbc/.
\section clp [Clp]
Clp -- Coin-Or Linear Programming. http://projects.coin-or.org/Clp/.
\section clrs01algorithms [CLRS01]
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms. The MIT Press, 2nd edition, 2001.
\section dantzig63linearprog [Dan63]
George B. Dantzig. Linear Programming and Extensions. Princeton University Press, 1963.
\section dasdan98minmeancycle [DG98]
Ali Dasdan and Rajesh K. Gupta. Faster maximum and minimum mean cycle alogrithms for system performance analysis. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 17(10):889-899, 1998.
\section dinic70algorithm [Din70]
E. A. Dinic. Algorithm for solution of a problem of maximum flow in a network with power estimation. Soviet Math. Doklady, 11:1277-1280, 1970.
\section doxygen [Doxygen]
Doxygen -- Source code documentation generator tool. http://www.doxygen.org/.
\section egres [EGRES]
EGRES -- Egerváry Research Group on Combinatorial Optimization. http://www.cs.elte.hu/egres/.
\section edmondskarp72theoretical [EK72]
Jack Edmonds and Richard M. Karp. Theoretical improvements in algorithmic efficiency for network flow problems. Journal of the ACM, 19(2):248-264, 1972.
\section glpk [GLPK]
GLPK -- GNU Linear Programming Kit. http://www.gnu.org/software/glpk/.
\section goldberg97efficient [Gol97]
Andrew V. Goldberg. An efficient implementation of a scaling minimum-cost flow algorithm. Journal of Algorithms, 22(1):1-29, 1997.
\section goldberg08partial [Gol08]
Andrew V. Goldberg. The partial augment-relabel algorithm for the maximum flow problem. 16th Annual European Symposium on Algorithms, pages 466-477, 2008.
\section goldberg88newapproach [GT88]
Andrew V. Goldberg and Robert E. Tarjan. A new approach to the maximum flow problem. Journal of the ACM, 35(4):921-940, 1988.
\section goldberg89cyclecanceling [GT89]
Andrew V. Goldberg and Robert E. Tarjan. Finding minimum-cost circulations by canceling negative cycles. Journal of the ACM, 36(4):873-886, 1989.
\section goldberg90approximation [GT90]
Andrew V. Goldberg and Robert E. Tarjan. Finding minimum-cost circulations by successive approximation. Mathematics of Operations Research, 15(3):430-466, 1990.
\section karp78characterization [Kar78]
Richard M. Karp. A characterization of the minimum cycle mean in a digraph. Discrete Math., 23:309-311, 1978.
\section kellyoneill91netsimplex [KO91]
Damian J. Kelly and Garrett M. O'Neill. The minimum cost flow problem and the network simplex method. Master's thesis, University College, Dublin, Ireland, September 1991.
\section klein67primal [Kle67]
Morton Klein. A primal method for minimal cost flows with applications to the assignment and transportation problems. Management Science, 14:205-220, 1967.
\section leda [LEDA]
LEDA -- Library of Efficient Data Types and Algorithms. http://www.algorithmic-solutions.com/.
\section lemon [LEMON]
LEMON -- Library for Efficient Modeling and Optimization in Networks. http://lemon.cs.elte.hu/, 2009.
\section ledabook [MN99]
Kurt Mehlhorn and Stefan Näher. LEDA: A platform for combinatorial and geometric computing. Cambridge University Press, New York, NY, USA, 1999.
\section schrijver03combinatorial [Sch03]
Alexander Schrijver. Combinatorial Optimization: Polyhedra and Efficiency. Springer-Verlag, 2003.
\section bglbook [SLL02]
Jeremy G. Siek, Lee-Quan Lee, and Andrew Lumsdaine. The Boost Graph Library: User Guide and Reference Manual. Addison-Wesley, 2002.
\section sleator83dynamic [ST83]
Daniel D. Sleator and Robert E. Tarjan. A data structure for dynamic trees. Journal of Computer and System Sciences, 26(3):362-391, 1983.
\section soplex [SoPlex]
SoPlex -- The Sequential Object-Oriented Simplex. http://soplex.zib.de/.
\section stroustrup00cpp [Str00]
Bjarne Stroustrup. The C++ Programming Language. Addison-Wesley Professional, 3rd edition, February 2000.
*/
• ## lemon/Makefile.am

diff -r a93f1a27d831 -r 454f0c2a380c lemon/Makefile.am
 a lemon/karp.h \ lemon/kruskal.h \ lemon/hao_orlin.h \ lemon/blgf.h \ lemon/lgf_reader.h \ lemon/lgf_writer.h \ lemon/list_graph.h \
• ## new file lemon/blgf.h

diff -r a93f1a27d831 -r 454f0c2a380c lemon/blgf.h
diff -r a93f1a27d831 -r 454f0c2a380c lemon/lgf_reader.h
diff -r a93f1a27d831 -r 454f0c2a380c lemon/lgf_writer.h